You are not logged in.

#1 03 Mar 2006 13:25

simondrake79
Member
Registered: 01 Mar 2006
Posts: 5

RUNAS problem

Hi again...

i have a batch script which does the following:

runas /noprofile /user:bw-wan\sdr_admin cmd /k c:\qwinsta_tool.bat

And the code inside qwinsta_tool.bat does this:

SET /P %1=

qwinsta /server:%1

Unfortunately the second batch file closes straight away. Why is this? Even if i remove "cmd /k" from the first script it still closes straight away and doesnt even ask for my password!

Frustrating!

Offline

#2 03 Mar 2006 19:34

Simon Sheppard
Admin
Registered: 27 Aug 2005
Posts: 1,130
Website

Re: RUNAS problem

Do you have the service running?
test by running a command prompt like this

runas /u:Administrator "%windir%\System32\cmd.exe /k cd c:\ && color fc && title ***** Admin console *****"

Offline

#3 04 Mar 2006 16:20

simondrake79
Member
Registered: 01 Mar 2006
Posts: 5

Re: RUNAS problem

yeah that works fine....

i think i need to pipe the command "c:\mybatchfile.bat" into the cmd.exe i am doing a runas on. Is this possible?

Offline

Board footer

Powered by