Announcement
Collapse
No announcement yet.
Syntax using shell:startup
Collapse
X
-
Thank you Ulrich. The "startup" option was, as you said, a simple no code solution.
-
This is the correct code for moving a file named sample.exe to the user's startup folder:
Code:File.Move(SessionVar.Expand("%AppFolder%\\sample.exe"), SessionVar.Expand("%StartupFolder%"));
Code:Shell.CreateShortcut(SessionVar.Expand("%StartupFolder%"), "My caption", SessionVar.Expand("%AppFolder%\\sample.exe"));
And if this was indeed your intention, then you could do all this without writing any code, just by checking the "Startup" option for the shortcuts in the file properties:
Ulrich
Leave a comment:
-
Syntax using shell:startup
Syntax question for Setup Factory
File.Move("%AppFolder%\\file_name.exe", "shell:startup", true, true, false, false, nil);
The file does not move to that location when constructed as above, shell:startup is actually
C:\Users\user\AppData\Roaming\Microsoft\Windows\St art Menu\Programs\Startup where user will not be the same computer to computer but shell:startup is a constantTags: None
Leave a comment: