Day filter required

I have day value in the file : “HKEY_LOCAL_MACHINE\SOFTWARE\CRQ\Maintenance\Reboot”

Q: value “DayAlpha” of key “HKEY_LOCAL_MACHINE\SOFTWARE\CRQ\Maintenance\Reboot” of registry as string
A: Tue
T: 16226

Q:

Q: current date
A: Thu, 07 Mar 2019
T: 895

Q:

Requirement -

I want to filter first value (Thu) from current date & match with (value “DayAlpha” of key “HKEY_LOCAL_MACHINE\SOFTWARE\CRQ\Maintenance\Reboot” of registry) & once matched , I want to make it applicable . Please assist me here . Thanks .

1 Like

Hello goperiya1,

You might try to compare you registry value with the following relevance:

q: current day_of_week as three letters as string
A: Fri

Regards,
Vitaliy

1 Like

you can also take a count of uptime.

((uptime of operating system) / hour) >= 22

I use this to reboot systems in a subnet and that have a certain application installed to reboot every day between a time window.

Thanks Vitaliy .

I am getting value from Register . But one more challenge here is " First letter may be capital or small letter "

Ex :

Mon

mon

Currently I am using the following method to pull the value & compare . However I want to make sure if the value is even small letter in DayAlpha , that has to pass .

Q: ((current day_of_week as three letters) = ((value “DayAlpha” of it as string) of key “HKEY_LOCAL_MACHINE\SOFTWARE\CRQ\Maintenance\Reboot” of native registry))
A: True
T: 629

Q:

Try converting both to all-lowercase for the comparison
(current day_of_week as three letters as lowercase) = ((value “DayAlpha” of it as string as lowercase)

2 Likes

:triumph: Working .

I was trying to use case insensitive where I was failing :slight_smile: Thanks.