Shell: general launch as a parameter for XCOPY

I have a simple batch of script that copies a file to the startup folder, but it seems like I cannot use shell: Common Startup as the xcopy parameter. I tried this

xcopy hurrdurr.exe "shell:Common Startup" 

and many other options, and they do not work. As an aside, if it really worked, would "hurrdurr.exe" work every time I started, assuming I got permission through uac to perform the xcopy operation? Would using an environment variable be better? Os in question is Windows XP and continued.

0
shell windows-7 windows-xp batch-file
source share
1 answer

I'm not sure why your shell command will not work, but if you need to load your download at startup, I would prefer to use the registry cleaner and easier, which means that you do not have to copy the file somewhere else, especially if this file depends on other things.

 reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "Hurrdurr" /d "hurrdurr.exe" /f 

Just run cmd as admin and it will work :)

If you want to use the startup folder, but on Win7 you can use

 "%appdata%\Microsoft\Windows\Start Menu\Programs\Startup" 

I would also use the shortcut that @David suggested instead of copying the actual file.

+1
source share

All Articles