Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
did you mean "uninstall one program and INSTALL another" – tony roth Aug 13 '13 at 14:24
Oh dear. Fixed. – stephenwade Aug 13 '13 at 14:53
Also do these applications use window compliant installers? As in uses the msi installer? – tony roth Aug 13 '13 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. – stephenwade Aug 13 '13 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 '13 at 15:29

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.

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.