How can I execute a program with admin rights from a dosbox

D

Dave

How can I execute a program with admin rights from a dosbox (when logged in as poweruser)
are there any parameters for that or any tools?
 
J

jayloveroni

I have tried this before. You can call a vbscript before
the run as command. The vbscript will send the password
keys after you have been prompted. Below is an example

rem call path to vbscript (example only)
\\server\share\vbscript
run as /user:domain\adminaccount "program.exe"
exit

vbscript contents should be

set WshShell = CreateObject("WScript.Shell")
WScript.Sleep 1
WshShell.SendKeys "PASSWORD"
WScript.Sleep 1
WshShell.Sendkeys "{ENTER}"
set WshShell = nothing

the only value you have to enter is the password. only
problem with this is you have a password for an actual
account exposed.

have fun.

-----Original Message-----
But I also want to add the password in the command?
runas is allways asking for the password
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top