Last active
August 29, 2015 13:56
-
-
Save Arcath/8952312 to your computer and use it in GitHub Desktop.
A script to silently deploy software to domain when no MSI is available (Assumes silent install exists on EXE)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dim shell, DQ, MSI_store, vbsinstall_folder, path_to_exe, options, chkfile | |
' Constants | |
DQ = chr(34) | |
Set FSys = CreateObject("Scripting.FileSystemObject") | |
vbsinstall_folder = "C:\vbs_install\" 'path to store keys in | |
if Not Fsys.FolderExists(vbsinstall_folder) Then | |
Fsys.CreateFolder(vbsinstall_folder) | |
End If | |
' specify installations here | |
' Install Function takes three params | |
' First path to exe in quotes | |
' Second any params to make it silent etc in quotes | |
' Third file to check against to see if installed (this should include version number) in quotes | |
Install "\\path\to\installer.exe", "/options /to /make /it /silent", "Identifying key" | |
' Install After takes an extra option to make sure that it doesnt install until after something else | |
Install_After "\\path\to\installer.exe", "/options /to /make /it /silent", "Identifying key", "Prereq Key" | |
' Install Function | |
Sub Install(path_to_exe, options, chkfile) | |
if Not FSys.FileExists(vbsinstall_folder & chkfile) Then | |
set shell=createobject("wscript.shell") | |
shell.run DQ & path_to_exe & DQ & options ,0 ,true | |
set shell=nothing | |
Fsys.CreateTextFile vbsinstall_folder & chkfile | |
End if | |
End Sub | |
' Install After | |
Sub Install_After(path_to_exe, options, chkfile, prereq) | |
if FSys.FileExists(vbsinstall_folder & prereq) Then | |
Install path_to_exe, options, chkfile | |
End if | |
End Sub | |
Wscript.Quit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment