Richard Fletcher
asked on
Applying Negative Value on a DWORD
Hi
I am looking for advice on the following:
I have an issue within my Citrix VDI environment, that when VDI Desktops not in use are powered off for a pre-longed period of time, they automatically get placed into Maintenance mode. According to a Citrix article there is a DWORD to amend to be able do disable this behviour, which involves changing to a NEGATIVE value. I can't see how this is done as my undserstanding was a DWORD can only accept a 0 upwards:
xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxx
DesktopServer\MaxFailedReg istrations Allowed
DWORD
2
Controls automatic placement of power-managed VMs into maintenance mode following repeated failures to register with a DDC.
If a VM is started-up by the broker service but fails to register after the period defined by the MaxRegistrationDelayMin setting (default 20 minutes), it is shutdown again.
The MaxFailedRegistrationsAllo wed value defines the maximum number of times that this start-up, registration failure, shut down cycle is allowed to repeat before a subsequent registration failure causes the VM to be automatically placed into maintenance mode.
The default value of 2 means that if the VM fails to register 3 times in succession, it will be automatically placed into maintenance mode.
Setting MaxFailedRegistrationsAllo wed to a negative value (0xFFFFFFFF) disables this behavior and prevents VMs from ever being automatically placed into maintenance mode.
xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxx
Can anyone direct me on how to input a negative value?
Thanks
I am looking for advice on the following:
I have an issue within my Citrix VDI environment, that when VDI Desktops not in use are powered off for a pre-longed period of time, they automatically get placed into Maintenance mode. According to a Citrix article there is a DWORD to amend to be able do disable this behviour, which involves changing to a NEGATIVE value. I can't see how this is done as my undserstanding was a DWORD can only accept a 0 upwards:
xxxxxxxxxxxxxxxxxxxxxxxxxx
DesktopServer\MaxFailedReg
DWORD
2
Controls automatic placement of power-managed VMs into maintenance mode following repeated failures to register with a DDC.
If a VM is started-up by the broker service but fails to register after the period defined by the MaxRegistrationDelayMin setting (default 20 minutes), it is shutdown again.
The MaxFailedRegistrationsAllo
The default value of 2 means that if the VM fails to register 3 times in succession, it will be automatically placed into maintenance mode.
Setting MaxFailedRegistrationsAllo
xxxxxxxxxxxxxxxxxxxxxxxxxx
Can anyone direct me on how to input a negative value?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
oBdA is correct. Values in DWORDs are just values without a mandatory interpretation.
If the DWORD is treated by whatever reads it as unsigned, nothing will make it negative.
If the DWORD is treated as signed, when the high bit 80000000 is set it's negative.
Whatever reads the DWORD can treat the value in it either way.
If the DWORD is treated by whatever reads it as unsigned, nothing will make it negative.
If the DWORD is treated as signed, when the high bit 80000000 is set it's negative.
Whatever reads the DWORD can treat the value in it either way.
ASKER
This worked perfectly. Thankyou
As you said you can not add negative value to registry directly, but you can try with some wsf/vb script. Try this method and see if this helps?
https://social.msdn.microsoft.com/Forums/en-US/f9b0271f-5a0f-44f1-8a58-9b321756bd9d/solved-highest-value-for-regwrite-regdword?forum=scripting
PS - I haven't tested it though