/build/static/layout/Breadcrumb_cap_w.png

SCCM Detection for batch files

I'm trying to deploy Java using some of the tools here. One great tool I want to run as a dependency is a batch file that uninstalls all versions of Java. The only want to do this is to add it as an application through SCCM, but SCCM requires that all applications be detected of it's presence to continue. How would I go about doing this if msi & registry keys aren't really in the mix (or maybe they are)?

The JavaUninstall.bat can be found here http://www.itninja.com/blog/view/deploying-java-7-through-gpo


3 Comments   [ + ] Show comments
  • I'm not a SCCM guy, but could you just use the uninstall strings to detect since that should be in the registry? HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall - dugullett 10 years ago
    • I could. For some reason I thought I could only add one msi to the detection rule. This may work out. I'll give it a shot and reply back. Thanks! - JHBPJF 10 years ago
  • I've done some stuff with scripts where I didn't have a file or folder to validate against because it was deleted. In these scenarios, I add a line to the script that copies a file to a temp folder called complete.flag and validate against it's modified date to verify my script ran. I can then "edit" this complete.flag file (just a plain text file) and alter the modified date as needed with each deployment. This lets me run updated versions of the same script without it triggering as already run and skipping it. - rschauer 10 years ago
  • I use a custom script, VBScript, as a detection method, to see if a folder has been correctly deleted:

    Set objFSO = CreateObject("Scripting.FileSystemObject")
    strFolder = "<folder location>"
    If not (objFSO.FolderExists(strFolder)) Then Wscript.Echo "Ok"
    End If

    As long as the check returns something (in this case, the text Ok, the check is considered to be successfull. - bherman 10 years ago

Answers (0)

Be the first to answer this question

 
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