Solved

Trying to run a vbs script usng the Runas command

Posted on 2006-07-15
3
1,111 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Scripting vs. Programming languages 25 165
recursion example 16 125
Removing line numbers from left column in config file 7 52
Android development question 2 37
This article will show, step by step, how to integrate R code into a R Sweave document
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
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…

776 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