I want to write installer for the application which is designed for x64 Windows 10. I have defined in Inno Setup Script:
[Setup]
MinVersion=10.0.14393
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64
AlwaysRestart=yes
Also I want that during the installation, long paths will be enabled in Windows registry. I added following code:
[Registry]
Root: HKLM64; Subkey: "System\CurrentcontrolSet\Control\FileSystem"; ValueType: dword; ValueName: "LongPathsEnabled"; ValueData: "1"; Flags: createvalueifdoesntexist; Permissions: users-modify
Root: HKLM64; Subkey: "System\ControlSet001\Control\FileSystem"; ValueType: dword; ValueName: "LongPathsEnabled"; ValueData: "1"; Flags: createvalueifdoesntexist; Permissions: users-modify
When I run the installer on my personal computer and restart, registry entries are changed, but when my colleague runs the installer and restarts, entries are not changed. The application itself works on both our computers. We both have x64 Windows 10 systems and administrator rights. What might be the reasons this script is failing on some computers?
The log file content for the computer, where entries are not changed:
2019-10-09 09:44:41.296 Key: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\FileSystem
2019-10-09 09:44:41.296 Value name: LongPathsEnabled
2019-10-09 09:44:41.296 Setting permissions on key: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\FileSystem
2019-10-09 09:44:41.296 Starting 64-bit helper process.
2019-10-09 09:44:41.328 Helper process PID: 3248
2019-10-09 09:44:41.343 Creating or opening the key.
2019-10-09 09:44:41.343 Successfully created the key.
2019-10-09 09:44:41.343 -- Registry entry --
2019-10-09 09:44:41.343 Key: HKEY_LOCAL_MACHINE\System\ControlSet001\Control\FileSystem
2019-10-09 09:44:41.343 Value name: LongPathsEnabled
2019-10-09 09:44:41.343 Setting permissions on key: HKEY_LOCAL_MACHINE\System\ControlSet001\Control\FileSystem
2019-10-09 09:44:41.343 Creating or opening the key.
2019-10-09 09:44:41.343 Successfully created the key.
PrivilegesRequiredflag in the[setup]section? - Andrew Trucklecreatevalueifdoesntexistso if the key value is already there it will not be reset to the installer value. - Andrew Truckle