Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


runas and vbscript

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,2516
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> runas and vbscript
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 runas and vbscript - 3/30/2005 3:18:20 AM   
  kirrilian


Posts: 628
Score: 3
Joined: 3/15/2005
From:
Status: offline
id like to use runas to run some scripts as another user, but i get this message:

Wed 03/30/2005 | 10:14:19.01
C:\Documents and Settings\user\My Documents\WindowsScripts\user_scripts
=)runas /user:domain\user add_domainuser2localadmin.vbs
Enter the password for domain\user:
Attempting to start add_domainuser2localadmin.vbs as user "domain\user" ...
RUNAS ERROR: Unable to run - add_domainuser2localadmin.vbs
193: add_domainuser2localadmin.vbs is not a valid Win32 application.

any ideas on how to fix/work around this?

_____________________________

Have you searched here ?
VBScript Fundamentals
My Site
 
 
Post #: 1
 
 Re: runas and vbscript - 3/30/2005 3:37:56 AM   
  kirrilian


Posts: 628
Score: 3
Joined: 3/15/2005
From:
Status: offline
google is your friend :)

you cant do it directly but you CAN use runas to open a cmd prompt under the other user's credentials and run the script from there.

hows that for a tricksy hack lol

(in reply to kirrilian)
 
 
Post #: 2
 
 Re: runas and vbscript - 3/30/2005 5:30:10 AM   
  token

 

Posts: 1917
Score: 0
Joined: 1/14/2005
From:
Status: offline
runas /user:SAS\SAFSBILLING c:\windows\system32\cscript.exe c:\full_path\add_domainuser2localadmin.vbs

(in reply to kirrilian)
 
 
Post #: 3
 
 Re: runas and vbscript - 3/30/2005 5:31:48 AM   
  mbouchard


Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
Take a look at psexec by sysinternals (www.sysinternals.com). you can use this to run something with different creds.

(in reply to kirrilian)
 
 
Post #: 4
 
 Re: runas and vbscript - 3/30/2005 11:36:01 AM   
  tnoonan

 

Posts: 364
Score: 0
Joined: 12/14/2004
From:
Status: offline
http://www.spoogenet.com/index.php?module=article&view=15&5cbaa9d36385e275f0a415eb9b827618=91324d7775207cfd55aba64ca48874f0

(in reply to kirrilian)
 
 
Post #: 5
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> runas and vbscript Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts