/build/static/layout/Breadcrumb_cap_w.png

Need help with script quotation mark locations??

'On Error Resume NExt
Dim objShell, objNewPort, objWMIService, oFSO, Path, strComputerA
Dim RunErrorToReturn, Results
Dim strComputer : strComputer = "."
Dim objNetwork : Set objNetwork = CreateObject("WScript.Network")
strComputerA = objNetwork.ComputerName

Set objWMIService = GetObject("winmgmts:"& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objShell = CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")
ProgramFiles = objShell.ExpandEnvironmentStrings("%ProgramFiles%")
windir= objShell.ExpandEnvironmentStrings("%windir%")
temp = objShell.ExpandEnvironmentStrings("%temp%")
allusers=objShell.ExpandEnvironmentStrings("%AllUsersProfile%")

path= oFSO.GetParentFolderName(WScript.ScriptFullName)

objShell.Run path+"RunDll32.exe C:\PROGRA~1\COMMON~1\INSTAL~1\engine\6\INTEL3~1\Ctor.dll,LaunchSetup "C:\Program Files\InstallShield Installation Information\{5624C000-B109-11D4-9DB4-00E0290FCAC5}\Setup.exe" -l0x9 -s -f1"c:\apps21\vpn403i\setupun.iss" VpnUninstall ",1,TRUE

0 Comments   [ + ] Show comments

Answers (7)

Posted by: AngelD 16 years ago
Red Belt
0

objShell.Run path & "\RunDll32.exe C:\PROGRA~1\COMMON~1\INSTAL~1\engine\6\INTEL3~1\Ctor.dll,LaunchSetup ""C:\Program Files\InstallShield Installation Information\{5624C000-B109-11D4-9DB4-00E0290FCAC5}\Setup.exe"" -l0x9 -s -f1""c:\apps21\vpn403i\setupun.iss"" VpnUninstall",1,TRUE
Posted by: case2k5 16 years ago
Orange Belt
0
Thank you for the response AngelD. This batch command line works:

RunDll32.exe C:\PROGRA~1\COMMON~1\INSTAL~1\engine\6\INTEL3~1\Ctor.dll,LaunchSetup "C:\Program Files\InstallShield Installation Information\{5624C000-B109-11D4-9DB4-00E0290FCAC5}\Setup.exe" -l0x9 -s -f1"c:\apps21\vpn403i\setupun.iss" VpnUninstall

The corrected VB script line that you posted didn't work. I get an error on that line.

Can you please look at it again?

Thank you very much...
Posted by: AngelD 16 years ago
Red Belt
0
This should work:

objShell.Run "RunDll32.exe C:\PROGRA~1\COMMON~1\INSTAL~1\engine\6\INTEL3~1\Ctor.dll,LaunchSetup ""C:\Program Files\InstallShield Installation Information\{5624C000-B109-11D4-9DB4-00E0290FCAC5}\Setup.exe"" -l0x9 -s -f1""c:\apps21\vpn403i\setupun.iss"" VpnUninstall",1,TRUE
Posted by: anonymous_9363 16 years ago
Red Belt
0
Quote marks are a pain when they have to be included as part of quoted text. They also make code harder to read and follow. I use 'Chr(34)' instead.
Posted by: case2k5 16 years ago
Orange Belt
0
Can you give me an example of 'Chr(34)' with this uninstall cmdline?

thx
Posted by: AngelD 16 years ago
Red Belt
0

objShell.Run "RunDll32.exe C:\PROGRA~1\COMMON~1\INSTAL~1\engine\6\INTEL3~1\Ctor.dll,LaunchSetup " & Chr(34) & "C:\Program Files\InstallShield Installation Information\{5624C000-B109-11D4-9DB4-00E0290FCAC5}\Setup.exe" & Chr(34) & " -l0x9 -s -f1" & Chr(34) & "c:\apps21\vpn403i\setupun.iss" & Chr(34) & " VpnUninstall",1,TRUE
Posted by: case2k5 16 years ago
Orange Belt
0
thx for all your help AngelD and VBScab
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ