1

I am using Group Policy to deploy a computer startup script that tries to uninstall one program and install another. I need this script to report its status (whether a certain file exists on the system, which would mean that the installation succeeded).

My first idea was to mount a network share and drop a text file in there. Is there a better way to do this? Right now, I am using a batch file, although I would be open to learning a bit of PowerShell if it was the best option.

6
  • did you mean "uninstall one program and INSTALL another"
    – tony roth
    Aug 13, 2013 at 14:24
  • Oh dear. Fixed. Aug 13, 2013 at 14:53
  • Also do these applications use window compliant installers? As in uses the msi installer?
    – tony roth
    Aug 13, 2013 at 15:13
  • Yes, they use MSI installers, though that should be irrelevant. I need to check for the presence of two files, actually, one for some cleanup the script does, and one for the installation. Aug 13, 2013 at 15:16
  • well if the msi components are working correctly then you wouldn't have to worry about file remenants, also msi's can have logging enabled...
    – tony roth
    Aug 13, 2013 at 15:29

2 Answers 2

0

Honestly, I would probably use the text file. On success:

echo %COMPUTERNAME% >> z:\path\success.txt

On failure:

echo %COMPUTERNAME% >> z:\path\failure.txt

Someone else might have something that works better, though.

0

I use the network share method personally then I have our monitoring application check that folder periodically for files matching "error*.log" and fire off an alert if there is one.. that's for our servers. For our workstations our tech support staff checks it around lunch time and makes a list of systems they need to visit, doesn't happen often.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .