troubleshooting Question

How to bring Hotkeyz.exe into focus and send it an Alt+F4 with a VBScript

Avatar of Rebel_no_1
Rebel_no_1Flag for China asked on
VB ScriptMicrosoft DOS
3 Comments1 Solution734 ViewsLast Modified:
I have a straightforward issue:
I launch Hotkeyz.exe with a dos .bat script (Start /MIN Hotkeyz.exe) and have configured the program to go "Hidden" when I click on the close button or Press Alt+F4 on it. Therefore it doesn't close, but goes hidden, which is what I want. The problem is that it launches but it is still just minimized and not closed. The issue is that a user can then ALT+TAB to it and perform unwanted actions. Therefore I need only the following:
I need a simple vbscript which would bring into focus the Hotkeyz.exe application (Which will be minimized) and send it an Alt+F4. After this the vbscript must just close. This would then effectively tell the program to go "Hidden" and avoid the users from Alt+Tab'ing to it and potentially editing and breaking the Hotkeyz.exe app settings. (Intentionally or unintentionally) I would prefer if this script can be compatible with Windows XP and above. Please let me know if any further information is required.
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros