Hello everyone! I have a very simple script that I need to get working in order to install an outlook add-on. I think I have the basics correct, however I am getting an error (scroll past the code) that stops it from working.
The error code doesn't seem to make sense since I am sure I pointed it to the correct location. This needs to operate in a Windows Vista 32bit environment.
Here is the code:
Here is the error:
Script: C:\Users\xxxx\Desktop\CCInstall2.vbs
Line: 9 (Last line)
Char: 1
Error: The system cannot fine the file specified.
Code: 80070002
Source: (null)
When I use:
I get the same error, and if I try:
I get:
Script: C:\Users\xxxx\Desktop\CCInstall2.vbs
Line: 9 (Last line)
Char: 29
Error: Cannot use parentheses when calling a Sub.
Code: 800A0414
Source: Microsoft VBScript compilation error
Any help would be greatly appreciated! I know it's probably something silly.
The error code doesn't seem to make sense since I am sure I pointed it to the correct location. This needs to operate in a Windows Vista 32bit environment.
Here is the code:
Code:
Option Explicit
'On Error Resume Next
Dim objShell, strCmd
Set objShell = CreateObject("WScript.Shell")
strCmd = "msiexec.exe /a ""\\xxxxxx\CCSInstall\CCSServiceRequestClient.msi"" /quiet /norestart"
objShell.Run "strCmd",2,True
Here is the error:
Script: C:\Users\xxxx\Desktop\CCInstall2.vbs
Line: 9 (Last line)
Char: 1
Error: The system cannot fine the file specified.
Code: 80070002
Source: (null)
When I use:
Code:
objShell.Run ("strCmd,2,True")
Code:
objShell.Run (strCmd,2,True)
Script: C:\Users\xxxx\Desktop\CCInstall2.vbs
Line: 9 (Last line)
Char: 29
Error: Cannot use parentheses when calling a Sub.
Code: 800A0414
Source: Microsoft VBScript compilation error
Any help would be greatly appreciated! I know it's probably something silly.