|
|
|||||||
I am trying to get the below command to run ONLY once. It reboots the machine after running so it needs to not run every login. also it needs to detect Windwos XP pro SP2. if not sp2 it shoudl terminate. What I have so far does not work. If Instr(@PRODUCTTYPE,"Windows XP Professional") If Instr(@CSD, "Service pack 2") SHELL '%comspec% /c "CPAU -u domain\username -p password -profile -ex "msiexec /i \\tahoe\packages\mmclientsp2.msi MASIP=192.168.5.40 /qn"' Endif Oh yeah it use CPAU to run as with admin rights. |
||||||||
|
|
|||||||
put an "if exist() ... endif" around it to see if the installed app exists, is the simplest method |
||||||||
|
|
|||||||
Not sure where that would fit in. this is a patch so the files to teh program are already there. I have changed it to this but it doesnt like the If Exists line. says somethign about Missing ) which is there so i dont get it. this shoudl say check windwos ver check SP versiona dn if the main progrma is installed. nto only does it error on me it will not check to see if the patch is installed. IF EXIST(C:\Program Files\Avaya Modular Messaging\Client\vr.exe) If Instr(@PRODUCTTYPE,"Windows XP Professional") If instr(@CSD, "Service Pack 2") SHELL '%comspec% /c "CPAU -u sssnt\Install -p Install1 -profile -ex "msiexec /i \\tahoe\packages\mmclientsp2.msi MASIP=192.168.5.40 /qn"' Endif |
||||||||
|
|
|||||||
IF EXIST('C:\Program Files\Avaya Modular Messaging\Client\vr.exe') if it is a patch, then yu will need to look in the reg to see if it makes a GUID in the add/remove program key. Otherwise, you will need to make a tag file or reg value to see if it exists prior to install and then set it afterward |
||||||||
|
|
|||||||
got it with this If Instr(@PRODUCTTYPE,"Windows XP Professional") If instr(@CSD, "Service Pack 2") IF EXIST("c:\Program Files\Avaya Modular Messaging\Client\vr.exe") SHELL '%comspec% /c "CPAU -u sssnt\Install -p Install1 -profile -ex "msiexec /i \\tahoe\packages\mmclientsp2.msi MASIP=192.168.5.40 /qn"' Endif Now all i need is for it to only run once on each machine. |
||||||||
|
|
|||||||
how about if I copy the patch installer to the local machine, have it check if it is existing, and if not run if. hwo the hell would i write that. |
||||||||
|
|
|||||||
tried this and it says Else without IF After the Endif statement If Exist("c:\MMClientSP2.exe") Endif Else If Instr(@PRODUCTTYPE,"Windows XP Professional") If instr(@CSD, "Service Pack 2") COPY "\\tahoe\packages\mmclientsp2.exe" "c:\" IF EXIST("c:\Program Files\Avaya Modular Messaging\Client\vr.exe") SHELL '%comspec% /c "CPAU -u sssnt\Install -p Install1 -profile -ex "msiexec /i \\tahoe\packages\mmclientsp2.msi MASIP=192.168.5.40 /qn"' Endif |
||||||||
|
|
|||||||
Because your If/EndIf structure is wrong. Here is maybe a better example, but not sure what you're really wanting. Also, please post using the UBB Tags to preserve the formatting of your code. Code: If Exist("c:\MMClientSP2.exe") |
||||||||
|
|
|||||||
I am trying to get it to skip the bottom command if the file at the begining is there. the line ;do nothign is my problem. if it finds file xx.exe it shoudl skip to the next set of commands and not install the patch. if i replace ;do nothing? with quit it quits the script adn doe snot run the rest. I want it to install a patch only if it is on windows xp pro with sp2 and only if it hasnt already been installed. |
||||||||
|
|
|||||||
Well then to stop it if it has already been installed you need to look for something to tell it that it has been installed either by maybe a registry check or a file check, otherwise you're currently not checking anything to see if it has already been installed. |
||||||||
|
|
|||||||
yes by the file it copies to c. the first time it runs it check to see fi that file is on c. if it is not it copies it and runs the package. If it is there it should. end. actually your script above works perfectly. i have .exe instead of msi in teh file it looks for. THANKS SO MUCH!!! |
||||||||
|
|
|||||||
Quote: Simplify this to Code:
|
||||||||
|
|
|||||||
Well simply because that file was copied there is not a very good indication that it was ever installed. I would personally look for something more concrete to determine if it was installed. Also you might want to remove the file after a successful update. |
||||||||
|
|
|||||||
I agree that is not the best way but is the easiest and quickest. I wouldn't know where to start as far as patch files. The initial program is easy as I can use it;s executable but the patch jsut updates files. what woudl i use to compare a file version? |
||||||||
|
|
|||||||
GetFileVersion ("file name",”versionfield”) $Result = GetFileVersion(@LDRIVE + "\Kix32.exe", "ProductVersion" ) Just find a file that is updated and see what the versions are on an updated one and one that is not updated. Then do a compare. |
||||||||
|
|
|||||||
...assuming the file is not in use at the time. |
||||||||
|
|
|||||||
i just compared all the files and none are changed. may be stuck with what i have. thanks fo ryour help btw. |
||||||||
|
|
|||||||
Sorry but I find that difficult to believe that nothing changed. Is this what you're installing or another update? AVAYA MODULAR MESSAGING MM2.0 Service Pack 3 Release Notes http://support.avaya.com/japple/css/japp...p;PAGE=Document |
||||||||
|
|
|||||||
You can also use REGSHOT to do a before and after update on a system to see what changes in the registry. |
||||||||
|
|
|||||||
http://support.avaya.com/japple/css/japp...5&PAGE=Document Just thought of the regshot while i was int eh bathroom lol. |
||||||||
|
|
|||||||
Quote: So should see those changes in the Registry |
||||||||
|
|
|||||||
I have no idea how to script any of those changes. Thats WAY over my head. |
||||||||
|
|
|||||||
hmm... makes me wonder if there is some buggie boo in move/copy. |
||||||||
|
|
|||||||
We can help Basically it looks like this application is saying it is adding some port exceptions to the Windows XP firewall. Take a look here HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\GloballyOpenPorts\List HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List Using RegShot on a system that HAS NOT been updated take the first snapshot. Then with RegShot still open, update one of the systems. Then take the 2nd snapshot, then review the differences. Then with your script you read the registry and look for the change if it's there or not. |