Name: KoolFrank87 Date: February 13, 2008 at 09:56:37 Pacific Subject: sigcheck help OS: XP CPU/Ram: 2 gig Model/Manufacturer: Dell
Comment:
I have been messing with the program for the past day and need some guidence. I want the script to verify if it has the latest of the given file and if not, to install it.
So far this is what I have:
sigcheck.exe -n -q "C:\myprogram.exe" |find | find "1.1.1.1" > nul if not errorlevel 1 echo version 1.1.1.1 Found!!!
Im not sure what to do at this point. I know its not right, any ideas?
I am attempting to check the version for adobe reader:
@echo off Echo Checking for Adobe 5.0.5..
for /f %%a in ('sigcheck -q -n "C:\Program Files\Adobe\Acrobat 5.0\Acrobat\Acrobat.exe"') do set ver=%%a if not "%ver%"=="5.0.5.2001102600" echo Program Installed! pause
The output says:
Checking for Adobe 5.0.5.. Press any key to continue . . .
Im not sure what to do from here. Looks like the code should work but not sure why it dosnt. I am goin to try it a couple other files to see what the output is.
I think i got it. I took not out of the if line, if "%ver%"=="5.0.5.2001102600" echo Program Installed!
That seemed to work. If i change the version from 5.0.5.2001102600 to 5.0.5.20011026001111111 It dosnt find the program and I will have it start the install program.
Not off the top of my head; the quotes should prevent such behavior. I'd suggest you remove the @ECHO OFF so you can see exactly what the script is doing.
for /f %%a in ('sigcheck -q -n "C:\Program Files\Adobe\Acrobat 5.0\Acrobat\Acrobat.exe"') do set ver=%%a set ver=%ver: =.% set ver=%ver:,=.% if "%ver%"=="5.0.5.2001102600" echo Program Installed!
As you said, I took out the @echo off and ran the script. I found that the files with a space in the verson would not display anything past the space marker. So if the file was verson 2.0 RC2 it would omit the RC2. The rest started to work after that.
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE