|
I'm using KiXtart to determine if the workstation has Altiris (a Syamntec workstation management solution) pointing to an old server and if it does it uninstalls and then installs the new version. The script will also install the agent if no agent is installed. I'm using the "KeyExist" KiXtart Function to check if it's installed at all and it keeps reporting the key exists - even when it does not. What's really odd is I tested with a random string and it reports that key does not exist. In other words....
KeyExist("HKLM\Software\Altiris") - will return a "1" even if the key does not exist
KeyExist("HKLM\Software\dfyjhr7j7565j76") - will return a "0" which is accurate
The custom function I'm running is pretty simple:
Function SwitchAltiris($old,$uninstall,$install) If ReadValue("HKLM\Software\Altiris\Altiris Agent\Servers","")=$old Shell $uninstall Sleep 30 EndIf If KeyExist("HKLM\Software\Altiris")=0 Shell $install EndIf EndFunction
Any idea why KiXtart is reporting the non-existant key exists?
FYI - I get a false positive even if the key does not exist when the script is executed.
|