Advertisement
3_2004-2005 Registry #144565

Auto Start with Windows (fixed)

Make your program start when windows starts. Short and easy.

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
Const REG_SZ = 1
Const HKEY_CURRENT_USER = &H80000001
Const REGKEY = "Software\Microsoft\Windows\CurrentVersion\Run"
Const KEY_WRITE = &H20006
Dim path As Long
'Tell windows to make Autopaper autostart with windows
If RegOpenKeyEx(HKEY_CURRENT_USER, REGKEY, 0, KEY_WRITE, path) Then Exit Sub
RegSetValueEx path, App.Title, 0, REG_SZ, ByVal App.path & "\startprog.exe", Len(App.path & "\programsfilename.exe")
    'DELETE AUTOSTART:
    'If RegOpenKeyEx(HKEY_CURRENT_USER, REGKEY, 0, KEY_WRITE, Path) Then Exit Sub
    'RegDeleteValue Path, App.Title
Original Comments (3)
Recovered from Wayback Machine