Batch file

hello,

i would like to create GUI inorder to run Batch file (bat), i dont have any programing background, however i have Visual studio installed.

1. what is the best way to bulid GUI for batch file in this senario, can visual studio could run windows command like xcopy? if yes how?
2. is there any easy way to create GUI for batch file in other way?

Best Regards,



Hi Robert,
I strongly recommend AutoHotkey (free!) to create GUI solutions:http://www.autohotkey.com/

It is easy to learn and use, without requiring extensive programming skills. If you want to get a sense of the kind of GUI that can be created quickly, take a look at these EE articles:
How To Combine-Merge-Append a Large Batch of TIFF Files
http://www.experts-exchange.com/Web_Development/Document_Imaging/A_10745-How-To-Combine-Merge-Append-TIFF-Files-in-Batch-Mode.html

How To Rename-Move a Batch of PDF Files Based on Contents of the Files
http://www.experts-exchange.com/Software/Misc/A_11173-How-To-Rename-Move-a-Batch-of-PDF-Files-Based-on-Contents-of-the-Files.html

How To Split-Rename-Move a Batch of PDF Files Based on Contents of the Files
http://www.experts-exchange.com/Software/Misc/A_11211-How-To-Split-Rename-Move-a-Batch-of-PDF-Files-Based-on-Contents-of-the-Files.html

All of the GUI screens in those articles were developed in relatively simple AutoHotkey scripts (which are attached to the articles). Also, when you install AutoHotkey, it comes with a compiler that easily makes an executable (.EXE) – simply right-click on the source code file (.AHK) and select Compile Script. I have tested its .EXE files in 32-bit XP, 32-bit W7, 64-bit W7, and 64-bit W8 – all run perfectly.

In terms of running Windows commands like xcopy, that is easy to do with the Run and RunWait commands (see code in the articles mentioned above). Also, numerous file manipulation commands are built into AutoHotkey, so you don't always have to call a Windows command. Examples are FileCopy, FileCopyDir, FileCreateDir, FileDelete, FileMove, etc. You may see the command list here:http://www.autohotkey.com/docs/commands.htm

If you want to do really fancy GUIs, the doc is here:http://www.autohotkey.com/docs/commands/Gui.htm

But for lots of GUI stuff, you don't need these advanced features.

If you have problems along the way, there's a very active user forum that is extremely helpful:http://www.autohotkey.com/board/

Regards, Joe



Hi Robert,
I strongly recommend AutoHotkey (free!) to create GUI solutions:http://www.autohotkey.com/

It is easy to learn and use, without requiring extensive programming skills. If you want to get a sense of the kind of GUI that can be created quickly, take a look at these EE articles:
How To Combine-Merge-Append a Large Batch of TIFF Files
http://www.experts-exchange.com/Web_Development/Document_Imaging/A_10745-How-To-Combine-Merge-Append-TIFF-Files-in-Batch-Mode.html

How To Rename-Move a Batch of PDF Files Based on Contents of the Files
http://www.experts-exchange.com/Software/Misc/A_11173-How-To-Rename-Move-a-Batch-of-PDF-Files-Based-on-Contents-of-the-Files.html

How To Split-Rename-Move a Batch of PDF Files Based on Contents of the Files
http://www.experts-exchange.com/Software/Misc/A_11211-How-To-Split-Rename-Move-a-Batch-of-PDF-Files-Based-on-Contents-of-the-Files.html

All of the GUI screens in those articles were developed in relatively simple AutoHotkey scripts (which are attached to the articles). Also, when you install AutoHotkey, it comes with a compiler that easily makes an executable (.EXE) – simply right-click on the source code file (.AHK) and select Compile Script. I have tested its .EXE files in 32-bit XP, 32-bit W7, 64-bit W7, and 64-bit W8 – all run perfectly.

In terms of running Windows commands like xcopy, that is easy to do with the Run and RunWait commands (see code in the articles mentioned above). Also, numerous file manipulation commands are built into AutoHotkey, so you don't always have to call a Windows command. Examples are FileCopy, FileCopyDir, FileCreateDir, FileDelete, FileMove, etc. You may see the command list here:http://www.autohotkey.com/docs/commands.htm

If you want to do really fancy GUIs, the doc is here:http://www.autohotkey.com/docs/commands/Gui.htm

But for lots of GUI stuff, you don't need these advanced features.

If you have problems along the way, there's a very active user forum that is extremely helpful:http://www.autohotkey.com/board/

Regards, Joe



Are you wanting a batch file that is a GUI to run other batch files/executables or just some type of GUI that will list batch files that you can run?

You can create a batch file GUI as simple or complex as you want. Using extended ASCII characters I once created a GUI that looked like an old IBM PC. The "menu" was created to display on the actual monitor and even had blinking lights for the floppy disk drives. Of course that GUI was back when a computer booted into DOS first and then you started Windows as an application. I actually had Windows as one of the menu options. :)

If you are looking for a windows based GUI that lists the batch files so that you can select them then you can do that with lots of other programs including WMI.



Hi,

i have some bacth files i created in order to backup local Profile etc.... i would like to send it to my users, and i wanted to know how can i created GUI for it (something simple with two button - backup - that run the backup script, and restore button to run the restore script.

the batch file is very simple based on xcopy.

to send it with GUI will be more appropriate then send it as batch file with extension *.bat



Now it depends on how elaborate you want to get.

Simple:
http://www.sevenforums.com/tutorials/78083-batch-files-create-menu-execute-commands.html

Complex:
http://technet.microsoft.com/en-us/library/ee692768.aspx

There are other options using vbscript and such that might fall somewhere between.



Robert,
Here's the code for a simple approach with AutoHotkey:

Share this

Related Posts

There was an error in this gadget