| Home | All functions | Categories |
vuRemoveStartupShortcut(*CSTRING,LONG), LONG
Removes a shortcut (.lnk file) from the Windows Startup folder so that the specified program no longer runs automatically at startup.
| Parameter | Data Type | Description |
|---|---|---|
| LinkName | CSTRING(260) | Name of the shortcut file to remove (e.g., MyApp.lnk). |
| Scope | LONG | 0 = Current User Startup, 1 = Common (All Users) Startup. |
Note: In vuFileTools V5, CSTRINGs are not limited to the size shown above. The number is for example only.
A LONG value indicating the result:
LinkName CSTRING(260)
Scope LONG
Rc LONG
LinkName = 'CL_Test_Notepad'
Scope = 0 ! User Startup
Rc = vuRemoveStartupShortcut(LinkName, Scope)
IF Rc = 1
MESSAGE('Startup shortcut removed successfully (User Startup).')
ELSIF Rc = 0
MESSAGE('Shortcut not found or not deleted.')
ELSE
MESSAGE('Failed to remove startup shortcut. rc=' & FORMAT(Rc))
END
Notes
The shortcut name should include .lnk if that was part of the original name; otherwise it will be added automatically.
Common Startup (Scope = 1) usually requires elevation (Administrator rights).
Use together with vuAddStartupShortcut for full management of startup entries.
| Home | All functions | Categories |