Page 1 of 1 1
Topic Options
#114068 - 2004-02-16 03:48 PM Runas not working in XP but working in W2K
kops21 Offline
Lurker

Registered: 2004-02-16
Posts: 2
I am trying to do a script to deploy application for desktops that are running on XP. The exact script works on W2K but not on XP. I must be missing a crucial step somewhere and need some expert guidance.

The script calls for Runas and run the application as below:

RUN '%COMSPEC% /e:1024 /c runas /user:domain123\installer "x:\software\Patch\MSpactch123.exe"'

It prompt me Runas Error - Unknown Path. On XP Dos Prompt, i can run with x:\software\patch\mspatch123.exe

How do i go about resolve the matters. Thanks.

Top
#114069 - 2004-02-16 09:05 PM Re: Runas not working in XP but working in W2K
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
saw this too, didn't find info at M$.com though.

after testin i discoverd dat the runas 'sub' proces didn't inherit drive mappings. I created a workaround to map the drive in the 'sub' proces...

HTH
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#114070 - 2004-02-16 09:06 PM Re: Runas not working in XP but working in W2K
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
BTW,

welcome on board!!!
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#114071 - 2004-02-16 09:13 PM Re: Runas not working in XP but working in W2K
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
RUNAS run in the context of the provided user account, thus drive mappings for other user accounts are not available. Thus is documented in the RUNAS documentation. See RUNAS /? and RUNAS /ENV. This is intended behavior.

In general, RUNAS is an inseure method to provide administrative privileges. See the FAQ Forum for secure ways to run scripts under admin privs.
_________________________
There are two types of vessels, submarines and targets.

Top
#114072 - 2004-02-17 02:30 AM Re: Runas not working in XP but working in W2K
kops21 Offline
Lurker

Registered: 2004-02-16
Posts: 2
Can you forward the workaround?
Top
#114073 - 2004-02-17 04:11 PM Re: Runas not working in XP but working in W2K
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
There's not much to this 'workaround'. You basically run a script that first maps a drive, then executes the executable off that mapped drive, then unmaps the drive. However, I highly recommend not to use RUNAS at all. See the FAQ Forum on ways to run scripts under administrative privileges in a secure way.
_________________________
There are two types of vessels, submarines and targets.

Top
#114074 - 2004-02-20 08:31 PM Re: Runas not working in XP but working in W2K
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Jens is correct;

I start a script which does a 'use', start the command and do a 'use /delete'.

_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1452 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.057 seconds in which 0.028 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org