Page 1 of 1

Install only if it wasnt installed before

Posted: 13 Oct 2010 14:48
by xionhack
Hello. I made a script for Group Policy that would create a TEMP folder in the C drive, download a file from the server and install it. The only thing is that I only want it to be installed if the file wasnt installed before, maybe if it wasnt downloaded. This is my script. Thank you:

@echo off

echo ### Creating TEMP directory...
mkdir "C:\TEMP"


echo ### Downloading Software Manager
echo n|copy /-y "\\serverNETLOGON\setupInstall.exe" "C:\TEMP"


echo ### Installing Software manager
C:\TEMP\setupInstall.exe -server setup.server2.com -quiet

Re: Install only if it wasnt installed before

Posted: 16 Oct 2010 06:34
by aGerman
The question is how you could determine if you have installed it before? Is there a file or folder created that only exists if it is installed? Or is there a registry key we could look for?

Regards
aGerman