Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Name: kiwi_hk
Hi looking for a batch file to install some .exe or .msi programs silently but want the batch file to check if the program is installed or not before starting.
Thanks

I am using this in the batch file when users login
"\\server\netlogon\program\program.msi" /qnr
But how to check if the program is already installed it will not execute again?

how about:
IF NOT EXIST filename command
where filename is the path to the properly installed software's
executable

Hey,
You could use an old tool ZIP2EXE.exe to convert a zip
archive containing the installed program to an exe. Then use
the following VBS script to run the Self Extractor invisibly.
'__________________________________________
'
'Start Of Script
'__________________________________________'Author: LEoH
'Program: UH'Run Program Invisibly.
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "(Your Self Extracting EXE's
Name).exe" & Chr(34), 0
Set WshShell = Nothing'__________________________________________
'
'Start Of Script
'__________________________________________Change "(Your Self Extracting EXE's Name).exe" to the files
name. Remove the brackets.
This will open the exe invisibly. It can also be used to run
almost any type of file invisibly. Just make sure the program
ends or you will have to kill the task to exit the program.Save this file as whatever you want but make sure its
extension is .vbs or else it wont work.Hope this helps.
LEoH

Sorry. I forgot. You can remove the credits and lines at the
beginning. I add them to all my files. I don't care if they aren't
there. They aren't Necessary, I just copied the entire contents
of the .vbs file i made just encase i forgot how to do it.

I don;t understand, my file is *.exe or *.msi already, I just want a silent install in the background, but couldn't do it with software deployment assigning using GPO because it's gaves me invalid H:drive and failes when it try to install before the users logins.
Your programs converts a zip file to a *.exe?

HOw do i uses the IF NOT EXIST filename command
to check in the C:programs have this file, if it has then stops and won't install the program and if not exist install the program?

I think it's like this, seems to be working.
IF NOT EXIST "C:\Program Files\.....exe" "\\server\......"

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |