I knew it would be possible to write a program to run as a system service and allow me bypass NTFS file permissions, but I hoped I could find a way to do it a lot simpler, and I've finally found it.
CREATE THE SERVICE WITH THIS COMMAND: (Copy and paste this as one line)
sc create SuperCMD binPath= "C:\WINDOWS\system32\cmd.exe /c c:\windows\system32\cmd.exe" type= own type= interact
START THE SERVICE WITH THIS COMMAND:
sc start SuperCMD
The first command pretty much registers CMD.exe starting CMD.exe as a system service, and allows it to interact with the desktop so you can see it. The second command starts the service, which really opens up a command prompt running with system privileges, thus allowing you to navigate into folders that you don't have permission to enter. The second command will give an error, but as long the little black box is open, it doesn't matter.
You can also run programs as the system account by typing the name of the program (sometimes you'll need the full path), but explorer.exe will open as your regular user account, so if you want a GUI file manager, you'll have to find something else. I actually used 7-Zip since since it was already installed on my computer and it worked fine.
This is a big help when working with customer's hard drives as I can easily go through their profiles to remove malware files (with some special vb scripts I will release open sourced someday) or for copying their files to a FAT32 partition when Windows needs re-installed from scratch or a blank hard drive.
Wednesday, March 11, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment