Solved

Trying to run a vbs script usng the Runas command

Posted on 2006-07-15
3
1,072 Views
Last Modified: 2007-12-19
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
Comment
Question by:ascnd
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
fostejo earned 500 total points
ID: 17115103
ascnd,

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

cheers
0
 

Author Comment

by:ascnd
ID: 17115159
Oh yeah baby that works just fine!  Thank you thank you!
0
 
LVL 10

Expert Comment

by:fostejo
ID: 17115296
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
This article will show, step by step, how to integrate R code into a R Sweave document
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now