Sendkeys Windows Key Batch

2) while you are downloading something that is long running and you are in a secure location. Project Description Provides SendKeys support for WPF UIElements (for in-process UI testing) Warning: this library will be of little use for most people, and it is NOT a replacement for the WinForms SendKeys functionality. WPF does not provide any alternative to the SendKeys class. If you start your script in cmd-window it works. Or maybe my copy of Windows 10 is too "up-to-date"? I need to do the same thing (use the enter key to input a command inside a batch file) but "sendkeys" has apparently been "demoted?" by Ms> as of a few moths ago (as best as I can tell. Tech support scams are an industry-wide issue where scammers trick you into paying for unnecessary technical support services. How do I handle this special case?--mark. Hey guys , Today I am going to share with you a Short but Cool Notepad Trick. NET Framework 1. exe and the associated commands, and how to write Windows batch scripts for the interpreter. Sendkeys Replacement for Visual Basic Publisher Review: Sendkey is a direct replacement for Visual Basic's Sendkeys which works under the Vista operating system. Is there something like SendKeys in PowerShell?. The SendKeys method is part of the WshShell object; the keys parameter contains the character or characters to send. Registry values can be queried to get their values and sub keys. The problem is that after running the. In addition, there is a delay between pressing a key and showing dialog. You can use SendKeys to send more than one keystroke at a time (CTRL+SHIFT+HOME, for example). The script works on Windows 7, 8 and Windows 10. Meaning that you can simulate the pressing of a key. It allows you to send keystrokes to another program. SendKeys "%{F}" - press Alt + F key (open file menu) For details of all the characters, please refer the following table. It allows you to gather the product keys used on computers across your whole domain. Code samples. batch script utils and examples by npocmaka -. Note that the Windows 7 Product Key found by Belarc or another key finder will be an SLP batch. It there any way to solve this problem. Unfortunately, I do not know what the batch name for it is. And just like the password utility, it is free! I checked it out, and it is a great way to grab serial numbers of Microsoft products. For example, when we put these symbols %^() the vbscript is gone an error, then we need to put them in braces so that these symbols will be accepted in vbscript (it will be this way: {%}{^}{(}{)}. SendKeys and Command prompt window problem I tested the script on Windows XP and on Windows 2000 with a Script but scripting a batch script wrapper for your. (However, note that this does not work in Windows 8. Note : For a Windows 64-bit, it's SndVol but for Windows 32-bit, the applet is called SndVol32. 1 Service Pack 1 to work correctly with User Access Control turned on and prevents the user from getting a SecurityException with. Following are the 3 tricks using which different keys can be set to toggle simultaneously. Sendkeys to batch file If this is your first visit, be sure to check out the FAQ by clicking the link above. exe, it says "press enter to continue". ^s means "Ctrl+s". If you start your script in cmd-window it works. If you need to send keys for e. batch script utils and examples by npocmaka -. Until that happens, Image Resizer for Windows is an excellent option that cleanly integrates into the File Explorer interface and offers users powerful resizing and. Art, I think Q gets a pass this quarter SO LONG AS guidance is raised in a meaningful way. Add admin privilege permission by selecting the “ Run with highest privileges ” box. SendKeys (strKeyString)The SendKeys method sends keystrokes to the active window. Specifically, after the batch file has launched Autohotkey and Macro Express, I want Autohotkey to send 'CTRL A' to Macro Express, [before the batch file does a DOS copy and a deletion]. Re: Windows 7 and Send Keys not working clearly I disagree. Quick reference for the Send( "keys" [, flag] ) Command. Simulate key press by user with SendKeys and PowerShell Scripting and security Operating Systems, software development, scripting, PowerShell tips, network and security. What I want to do is that when the form loads, the checkbox gets ticked (equivalent to left mouse click) (and the system will populate the screen accordingly). Running Stata for Windows in batch mode Author For Windows 8, go the the Desktop and use the Windows key + R on your keyboard to access Run. InstallHook() at System. Net using the Platform Invoke infrastructure. Sleep 700 WshShell. You can help protect yourself from scammers by verifying that the contact is a Microsoft Agent or Microsoft Employee and that the phone number is an official Microsoft global customer service number. Okay now that I've gotten that solved my last major hurdle is incorporating Windows Search. EXE and then spread. This is the most flexible way of generating keys, but it is also the most complex one. I believe the Windows Key is one that you can only access using a Windows API. SendWait method Reply. lwin) - which sends the left windows key to the application with the current focus - but apparently does NOT send it to the OS because I have been unable to get Windows to react to it. Diagnostics. The SendKeys method is part of the WshShell object; the keys parameter contains the character or characters to send. This environment just gives you a blank window with a blinking cursor and allows you to type the path to a script or program, followed by a list of parameters. A search for "batch file sendkeys" and further revision returned this list of answers for similar questions: How to make a batch file to run a hotkey; Batch file that changes URL in open browser; Press Keyboard keys using a batch file; Automatically respond to runas from batch file; The Batch file below do. Notepad will not let you easily enter control characters using the standard method of holding down the Alt key, then typing zero on the number pad, then the decimal value of the ASCII character you want. , %~dp0 gives the batch file’s drive and path). NET heading into the realm of windows hooks if you are looking to control Sendkeys and modifier keys;. On the Edit menu, click Add Value, type in Scancode Map, click REG_BINARY as the Data Type, and then click OK. SKOTechLearn describe the tips to easy solution of SendKeys() permission denied error in VB6. The enhanced security of Windows Vista (known as User Account Control or UAC) prevents the previous implementation from working as expected. Feb 26, 2013 · Windows 7 Activation. Without one of these, you won't be able to activate your device. EXE", 1) 'Run Norton WinDoctor. This book describes and shows how to use the Microsoft-supplied command interpreter cmd. It's a clean, minimalist way to run a script. At night, I always either log out of my Windows NT machine or lock the screen so no on SendKeys in batch file not working when logged out or screen locked - Microsoft: Windows - Tek-Tips. Bat Script To Activate Windows 7 Key? - posted in Programming: Hey all. If you upgrade your computer from Windows 7 or Windows 8 to Windows 10, you probably have no idea what your product key is for the latest version of the operating system. So, here are 15 cool Notepad Tricks you should try: 1. Step 4: Now run the batch file as administrator. Control-D On Unix, pressing the control key and D simultaneously logs the user out of the shell. There are about seven different editions of windows 7 free download. SendWait method Reply. txt file is opened. Ctrl modifier key: the following key is a control key % Alt modifier key: the following key is an alt key (keys) Modifiers apply to all keys ~ Send Enter key : k Send k Key (k is any single char) K Send Shift k Key (K is any capital letter) {special n} special key (n is an optional repeat count) {mouse x,y}. The Batch Menu works everywhere, but is exceedingly lame. The Windows command-line tools are used to perform various tasks related to Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows 7, and Windows Vista. The files can also be copied or moved to new locations based on information in the files. dll" or any other reference to it. I know that in VBS there was SendKeys command. Look for Change Product Key or Activate Windows link under Windows Activation section. Hey guys if you want you want to open websites in just 10 seconds then you are at the right place Notepad Codes had brought a very new trick for notepad to help you open sits in just 10 seconds ok now copy the code given below and pest is in notepad. Send one or more keystrokes to the active window as if typed at the keyboard. bat) to Word using the following commands:. In this post I'll discuss the installation of 'pywinauto' module and its dependencies. A search for "batch file sendkeys" and further revision returned this list of answers for similar questions: How to make a batch file to run a hotkey; Batch file that changes URL in open browser; Press Keyboard keys using a batch file; Automatically respond to runas from batch file; The Batch file below do. Then I could through windows task scheduler create a task which triggers on user lock and executes this batch file imitating the hotkey press. exe",1) This opens the Windows calculator application in a standard window with focus. Take Command is a comprehensive interactive GUI and command line environment that makes using the Windows command prompt and writing batch files easy, faster and far more powerful. BAT codes here !!!. Send virtual keystrokes using the Windows API SendInput. 0 to enable its use in applications that run on Windows Vista. 1 and 10: N, K and KN Special Editions. I lost a lot of time figuring out why my computer had gone crazy before I realized that the Windows key had not been released. The keystrokes are being sent to the active window. By default who is a window caption, use the /C switch to specify a window class. The Batch Menu works everywhere, but is exceedingly lame. How to Get the Windows Product Key via cmd in Windows. Send Key list. How to Speed Up Folder Deletion Times by 20x or More! The common way of deleting files and folders in Windows is via Windows Explorer (a. bat file) on Windows 10 to Excel 2016? For example, this link below provides an example on how to send keys in a batch script (. Microsoft platform migration, security and management solutions. SendKeys "{Enter}" WScript. What keys I need sent are to: Ctrl+Shift T > Copy all > Exit Can someone help me with what commands you would need in the batch file to send those keys?. For example, when you are learning how to open programs such as notepad, with a VBScript, you want some action, therefore you decide to send key strokes to notepad programmatically. If you are running mysql under Windows and have some special characters in the file that cause problems, you can do this:. We can see that many people are looking to call RaiseEvent from their tests and provide mock key and modifiers, however it seems. For example, to send the A key, you pass the character A in the key argument. Further, Universal apps don't work. I'll also discuss automation of notepad using pywinauto. Refer to the Microsoft Developer Network for a full list of SendKeys syntax options and usage methods (see Resources). NET heading into the realm of windows hooks if you are looking to control Sendkeys and modifier keys;. This script works fine, but I am having issues using SendKeys to move the windows to the monitors I want and maximizing them. WPF does not provide any alternative to the SendKeys class. I dont know what you are trying to do out here using the function keys. Consider using the quick key manipulation interface described in the previous subsection “The quick key. The following page is the detail about keys. Here is an example opening the Windows Calculator: x = Shell("calc. Sometimes to apply a Registry tweak, you need to first take ownership and control of the Registry key to be able to change the key value. One of the keys that the SENDKEYS method of WSH will not emulate is the Windows key (beside the ALT keys on a Windows keyboard). 8 Use Color Balance to Perfect Photos; 1. Send(" +(^{ESC}{LEFT})"); This is marginally distinct from your fifth trial, but that is what I understand from SendKeys. Write a SendKeys replacement which uses the Windows keybd_event command which will send keystrokes to a DOS application. I believe the Windows Key is one that you can only access using a Windows API. SendKeys (strKeyString)The SendKeys method sends keystrokes to the active window. Once in a while, when navigating through the grid with TAB key, I get this error: SecurityException: Unable to create Hook. 1 Create Stunning Panorama Photos; 2. Pressing Windows key cannot be simulated with another key. 1 and Windows 10. To check your Windows product key, start by opening up the Command Prompt program. vbs file: (this file will sendkeys for enter button with a delay of 3000 milliseconds) Dim oShell Set oShell = WScript. Free windows 10 item enter is available in the market, so you don’t have to stress over the actuation of Windows, only get Windows 10 Product Key Generator Free Download 2019. I need some mechanism l. SendKeys from VBA to a session window. To configure using the CTRL key, on any version of Windows (98, ME, XP, Vista and Windows server versions), open Control Panel \ Mouse. and we want to hear from you too! "Compared to the time and expense of professional service or the aggravation of trying to reset passwords yourself, Windows Password Key might be the least painful alternative. Action: Feasible I selected the Idea 6 as the site is authenticated in a browser window. 1 it works fine, but only if I have disabled completly the UAC via Registry (EnableLUA=0). I dont know what you are trying to do out here using the function keys. The script works on Windows 7, 8 and Windows 10. Simple Commandline to send Keystrokes member of the site and get a non-expiring license key for all of our Commandline to send Keystrokes (WinSendKeys). ), there is a nice free utility called AutoIt which can send keystrokes (and many more nice things) to a application. Note : The keys may be not the same for the various Windows version. Work around "Sendkeys" for Windows 10 solved Hi, I got this code that was generously shared, and it works great in windows 7 except when I tested it on Windows 10 it doesnt work at all!. ^ Ctrl ! Alt + Shift # Win. This script using mainly three methods Run, SendKeys and sleep. A better way to set registry permissions on a key and its' sub-keys, in batch. cs Project: ndp\fx\src\System. After you enter your log details properly compile into. 2) while you are downloading something that is long running and you are in a secure location. A brand new serial number is produced every time you’ll click the generate button. Don’t you think it would be fun if you could play with your friend by making his cd-drive pop again and again?. Great, you have done it! Your Office 2019 has been activated now. Send virtual keystrokes using the Windows API SendInput. Each key is represented by one or more characters. Just for the record, besides the language dependent issue, I tested using sendkeys, and it doesn't work (on my XP), the cmd prompt doesn't open the menu with ALT+SPACE (it works just fine with - say - Notepad). Wait Boolean value specifying the wait mode. SendKeys via Windows Scripting Host and this works very fine. Action: Feasible I selected the Idea 6 as the site is authenticated in a browser window. Hi, For now it opens the site but it does not enter the word to search. Microsoft will activate your Windows copy on its own (before July 29, 2016) and you'll receive a digital entitlement for Windows instead of a key. However I don't know how to write a batch file with keyboard commands in it. Summary: Use SendKeys to provide input to graphical applications with Windows PowerShell. This script works fine, but I am having issues using SendKeys to move the windows to the monitors I want and maximizing them. Windows Controls - SendKeys Modified on: Thu, 28 Jan, 2016 at 7:10 AM SendKeys('Key String'); Did. During automation, we are often required to press enter, control, tab, arrow keys, function keys and other non-text keys as well from keyboard. Windows Script Host. Is it possible I can change my product key with existing installation or I need to reinstall with the original CD?. The caret symbol (A) is used to represent Ctrl, and other special keys are specified by putting their names in curly braces. After you copy the SSH key to the clipboard, return to your account page. Photo Effects. A very simple sample of VBScript SendKeys on Windows 10. Checking windows registry keys in batch scripts by Michael Rickert on March 27, 2012 • 0 Comments Today I had to create a quick and dirty batch file script to fix some issues with WSUS on user machines. Step 4: Now run the batch file as administrator. SendKeys via Windows Scripting Host and this works very fine. Where to find your product key depends on how you got your copy of Windows. batch file update windows 7 product key Jun 28, 2015 · Your Windows license key will appear! This will work on Windows 10/ 8. You can use SendKeys to send more than one keystroke at a time (CTRL+SHIFT+HOME, for example). slmgr /ato (activate Windows Vista license and product key against Microsoft’s server) slmgr /upk (uninstall current installed product key and return license status back to trial state) slgmr /cpky (clear the product key from the registry to prevent disclosure attacks) slmgr /ilc (install license). The software allows you to merge large PDF files with the ability to arrange them in any order — right on your desktop. Now the user wants to save the file. It there any way to solve this problem. Scroll down to the bottom of the window that appears, and then, under Windows activation, click Change product key. Windows Text Editor for Conveniently Editing and Running Batch Files EditPad Pro is a powerful and versatile text editor that is perfectly suited to edit any kind of text file. Step 4: Now run the batch file as administrator. It is being invoked by a VBA application and I am unable to change the source code, it needs to be made to work. Anna, the script with "wshell. Key - A map of primary key attribute values that uniquely identify the item. Highlight entire public key within the PuTTY Key Generator and copy the text. WSH » wshshell » SendKeys Syntax: WshShell. Why is this happening? (A) There is a well known bug in all versions of Access involving SendKeys switching off the Numlock key. GitHub Gist: instantly share code, notes, and snippets. Depending on how you got a genuine copy of Windows 10, here are different ways to find Windows 10 product key. I've understood how to input certain keys into a window, such as the tab key: %SendKeys% "{TAB}" Or the backspace key: %SendKeys% "{BACKSPACE}" But I have been trying to input the Windows key without pressing it. Use the dos "EDIT" program to generate the proper code. It has nothing to do with UAC, there simply is no Win32 message passing between Desktop and Universal Apps. 1 and Windows 10. Here is a trick to use the lights of your keyboard in a more creative manner in Windows. The key commands I want to execute are global and I want them executed from the desktop. Learn more: How many parameters can I pass to batch file?. Deploy Registry Keys to Multiple Computers Using BatchPatch By Scott | Published: February 19, 2014 A systems administrator frequently needs to update the Windows Registry of every computer on his/her network. Key - A map of primary key attribute values that uniquely identify the item. Notepad will not let you easily enter control characters using the standard method of holding down the Alt key, then typing zero on the number pad, then the decimal value of the ASCII character you want. The number of executions and last execution date and time are available in these keys. Hi guys, if you come from the WinForms age you might know the SendKeys class and the SendKeys. In addition, there is a delay between pressing a key and showing dialog. NET, to run large-scale compute jobs in Azure. Solve a problem where Numlock is enabled in Microsoft Windows at startup with these steps. I noticed there is no "Sendkeys" in VB. By default who is a window caption, use the /C switch to specify a window class. How To Create A Batch File in Windows 10 02/05/2018 04/02/2017 by cicnavi Batch files can be used to store a series of commands which can then used by the command line interpreter CMD as an input. It's a useful tool if you know how to use it. You can get VBA to switch windows by sending Alt+Tab keystrokes too. doc This would be script to start search for all. Step 4: Now run the batch file as administrator. vbs) Basic tutorial on how to use sendkeys to send keyboard keys and commands too your computer. Sometimes to apply a Registry tweak, you need to first take ownership and control of the Registry key to be able to change the key value. The only thing I can suggest in this situation now is to try and use the Get-Product-Key powershell script from MS:. SendKeys "%{F}" - press Alt + F key (open file menu) For details of all the characters, please refer the following table. VBScripting - Pranks - You can find everything about. Or maybe my copy of Windows 10 is too "up-to-date"? I need to do the same thing (use the enter key to input a command inside a batch file) but "sendkeys" has apparently been "demoted?" by Ms> as of a few moths ago (as best as I can tell. The SendKeys method is not very reliable. Is there a way to send keys inside of a batch script (. Great, you have done it! Your Office 2019 has been activated now. SendKeys via keybd_event, but it doesn’t work. F7 key history The Unix history is part of the Bash shell. A digital license (called a digital entitlement in Windows 10, Version 1511) is a method of activation in Windows 10 that doesnt require you to enter a product key. The syntax for the delete operation is explained below with examples. This method is perfectly acceptable under normal circumstances, but becomes a real drag when dealing with large and complex folder structures. Simulate input/Keyboard You are encouraged to solve this task according to the task description, using any language you may know. Place the keystrokes in the Windows clipboard and use SendKeys to paste the clipboard's contents into the application. vbs" Finally, put sendkeys. Is there something like SendKeys in PowerShell?. Each key is represented by one or more characters. How to Use Array in Windows Batch Programming?We have to define variables using set and the length has to defined first. In addition, there is a delay between pressing a key and showing dialog. not one of the processed. which is shift + F10, however these types of automated keystrokes always tend to be buggy with sendkeys. You could actually use WScript. Toggle Keys is a pretty small but useful functionality of Windows, as it immediately lets you whenever Caps Lock, Num Lock and Scroll Lock keys are used, via audible alerts. Here is a list of best free music key finder software for Windows. Instead of this class you can use the InputManager…. Send("{tab}") End. Hi guys, if you come from the WinForms age you might know the SendKeys class and the SendKeys. Feb 26, 2013 · Windows 7 Activation. You can use the built-in Task Scheduler to schedule tasks, or use Folder Actions to set up events for folders. The script will also echo the built in product key aft. The following runs the notepad. and it includes the Windows Application Key (the context menu key), which sendkeys right mouse click Hi Mark, SHIFT + F10 does a right click, dont know if this. To logon to a remote machine you must press ctrl+alt+backspace. If you start your script in cmd-window it works. Then press the "ESCape" key. AWS Batch eliminates the need to operate third-party commercial or open source batch processing solutions. What keys I need sent are to: Ctrl+Shift T > Copy all > Exit Can someone help me with what commands you would need in the batch file to send those keys?. , %~dp0 gives the batch file’s drive and path). rem Start the other program in the same Window. It's a clean, minimalist way to run a script. whenever it comes to the step where (sendKeys) involved build gets failed status with following message. The solution is pretty simple and it was tested and works on Windows 8. The Windows API invocation can be done in. From Windows, open a new Administrator Command Prompt window and then enter the following syntax:. but every time when the program executes it asks for user input ( RUN or END ), either i have to click on run or hit enter key to start the program. AWS Batch manages all the infrastructure for you, avoiding the complexities of provisioning, managing, monitoring, and scaling your batch computing jobs. Batch Script. This book describes and shows how to use the Microsoft-supplied command interpreter cmd. Hi guys, if you come from the WinForms age you might know the SendKeys class and the SendKeys. Windows and Unix command line equivalents. Once in a while, when navigating through the grid with TAB key, I get this error: SecurityException: Unable to create Hook. The AppActivate method activates an application window. The Calculator in Windows 10 is a Universal app, unlike the old calculator. BAT codes here !!!. We have successfully done the following steps using UI API (i. Download Home. I would like to create the batch file from the program itself, when it first runs, as it can then write the value of "Application. Open up a command prompt window by clicking on the Start button on your Taskbar, then selecting Run , and type 'cmd' in the dialog box that appears followed by the OK button. It's a useful tool if you know how to use it. scripts development by creating an account on GitHub. 'pywinauto' in turn uses 'SendKeys' and 'ctypes' python modules. Write a SendKeys replacement which uses the Windows keybd_event command which will send keystrokes to a DOS application. You can do more with registry editor because registry editor is a pretty useful tool. If you need to send keys for e. txt file is opened. The script works on Windows 7, 8 and Windows 10. ANSI escape sequences have to start with the "ESCape" key. In the ‘Deploy’ window that appears click the triple-dot (…) button to select the batch file to deploy. On Windows I use PuTTY to log in to a remote server via SSH. This method is similar to the VB SendKeys method. vbs" Finally, put sendkeys. Batch files can be run from Windows Explorer but the console used to display them closes automatically at the end of the batch file, so a command at the end that prevents instantaneous exit is needed for any remaining output to be read before the console window closes. Take Command displays your command line applications in tabbed windows, with optional File Explorer-style integration for a visual look at your directories. Action: Feasible I selected the Idea 6 as the site is authenticated in a browser window. The following runs the notepad. There is no batch software or servers to install or manage. bat) is a text file of commands that is executed by the command line shell in either MS-Dos mode or MS-Dos. If your PC uses this, the product key on your PC–the one stored in the registry, and the one key-viewer applications display–will be different from the actual key your PC needs. EXE and then spread. Shell' Refresh desktop with a batch (no "Sendkeys F5") - Windows 7 Help Forums. Ever since I up graded to win 8. It is irritating to get a message of actuating Windows 10 by Microsoft (How to activate windows 10 without product key). exe and bring the notepad to the front. Follow the instructions to change your product key and activate your copy of Windows 7. I hate having to install misc. SendKeys "{ENTER}", True 'Hit Enter Unload Form1 I. ) Searching through the entire system there is no "sendkeys. How To Convert PDF To Excel Using VBA: Tutorial + 4 Code Examples By J. But it doesn;t process the Enter button. SendKeys Reference. You can use the SendKeys method in your VBA code, to simulate keystrokes that you would manually input in the active window. This script works fine, but I am having issues using SendKeys to move the windows to the monitors I want and maximizing them. NET Framework 1. In addition, Ctrl-Alt-End passes the Ctrl-Alt-Del key sequence to the remote RDP session to bring up the Windows Security dialog options screen. Key - A map of primary key attribute values that uniquely identify the item. VBScript - SendKeys Method - TechNet Articles - United States (English) - TechNet Wiki. This method is similar to the VB SendKeys method. I may be doing something wrong though. Hi there, I need to simulate pressing the Windows key and the d key with SendKeys. The caret symbol (A) is used to represent Ctrl, and other special keys are specified by putting their names in curly braces. SendKeys takes PChar as its first parameter and a Boolean as its second, like so: SendKeys ( 'KeyString' , Wait ) ; where KeyString is a string of key names and modifiers that you want to send to the current input focus and Wait is a Boolean variable or value that indicates whether SendKeys should wait for each key message to be processed. NET Framework 3. This utility is a tiny Microsoft® Windows® application of only one file, the SendKeys. SendKeys (strKeyString)The SendKeys method sends keystrokes to the active window. That's cool, I've searched the send key code in google and found this page. Hello! I am really frustrated on my vbscript and i am hoping AutoIt will be able to help me. Sendkeys och Windows-batch Problem Jag har ett skript som ändrar användarkatalogen och förfyller inmatningen med ett kommando, så han behöver bara se över och ändra värden innan du trycker på enter. First, the batch file will find the built in Windows 10 Key that is stored in WMI. Note that the modifier key is never released implicitly - either keyUp(theKey) or sendKeys(Keys. you can end the program at any time by opening task manager ( CTRL + ALT + DELETE) and going to the 'processes' tab, and ending 'wscript. Where to find your product key depends on how you got your copy of Windows. While I was testing this with Excel 2010 and Windows 7 I noticed that it was not working when I was stepping thru the code using F8 - but it worked when a clicked play on the macro or. A search for "batch file sendkeys" and further revision returned this list of answers for similar questions: How to make a batch file to run a hotkey; Batch file that changes URL in open browser; Press Keyboard keys using a batch file; Automatically respond to runas from batch file; The Batch file below do. slmgr /ato (activate Windows Vista license and product key against Microsoft’s server) slmgr /upk (uninstall current installed product key and return license status back to trial state) slgmr /cpky (clear the product key from the registry to prevent disclosure attacks) slmgr /ilc (install license).