I'm running into a problem running a Powershell script through ConfigMgr while using the following detection method. The idea here is to push a specific shortcut to our users desktop and if the user deletes it have the detection method replace it. When I run this script I get the following error: Missing '(' after 'if' in if statement.
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oShell = WScript.CreateObject("WScript.Shell")
if oFSO.FileExists(oShell.ExpandEnvironmentStrings("%userprofile%\desktop\chrome.exe")) Then
WScript.StdOut.Write "The application is installed"
WScript.Quit(0)
Else
WScript.Quit(0)
End If