Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add shortcut to startup folder

Status
Not open for further replies.

kestrel1

Technical User
Jan 8, 2003
932
GB
Is there anyway to add a programs shortcut to the Vista startup folder via a batch file or script, so that it will run on boot up?
I have tried the following line in a batch file but I get access denied:
copy program.lnk c:\ProgramData\Microsoft\Windows\Startm~1\Programs\Startup
If I try this in XP, but to the appropriate path & not the one above, it works OK.
I have tried running the batch file as an administrator & tried the Elevate command, but nothing is helping.
Any ideas?
Many thanks in advance.
 
Without modifying some aspect of the default security settings, it seems to be a problem thread1583-1432832
 
Can you use Scheduled Tasks or a Login Script via Group Policy as an alternative?
 
A scheduled task may be the best option, as these are laptops not on the domain.
I would like to be able to add the task via a script or batch file using the AT command, but I can't see how to use AT to start a task at every system startup.
You have the option of time & /every,m,t etc, but is there a way to start AT at system start?
 
I think I have answered my own question. You can set a task to run at start by using schtasks.exe & not AT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top