Page 1 of 1 1
Topic Options
#43585 - 2003-07-31 03:59 PM RunAs with MS HotFix switches
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
Anyone have any idea why the switches (/u /q /f) on the end of this would not work when using the RunAs command? It works fine if I open a prompt and manually type it in. The hotfix is getting launched with the RunAs fine...Just not picking up the switches.

code:
$updatefile = "KB823980\WindowsXP-KB823980-x86.exe /u /q /f"
Run '%comspec% /c Runas /user:DOMAIN\MSUpdate "$updatefile"'

Any help would be appreciated.

Top
#43586 - 2003-07-31 04:04 PM Re: RunAs with MS HotFix switches
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Most likely you'll need to do this
code:
$updatefile = '"KB823980\WindowsXP-KB823980-x86.exe" /u /q /f'
Run '%comspec% /c Runas /user:DOMAIN\MSUpdate '+$updatefile

However,the update file path looks incomplete to me, better use a complete pathname incl.drive/share.
_________________________
There are two types of vessels, submarines and targets.

Top
#43587 - 2003-07-31 04:05 PM Re: RunAs with MS HotFix switches
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
This doesn't look like a valid path to me...

code:
$updatefile = "KB823980\WindowsXP-KB823980-x86.exe /u /q /f"


Top
#43588 - 2003-07-31 04:29 PM Re: RunAs with MS HotFix switches
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
Original code does now work when I put in full path to the exe. For some reason with the short path it would still run the patch...But it wouldnt use the switches. Using full path resolved the problem.

Thanks for all the help as usual...

[ 31. July 2003, 16:30: Message edited by: CitrixMan ]

Top
Page 1 of 1 1


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

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

Generated in 0.171 seconds in which 0.137 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