Solved

VBScript run an executable

Posted on 2011-09-27
4
304 Views
Last Modified: 2012-05-12
I get the following error message when trying the below code:
Microsoft VBScript compilation error:  Expected ')'

My quoting off?

dim objShell, boolCode
set objShell = CreateObject("WScript.Shell")
boolCode = objShell.Run("C:\Program Files\A\Load.exe" /project:Alt /s "Tween" /r /w /e)

Open in new window

0
Comment
Question by:kkbenj
  • 3
4 Comments
 
LVL 9

Accepted Solution

by:
jsdray earned 500 total points
ID: 36712747
will it work for you like this:


dim objShell, boolCode
set objShell = CreateObject("WScript.Shell")
boolCode = objShell.Run ("C:\Program Files\A\Load.exe /project:Alt /s Tween /r /w /e")
0
 

Author Closing Comment

by:kkbenj
ID: 36712821
Yes, that did it.
0
 

Author Comment

by:kkbenj
ID: 36712834
WAIT - it is not working:
The system cannot find the file specified.
error message
0
 

Author Comment

by:kkbenj
ID: 36713117
Did the following to get the quoting correct.

dim scriptsetName
scriptsetName = GetXMLText("Defaults\ScriptName")
iLoaderProcess = """" & objFSO.BuildPath(RegRead6432("HKLM\Software\Alt\Path") , "\ETL\iLoaderClient\Load.exe") & """ " & _
"/r         " & _
"/s:""" & scriptsetName & _
"/Project:" & altProjectNm & " " & _
"/Server:localhost"
                                msgbox iLoaderProcess
                boolCode = WScript.CreateObject("WScript.Shell").run ( iLoaderProcess , 1 , true)

Open in new window

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Script to copy or move mouse-selected collection of files plus targets referenced by shortcuts (.lnk) The purpose of this article is to help illuminate the real challenges and options available (where they may exist) for utilizing simple scriptin…
This is an addendum to the following article: Acitve Directory based Outlook Signature (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_24950055.html) The script is fine, and works in normal client-server domains…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

713 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