Being newbie with "Inno Setup" and "Inno Script Studio", I now want to Reg-Delete a Key that was created during one of the installations included in my installer. Meaning it should be the very last step, because the key will not exist at an earlier time of my install-routine.
Actually, I am only lacking the right Pascalscript-syntax.
I know how I can do this through the [Registry]
part, however then I wouldn't know how to do it as the last step.
[Registry]
Root: "HKLM"; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "Example"; Flags: deletekey
Through [Code]
section I tried this to make it the last step, but the compiler keeps telling me my command is unknown:
[Code]
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssPostInstall then
begin
Log('Installation finished. Deleting connection string.');
RegDeleteKey(HKEY_LOCAL_MACHINE, 'SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run', 'Example');
end;
end;
"RegDeleteKey" is not an existing command. By looking commands up, I only found "RegQueryStringValue", "RegWriteStringValue", "RegDeleteStringValue" (won't do the job) - it's all not what I'm looking for. I want to delete the key, no matter what's the value. In hopes that the solution is simple... thanks in advance.