In an Inno install script, I am setting an environment variable by adding an entry to:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment.
I want my users to be able to run the newly installed app without having to reboot (which would normally be necessary for the above change to be seen in the environment.)
I plan to have the installer use a dll to call SendMessageTimeOut, as discussed here: Set environment variables from Delphi (Win32).
Delphi XE2 reports this API is deprecated.
And the above StackOverflow thread suggests using SendNotifyMessage to avoid long waits. I don’t know how to construct that call.
Can anyone show me the syntax? Is it deprecated too?
Any suggestions on a better approach?
Tom
You might want to take a look at the ChangesEnvironment directive. From the docs: