Link to home
Start Free TrialLog in
Avatar of Thomas_Meyer
Thomas_MeyerFlag for Czechia

asked on

How gradually to install programs using vb script?

Hi Experts,
 my script has to verify the existence of individual programs (whether they are installed on your computer). If they are installed, so the script is skipped. If the computer programs are missing, they run sequentially unattended installation.
 The script must handle:
 1) simply check the existence of programs (installation path can sometimes be even more -see my script)
 2) easy to add a new program to the list of programs to install
 3) gradually start installing individual programs with pre-determined parameters unattended
4) List MsgBox number of programs that need to be installed - for example, the script detects that your computer is missing installed 2 programs and shows MsgBox "Number of programs for installation: 2"

Dim objFSO, oShell, APP_Gimp_PATH_1, APP_Gimp_PATH_2

APP_Gimp_PATH_1 = "C:\Program Files\GIMP 2\bin\gimp-2.8.exe"
APP_Gimp_PATH_2 = "C:\Program Files (x86)\GIMP 2\bin\gimp-2.8.exe"

Set oShell= Wscript.CreateObject("WScript.Shell")
Set objFSO = CreateObject ("Scripting.FileSystemObject")
  
  If (objFSO.FileExists (APP_Gimp_PATH_1) Or objFSO.FileExists (APP_Gimp_PATH_2)) Then 
      MsgBox "The program is installed."
  Else 
oShell.Run "RunAs /user:admin@mydomain ""\\192.168.1.5\i$\INSTALL\GIMP\gimp-2.8.2-setup-1.exe /SILENT /NOCANCEL /NORESTART"""  
End If

Open in new window


Thank you very much in advance for your help and advice myself I would not make it unfortunately.
TM
Avatar of Steve Knight
Steve Knight
Flag of United Kingdom of Great Britain and Northern Ireland image

I haven't got time at the mo. to look at this more as on way out but have you looked at ninite.com if these are standard type apps?  It will build an installer to silently install /reply update whatever you ask it to.

Steve
ASKER CERTIFIED SOLUTION
Avatar of RobSampson
RobSampson
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial