|
I have a strange issue with using the deltree function within Windows 2003 terminal server which is fine on Windows 2000 terminal server. My objective here is to delete a reg key and then create it again, therefore pruning its subkeys.
The return code on the two commands is 0, meaning that the commands are successful as far as kiXtart is concerned, but this is not the case. Interestingly enough, this works correctly if the script is executed from within the 2003 terminal server session.
Here's the script:
DELTREE("HKEY_CURRENT_USER\Software\ComputerAssociates\eTrust\SSO\Client\6.5\Cache Users\Profiles\") ADDKEY("HKEY_CURRENT_USER\Software\ComputerAssociates\eTrust\SSO\Client\6.5\Cache Users\Profiles\")
I put this check before and after these commands to check for a value that I know exists. In both cases it logs "Searched for pykej and found pykej" therefore telling me that the "Profiles" key was never deleted.
$Check = ReadValue("HKCU\Software\ComputerAssociates\eTrust\SSO\Client\6.5\Cache Users\Profiles\pykej\ssoauth", "EnterpriseUserId" ) IF @ERROR = 0 ? "Searched for pykej and found $Check" ELSE ? "Could not find pykej" ENDIF
To confirm this, I then created a reg file that does the same job. This is the content of the reg file:
Windows Registry Editor Version 5.00
[-HKEY_CURRENT_USER\Software\ComputerAssociates\eTrust\SSO\Client\6.5\Cache Users\Profiles] [HKEY_CURRENT_USER\Software\ComputerAssociates\eTrust\SSO\Client\6.5\Cache Users\Profiles]
Instead, I ran this at the same point in the logon script with the check before and after: shell "cmd /c regedit /s \\dfcu-ho-ems\netlogon\reg\delSSOprofiles.reg"
For the first check, I got "Searched for pykej and found pykej" For the second check, I got "Could not find pykej" which confirms deletion.
The only problem is that I don't want these users to be able to run regedit.exe
I have done all testing with my own username and I am an administrator to this server. Anyhow, the key is current user, so there will be no permission issues there.
This may be an error with KiXtart. I upgraded to version 4.50 today, but previously it was 4.23. I don't know if this is a bug or due to something different about how 2003 handles the registry at logon. I do know that in 2003 I am able to set reg values as part of kix logon scripts
Any help on this one would be greatly appreciated.
Cheers
|