motherfok Posted November 2, 2005 Share Posted November 2, 2005 (edited) I figured a good way to install an application on multiple machines, is to put instructions for it in the login script that these machines use. However, this way the application will be installed every time the user logs on. What are some good ways of detecting if the application has been installed yet? (and if so: skip the installation)Perhaps checking for specific registry entries, or files that are unique to that version of a certain application.... Anything else? How would you do it? (code please ) Edited November 2, 2005 by motherfok Link to comment Share on other sites More sharing options...
mmarable Posted November 2, 2005 Share Posted November 2, 2005 I'd keep it simple. Check for the executable in the lcoation that you're intalling it to. If it's there, skip the install, if not install it.That's the simple way. Link to comment Share on other sites More sharing options...
motherfok Posted November 2, 2005 Author Share Posted November 2, 2005 I'd keep it simple. Check for the executable in the lcoation that you're intalling it to. If it's there, skip the install, if not install it.That's the simple way.Actually it's an update to an application. Executable names of both versions are the same.. Link to comment Share on other sites More sharing options...
ravashaak Posted November 2, 2005 Share Posted November 2, 2005 You could use REG.exe to check a specific registry entry. Type REG QUERY at the command prompt for further syntax information. You could pipe the results into a FIND command to verify installation. You could also check the %errorlevel% system variable immediately after the REG QUERY in order to verify installation.If there are no appropriate registry entries to be checked, a last resort is to use FILEVER.exe to determine the version of the executable. - Ravashaak Link to comment Share on other sites More sharing options...
ZileXa Posted November 2, 2005 Share Posted November 2, 2005 WIHU can do this for you (and adjust the selectable options if a certain program (or regkey) is present.) Link to comment Share on other sites More sharing options...
cwyhk Posted November 3, 2005 Share Posted November 3, 2005 I use the following batch files to install and update applicationson both Window Me clients and Windows XP clientsin windows 2000 server network environment.My method is based on computer name of each clientsrather checking the version of the applications. logon.batnet use I: \\server1\f1net use J: \\server1\f2net use F: \\server2net time \\server1 /set /yesif (%OS%) == (Windows_NT) goto XPif exist F:\PROUP\SU.BAT start R:\PROUP\SU.BATgoto end:XPif exist F:\PROUP\SU.BAT call R:\PROUP\SU.BAT:endexitSU.BATset drive=R:%drive%cd %drive%\proupif not exist c:\cname.bat start /wait ComputerName.vbscall c:\cname.batset dir=SU1if not exist %dir%\%cn% goto next1if exist %dir%\%cn%.done goto next1 cd %dir% for %%U in (*.bat) do call %%U echo %cn% > %cn%.donecd ..:next1set dir=SU2if not exist %dir%\%cn% goto next2if exist %dir%\%cn%.done goto next2 cd %dir% for %%U in (*.bat) do call %%U echo %cn% > %cn%.donecd ..:next2:endcls@exitComputerName.vbsSet objShell = Wscript.CreateObject("Wscript.Shell")Set colSystemEnvVars = objShell.Environment("System")Set colUserEnvVars = objShell.Environment("User")Set objNetwork = Wscript.CreateObject("Wscript.Network")UName = objNetwork.UserNameCName = objNetwork.ComputerNameSet WShell = CreateObject("WScript.Shell")Call WShell.Run ("command /c echo set cn=" & cname & "> c:\cname.bat",,True)WScript.DisconnectObject(WShell)Wscript.QuitUP.BATif (%OS%) == (Windows_NT) goto XP:MEif exist "C:\Program Files\7-Zip\Uninstall.exe" start /wait "C:\Program Files\7-Zip\Uninstall.exe" /Sping locahost > NULgoto end:XPif exist "%ProgramFiles%\7-Zip\Uninstall.exe" start /wait "aa" "%ProgramFiles%\7-Zip\Uninstall.exe" /Sping locahost > NUL:endstart /wait Seven-Zip\7z429.exe /Sregedit /s Seven-Zip\7-Zip.reg Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now