Freeday
asked on
Why am I getting this error with this VB Script?
The error is
Windows Script Host
-------------------------- -
Script: CDocuments and Settings\cs-ads-mbb30\Desk top\arms.v bs
Line: 5
Char: 121
Error: Expected 'Then'
Code: 800A03F9
Source: Microsoft VBScript compilation error
Windows Script Host
--------------------------
Script: CDocuments and Settings\cs-ads-mbb30\Desk
Line: 5
Char: 121
Error: Expected 'Then'
Code: 800A03F9
Source: Microsoft VBScript compilation error
Set shell= WScript.CreateObject("WScript.Shell")
username = shell.ExpandEnvironmentStrings("%USERNAME%")
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists("C:\Documents and Settings\" & username & "\Start Menu\Programs\End2End, Inc\ARMS V2 R3.appref-ms")
Then
Wscript.Echo "ARMS Enterprise V2 R3 is already installed for " & username & " on this
computer. Click OK to close."
Else
Wscript.Echo "ARMS Enterprise V2 R3 is not installed for " & username & " on this
computer. Please click install when prompted."
CreateObject("Wscript.Shell").Run "\\cs-metroplex.cwru.edu\ARMSInstaller\Setup.exe"
End If
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You cannot have your IF Else statement like below:
IF
Then
End IF
Solution
If then
Else
End IF
Hope this solves your problem