Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VBScript run an executable

Posted on 2011-09-27
4
Medium Priority
?
312 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Welcome, welcome!  If you are new to the series and haven't been following along, please take a brief moment to review the first three installments: Part 1 (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/A_266-VBScri…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

670 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