Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VBScript run an executable

Posted on 2011-09-27
4
Medium Priority
?
315 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 2000 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Loops Section Overview
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

773 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