Solved

Trying to run a vbs script usng the Runas command

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP/VB email question 4 46
jboss 7.1 start up error 1 41
Restore Windows 7 Snipping Tool function to Windows 10 10 76
ejb message driven bean mdb creation steps 2 24
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This article will show, step by step, how to integrate R code into a R Sweave document
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…

828 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