# Graphical menu for batch files.

August 19, 2009 at 12:28:53
Specs: Windows XP Pro SP3
 Someone knows any tool that can easily create a launch menu in graphic style? (and doesnt require any installation)I have developed a bat to moderate my 7 years old son in his ativities in the web. With passing of the time this bat became elaborated and I want to set a prettier menu to launch user options.I had already made pretty menus to bat using html + activeX resources (WinXP SP1), but I am using now SP3, and it blocks attempts to launch applications from a HTML page.Would appreciate any suggestion.

See More: Graphical menu for batch files.

#1
August 19, 2009 at 16:55:25

Report •

#2
August 19, 2009 at 18:04:52
 Mattio, I thank you for your good wish, but I want a graphical style menu that allows use of the mouse. There must be some handy tool tailored for this need.Personally it dont matter to me, but people in general are so habituated to graphical aplications that they get shocked when they see a text mode application. They find strange and reject it at first sight.

Report •

#3
August 20, 2009 at 06:08:54
 Then you're out of luck if you want to stick only to batch files. VBScript can spawn an Internet Explorer window, and use that to display a web-like GUI, though.

Report •

Related Solutions

#4
August 20, 2009 at 08:50:13
 Razor, perhaps my words were not clear (my skill in English is not up to the mark).I need a menu to launch applications (exe, com, bat), not links to web.In the next months I will be very occupied with other pressing duties. I am not able to learn any programming language by now. That is why I am looking for an easy solution for a very specific need. I hope that somewhere in the net there is a simple tool that can handle this simple task.

Report •

#5
August 20, 2009 at 09:09:20
 I need a menu to launch applications (exe, com, bat), not links to web.Don't confuse the interface with the behavior. Your script can do anything it wants, even if it uses Internet Explorer as the interface.

Report •

#6
August 20, 2009 at 09:33:04
 For this your better off using VB.In VB you can drag and drop buttons and text fields whatever you want.& it's very easy to learn so you won't have to spend a long time reading up code for it. You can get lots of simple tutorials on youtube and by searching on google.Also, VB can be compiled into 1 .exe file so it's easy to just run & drag onto external memory.***************************Need BatchFile Help ?Msg me :)***************************

Report •

#7
August 20, 2009 at 22:02:21
 Mattio: thank you the encouragement. I will really examine the practicability of spent some time on this effort.Razor: can we launch an executable or a batch (in our own computer) by clicking on a html link, without editing registry?

Report •

#8
August 21, 2009 at 11:35:32
 No, but you can use VBScript to spawn an instance of IE, and then monitor the events raised in IE's DOM.I had a little time this afternoon, so I threw together this crude example:Option Explicit Dim ie, shell, ieQuit, list Set list = CreateObject("Scripting.Dictionary") With list 'Add your elements here. The display value first, then the action .Add "Command Prompt", "cmd" .Add "C:\text.txt", "notepad c:\text.txt" .Add "Calculator", "calc" .Add "Paint", "mspaint" End With Set shell = CreateObject("WScript.Shell") Set ie = WScript.CreateObject("InternetExplorer.Application", "IE_") ieQuit = False WScript.Quit Main Function Main() Dim doc, menu, li, a, l ConfigIE(ie) Set doc = ie.Document Set menu = doc.getElementByID("menu") For Each l In list Set li = doc.createElement("li") Set a = doc.createElement("a") a.innerHTML = l a.href = list(l) Set a.onClick = GetRef("RunCMD") li.appendChild a menu.appendChild li Next 'l 'Main() must now sleep until the IE window closes. Do Until ieQuit WScript.Sleep 1000 Loop End Function Sub ConfigIE(ie) Dim ul With ie .Navigate "about:blank" .Document.Title = "Some Menu Thing" .ToolBar = False .StatusBar = False .Width = 800 .Height = 500 With .Document.ParentWindow.Screen ie.Left = (.AvailWidth - ie.Width ) \ 2 ie.Top = (.Availheight - ie.Height) \ 2 End With Set ul = .Document.createElement("ul") ul.id = "Menu" ie.Document.body.appendChild ul .Visible = True End With End Sub ' **** Event Handlers **** Sub RunCMD() ie.Document.parentWindow.event.returnValue = False shell.Run ie.Document.parentWindow.event.srcElement.href, 1, False End Sub Sub IE_OnQuit() ieQuit = True End Sub

Report •

#9
August 21, 2009 at 19:47:58
 Razor, thank you very much for your help. This VBscript will certainly be usefull in my purpose. You save me a lot of time in searching the web, looking for a needle in a haystack. Thank you.

Report •