Enter the key into the registry if the user has NOT selected the task

The task is defined as:

Name: "TaskAutoLogon"; Description: "{cm:TaskAutoLogon}"; Flags: unchecked

      

the user can choose whether to write the key to the registry as follows:

Root: HKLM; Subkey: SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon; ValueType: dword; ValueName: AutoAdminLogon; ValueData: 1; Tasks: TaskAutoLogon

      

My question is: How can I tell Inno Setup to write this key to the registry only if the job is NOT selected / checked? I practically want to invert the Task value.

I know it can be done with some code in the [code] section, but I hope there is a more native way to do it.

Thanks in advance!

+3


source to share


1 answer


There is no script code here. The parameter Tasks

supports an operator not

, so you can write Tasks: not TaskAutoLogon

to process your entry when no task is selected:



[Registry]
Root: HKLM; Subkey: SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon; ValueType: dword; ValueName: AutoAdminLogon; ValueData: 1; Tasks: not TaskAutoLogon

      

+4


source







All Articles