/build/static/layout/Breadcrumb_cap_w.png

how to check for a registry value per batch and if not 0 then execute a scheduled task

as said id like a solution per batch if possible to check a certain registry value being 0 and if not for a scheduled task to be autoexecuted, thanks


0 Comments   [ + ] Show comments

Answers (3)

Posted by: flip1001 3 years ago
Black Belt
0

verify a reg value equals 0

on success, log "the value is 0"

remediation, SCHTASKS /RUN /TN "taskname"


Comments:
  • uhh ok , have an example batch , cause i really dont get how its supposed to look - tobsto occupied 3 years ago
Posted by: rileyz 3 years ago
Red Belt
0

Here it is in PowerShell!  

if ((Get-ItemProperty -Path 'HKCU:\Software' -Name Test).Test -eq 0) {
    Write-Output 'Reg key was 0, run task.'
    & SCHTASKS /RUN /TN 'taskname'
}
else {
    Write-Output 'Nothing to do here...'
}
Posted by: tobsto occupied 3 years ago
Senior White Belt
0

thanks

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ