I am developing desktop application using C# and creating setup using Inno setup compiler.
Let me explain application functionality,
I have created application Setup using Inno Setup all user (i.e. application can install in admin/non admin PC).
//all user PrivilegesRequired=lowest
While installing application, I want to create registry key in
HKLM
. For this I have added registry key in Inno Setup script as below[Registry] Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\TestKey"; Permissions: users-modify; \ Flags: uninsdeletekey createvalueifdoesntexist; ValueType: string; \ ValueName: "SOAPAddress"; ValueData: "ABC"
While installing application registry key not created its throws below exception
--------------------------- Error --------------------------- Error creating registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\TestKey RegCreateKeyEx failed; code 5. Access is denied. Click Retry to try again, Ignore to proceed anyway, or Abort to cancel installation.
Please help me, How can I create registry key in HKLM
using Inno Setup compiler.
I had checked in VS2010 its create registry key but setup can't run non-admin PC.
Thanks in advance!