|
|
|||||||
How can I check if a Windows/Office updating was previously installed. Thanks. |
||||||||
|
|
|||||||
You could check the registry for installed apps and updates. Have a look at this registry key. Quote: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall |
||||||||
|
|
|||||||
I have used this code in a batch file Code: SET APP="MS07-013" REG QUERY HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall /s | FinD /i %APP% IF %ERRORLEVEL%=0 GOTO FOUND GOTO NOFOUND :FOUND ECHO. UPDATE/APP INSTALLED GOTO END :NOFOUND ECHO. UPDATE/APP NO INSTALLED :END I want to use a kix script but when i use the next line it doesn't work, I have used chr() function too Code: shell "cmd /c REG QUERY HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall /s | FinD /i $APP" Thanks |
||||||||
|
|
|||||||
You cannot just copy stuff from a batch script to a kix script. Have a look at ReadValue in the KiXtart manual that comes with every download. Quote: READVALUE Action: Reads a registry value and returns it as an ASCII string. |
||||||||
|
|
|||||||
"Find" requires the use of double-qoutes around the find string, thus your Code: shell "cmd /c REG QUERY HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall /s | FinD /i $APP" will not work. Try Code: shell '%COMSPEC% /c REG QUERY HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall /s | Find /i "' + $APP + '"' This also fixes the hardcoded CMD issue. I'd still rewrite the entire thing to run in kix, since you're only able now to know IF it was found, not WHAT. Look at trying Code: If KeyExist('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall') directly in Kix. Glenn |