• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1288
  • Last Modified:

Trying to run a vbs script usng the Runas command

I am trying to run a vbs scruip using the runas command buy it says it's not a valid Win32 application.

runas /savecred /user:username c:\script.vbs

RUNAS ERROR: Unable to run - c:\script.vbs
193: c:\script.vbs is not a vaild Win32 application.

What are the alternatives?
0
ascnd
Asked:
ascnd
  • 2
1 Solution
 
fostejoCommented:
ascnd,

Try runas /savecred /user:username "wscript.exe c:\script.vbs" instead..

cheers
0
 
ascndAuthor Commented:
Oh yeah baby that works just fine!  Thank you thank you!
0
 
fostejoCommented:
No problem ascnd!

I suspect that the user you're 'running as..' doesn't have the .VBS file extension associated with either wscript or cscript - it's always a good idea to specify the application to run the script with to avoid issues like this - in a corporate enviroment, you'd find that the I.T. people (developers etc.) would have associated VBS files with their fave editor for example ...

cheers

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now