Archive: DeleteRegValue not working


DeleteRegValue not working
I have a very simple script that needs to delete some registry values. These are all values I created manually via administrator account, with the default permissions. The installer isn't removing them though, and I don't know why. I have checked the spelling several times over and confirmed that they do exist and that they are values, not keys.


Section
DetailPrint "Renabling Passive Zenworks Login..."
DeleteRegValue HKLM "Software\Novell\ZCM\ZenLgn" "DisablePassiveModeLogin"
DeleteRegValue HKLM "Software\Novell\ZCM\ZenLgn" "DisablePassiveModeLoginPrompt"

DetailPrint "Disabling Administrator Auto Login..."
DeleteRegValue HKLM "Software\Microsoft\Windows NT\CurrentVersion\Winlogon" "DefaultUserName"
DeleteRegValue HKLM "Software\Microsoft\Windows NT\CurrentVersion\Winlogon" "DefaultPassword"
DeleteRegValue HKLM "Software\Microsoft\Windows NT\CurrentVersion\Winlogon" "AutoAdminLogon"
SectionEnd

x64? SetRegView 64.

Edit: Also, are you running as an administrator? Use RequestExecutionLevel admin (and check the user is an admin in .onInit using UserInfo).

Stu


It was SetRegView 64. Thanks.
This is the first installer I've written for a x64 system and the 32/64 difference didn't occur to me.

RequestExecutionLevel admin was already set.