Quantcast
Channel: Configuration Manager 2012 - Application Management forum
Viewing all articles
Browse latest Browse all 4762

Powershell Detection Method Config Mgr 2012

$
0
0

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


Viewing all articles
Browse latest Browse all 4762

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>