Computer Hope

Software => Computer software => Topic started by: slack7639 on January 06, 2018, 09:12:32 AM

Title: Can NirCmd get to the Windows Defender folder in Task Scheduler?
Post by: slack7639 on January 06, 2018, 09:12:32 AM
It seems like there's a security measure preventing sendkeys.  The title will "activate," but that's it.

Here's what I've tried in a .bat file . . . First, to simply see if I can send an arrow right, or plus key, to expand from where it starts when you open the Task Scheduler:

REM How to use NirCmd to get to "Windows Defender" in the Task Scheduler
REM It would be nice if you could make a Shortcut to it, but you can't
REM
REM For now, run this with the Task Scheduler open, to make it simpler
REM C:\Windows\System32\taskschd.msc
REM C:\Windows\System32\control.exe schedtasks
REM
REM What keys would get me there?
REM left, right, up, down, plus, minus . . . they navigate/open/close the sub-directories
REM
REM right OR plus
REM down 4 . . . to Microsoft
REM right OR plus
REM down 1
REM right OR plus . . . expands the Windows folder
REM down 87 . . . to Windows Defender

REM The following activates the window, but then the sendkey is not received
REM I give each command a second, for now, so I know that going too fast isn't an issue

"C:\Program Files (x86)\NIRCMD\nircmdc.exe" win activate ititle "Task Scheduler"
"C:\Program Files (x86)\NIRCMD\nircmdc.exe" wait 1000

REM This doesn't work:

"C:\Program Files (x86)\NIRCMD\nircmdc.exe" sendkey right press
"C:\Program Files (x86)\NIRCMD\nircmdc.exe" wait 1000

REM This doesn't work:
REM "C:\Program Files (x86)\NIRCMD\nircmdc.exe" sendkey plus press
REM "C:\Program Files (x86)\NIRCMD\nircmdc.exe" wait 1000

REM This doesn't work:
REM "C:\Program Files (x86)\NIRCMD\nircmdc.exe" sendkey right down
REM "C:\Program Files (x86)\NIRCMD\nircmdc.exe" wait 1000
REM "C:\Program Files (x86)\NIRCMD\nircmdc.exe" sendkey right up
REM "C:\Program Files (x86)\NIRCMD\nircmdc.exe" wait 1000

REM This doesn't work:
REM "C:\Program Files (x86)\NIRCMD\nircmdc.exe" sendkey plus down
REM "C:\Program Files (x86)\NIRCMD\nircmdc.exe" wait 1000
REM "C:\Program Files (x86)\NIRCMD\nircmdc.exe" sendkey plus up
REM "C:\Program Files (x86)\NIRCMD\nircmdc.exe" wait 1000
Title: Re: Can NirCmd get to the Windows Defender folder in Task Scheduler?
Post by: Salmon Trout on January 06, 2018, 12:37:21 PM
I am quite curious to know why you want to do this.
Title: Re: Can NirCmd get to the Windows Defender folder in Task Scheduler?
Post by: patio on January 06, 2018, 06:19:27 PM
And yet another new Topic...

You are on record setting pace for the same issue...