Sweet! Thanks guys for all the help so far! pushed me far forward to where I need to be. So I am halfway through writing the vbs for it when I stumbled across a warning in another post to never use vbs for logon purposes; it is a huge security risk... So I was wondering if this was a security risk or not? also I am not the greatest w/ vbs and I am having trouble attaching to the runas process I start... I commented it so you can see what I am trying to do; is what I am doing wrong glaringly obvious? (I know that the syntax is wrong and that it will kick off a process of cmd.exe; but idk the proper syntax)
machine = InputBox("Target Machine...")
UserInput = InputBox( "Password..." )
set WshShell = CreateObject("WScript.Shell")
set WshEnv = WshShell.Environment("Process")
WinPath = WshEnv("SystemRoot") & "\System32\runas.exe"
rc=WshShell.Run("runas /user:domain\username cmd.exe",2,FALSE)
WshShell.SendKeys UserInput & chr(10) & chr(13)
'WinPath = WshEnv("SystemRoot") & "\System32\cmd.exe"
'WshShell.SendKeys "cd\" & chr(10) & chr(13) & "PsExec.exe \\ & machine &_
' "cmd.exe sc config MSSQL$SQLEXPRESS start= demand"
*I also though of trying to attach to the process but when looking for it I kept getting the same inane threads posted across many site by the same person & I don't have a ref book
I then thought that something like this
rc=WshShell.Run("runas /user:domain\username cmd.exe | " & UserInput)
would be better than runas but I am not sure of the syntax for 'where' to put my commands after i execute cmd
ie would it be
rc=WshShell.Run("runas /user:cwopa\dhsvcwic03 cmd.exe | " & UserInput & " some command")
rc=WshShell.Run("runas /user:cwopa\dhsvcwic03 cmd.exe some command | " & UserInput)