I am trying to write a batch file that will copy itself to the startup folder in Windows 7 for all users.
I have tried this code here:
copy test.bat "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup"
and it does notwork. However, if I input this code instead:
copy test.bat "C:\Users\Kreature\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
it works but the problem is that I need this to be universal for all accounts.
I guess that you must call the script from an admin account in order to copy a file to the system folders. Try "Execute as administrator" on CMD and call your script.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With