|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Script required to check if an app is installed if not install it..
Hi can anyone help me ?
I need a script that will check if an app is installed and if not install it on windows XP and Vista clients. This will be a VB script in the login option in group policy; If the program is installed it will be in this location; C:\Program Files\Sophos anti-virus\savmain.exe If it is not installed i need it to pull this install exe from here; \\rsnukarc01\app02\sophos\sophos_uk.exe Can anyone help me please If you need any other info please let me know. Thanks Guys Paul... Last edited by Paul_71 : March 6th, 2009 at 11:08 AM. Reason: missed a word out in title |
|
#2
|
||||
|
||||
|
__________________
Scripting problems? Windows questions? Ask the Windows Guru! Stay up to date with all of my latest content. Follow me on Twitter! Help us help you! Post your exact error message with these easy tips! |
|
#3
|
|||
|
|||
|
Quote:
Hi Nilpo thanks for this I have zero vbs script experience.I have tried this however I get an error on line 4 char 1 Error: expected statement Code: 800A0400 Source: Microsoft VBScript compilation error I copied the script into a file as below; (Line 1)Set WshShell = CreateObject("WScript.Shell") (Line 2)Set objFso = CreateObject("Scripting.FileSystemObject") (Line 3)If Not objFso.FileExists("C:\Program Files\Sophos anti-virus\savmain.exe") Then WshShell.Run "\\rsnukarc01\app02\sophos\sophos_uk.exe" (Line 4)End If Any ideas ? ![]() |
|
#4
|
||||
|
||||
|
you didnt copy it right, this line
Code:
If Not objFso.FileExists("C:\Program Files\Sophos anti-virus\savmain.exe") Then WshShell.Run "\\rsnukarc01\app02\sophos\sophos_uk.exe"
shud be Code:
If Not objFso.FileExists("C:\Program Files\Sophos anti-virus\savmain.exe") Then
WshShell.Run "\\rsnukarc01\app02\sophos\sophos_uk.exe"
|
|
#5
|
|||
|
|||
|
Thanks guys !! :)
Quote:
Works a treat ![]() Many thanks for your help and speedy response !! Paul.. ![]() |
|
#6
|
||||
|
||||
|
Quote:
|
|
#7
|
||||
|
||||
|
glad its working now
![]() |
|
#8
|
||||
|
||||
|
Quote:
u can write statement in one line but in that case do not use end if . like this only if and then .do not use end if . Code:
If Not objFso.FileExists("C:\Program Files\Sophos anti-virus\savmain.exe") Then WshShell.Run "\\rsnukarc01\app02\sophos\sophos_uk.exe"
__________________
Nothing is Impossible bcoz IMPOSSIBLE itself says.. I M POSSIBLE........................ Be cool !!!!!!!!
|
|
#9
|
|||
|
|||
|
Silent .exe install
Hey Nilpo,
Great Script! I tried finding a way to silence my .exe install using everything I know (/q /QUIET /s / SILENT /qn, etc.), but all of the above won't install my .exe silently. Do you know of a silent switch that will enable me to install my .exe quietly? Please Help. Quote:
|
![]() |
| Viewing: ASP Free Forums > System Administration > Windows Scripting > Script required to check if an app is installed if not install it.. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|