DIGIT-ARC read-only archive · snapshot: July 23, 2026

How to make batch file?

7 posts · originally from https://geek.digit.in/community/threads/how-to-make-batch-file.145143/

mayoorite
mayoorite Original post #1
Aug 15, 2011 at 1:24 PM
Hi!
I need help to make a batch file to run "ctrl+alt+right arrow". or to rotate screen.
Please reply.
A
Aug 16, 2011 at 7:23 PM
Which OS?
Vyom
Vyom #3
Aug 16, 2011 at 8:22 PM
@OP: I can't say if you can create a batch file for this purpose, but you can make a simple VB script to the same purpose, and call that from a batch file. (Assuming you are using Windows XP).

If you want to create the script, following would be the best page to do that:
Microsoft Windows 2000 Scripting Guide - Sending Keystrokes to a Program

Tell me, if you were unable to make it, since I got successful in making one. :)
Anorion
Anorion #4
Aug 16, 2011 at 9:19 PM
just save the extension as .bat in ur text editor
Vyom
Vyom #5
Aug 16, 2011 at 10:02 PM
@Anorion: If speaking to OP, then I really thinks he know how to make a batch file, what he may not know are commands to execute to invoke that shorcut.
If you were referring to me, then.. thanks, I would try renaming .vbs to .bat to create a batch file from vbs script file.

Edit: No It doesnt work that way. :S
mayoorite
Aug 16, 2011 at 11:27 PM
@OP: I can't say if you can create a batch file for this purpose, but you can make a simple VB script to the same purpose, and call that from a batch file. (Assuming you are using Windows XP).

If you want to create the script, following would be the best page to do that:
Microsoft Windows 2000 Scripting Guide - Sending Keystrokes to a Program

Tell me, if you were unable to make it, since I got successful in making one. :)
I will try and reply in one or two days.
Anorion
Anorion #7
Aug 16, 2011 at 11:54 PM
yeah its overkill for a batch file, but I was just answering OPs question
the vbs can be added to a batch file using

Code:
@echo off
start c:\keystrokes.vbs

orr add the .vbs directly to the registry or startup folder