2

I'm running Windows 10, Version 10.0.19045 Build 19045 (22H2).

This VBS script below used to work until today to change my Windows background to the Next Background but suddenly it will only popup the standard "Open... Properties" dialog along with a VBScript window containing the script, but will not execute the keystrokes.

set WshShell = WScript.CreateObject("Wscript.Shell")
WshShell.SendKeys("^ ")
WshShell.SendKeys("+{F10}")
WshShell.SendKeys("n")

I checked HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Script Host\Settings and HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows Script Host\Settings entries and both are enabled (1)

I can execute a simple VBS script like MsgBox ("Hello World") so it appears vscript.exe is working.

This is what I get when I dbl click (execute) the script

ChanganAuto
  • 1,511
  • 3
  • 15
  • 19
mapper
  • 21

1 Answers1

2

The issue started when you installed PowerToys. Specifically, the PowerToys Peek utility.

The default activation shortcut for Peek is Ctrl-Space.

Your script sends a Ctrl-Space. That's why Peek opens up. You can either disable Peek or change it's activation shortcut in Settings. Here, you can see I changed it to Ctrl-Alt-Space:

enter image description here

LesFerch
  • 439