The following code is a peace of a script that is set up to be executed by InstallShield when installing my application: Custom Actions During Installation > After Register Product
Set wsShell = CreateObject("WScript.Shell")
wsShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\My Program\FilePath", "{the file path}"
When I run the script from command line it runs as it should and writes to the registry. But when I try to use the setup file it shows no errors, but the registry value is not set.
Why is it not working?
I'm running it as administrator.