SimpleSi Posted November 8, 2006 Posted November 8, 2006 I am after making an app that presents an option menu that runs a batch file depending on which option is selected. (just a simple net use mapping command). Would you guru's recommend any of these wonderfull scripting languages or will I have to program something in a "proper" language. regards Simon
ChrisH Posted November 8, 2006 Posted November 8, 2006 With the newer versions of AuToIt you can have a user interface. http://www.autoitscript.com/autoit3/ Look half way down the page. Not a hard language to grasp.
ajbritton Posted November 8, 2006 Posted November 8, 2006 You can certainly develop a lovely user interface with AutoIT, but you need to get you head around how it works which, depending on where you are coming from, could take a while. The last time I needed to do this in a hurry, I used the JsForm.dll component which lets you create very simple forms from VB.
daveyboy Posted November 8, 2006 Posted November 8, 2006 If you know a little VBscript and a small amount of HTML why not use HTA's ? Microsoft HTA Center
NetworkGeezer Posted November 8, 2006 Posted November 8, 2006 Yeah AutoIt is probably the way to go. If you understand BASIC and GUI concepts it shouldn't be that difficult. There's also the .net languages. I suspect most clients will still be running 1.1 of the framework in which case you can use Visual Studio 2003 or SharDevelop to do WYSIWYG RAD. I wonder if Borland are still offering Delphi fee for non commercial use. That's another visual design option. @AJBritton Jsforms.dll looks good but what did you do about DLL registraton?
mac_shinobi Posted November 8, 2006 Posted November 8, 2006 if your going to use vbscript for this why would you get vbscript to call the batch files ? why not just use vbscript all the way , im not sure what you are using the net use mappings for ( Im assuming for mapping a network drive or something of the like, in which case check this out ) http://www.computerperformance.co.uk/Logon/Logon_MapNetworkDrive.htm As for the gui either a HTA or why not just do it all on a html page and include the vbscript inside of the html page that way it will just be a web based GUI and you can use it anywhere without having to install it or anything
NetworkGeezer Posted November 8, 2006 Posted November 8, 2006 if your going to use vbscript for this why would you get vbscript to call the batch files ? why not just use vbscript all the way , im not sure what you are using the net use mappings for ( Im assuming for mapping a network drive or something of the like, in which case check this out ) http://www.computerperformance.co.uk/Logon/Logon_MapNetworkDrive.htm I think the GUI part is the stumbling block. As for the gui either a HTA or why not just do it all on a html page and include the vbscript inside of the html page that way it will just be a web based GUI and you can use it anywhere without having to install it or anything Aren't there secuirty measures agains scripts interacting with the local system from a webpage?
mac_shinobi Posted November 8, 2006 Posted November 8, 2006 yeah you have to go to the advanced tab in internet options and change / tweak a few things but if your the creator of the script and you know what its for and doing then fair enough but you have a good point there though Digitally signed scripts ? *shrugs* I think thats hard though LOL, personally I've never done that so no clue on that digitally signed part
limbo Posted November 8, 2006 Posted November 8, 2006 Why not just do it in DOS all the way if that is what you are comfortable with? Try This Page for starters.
webman Posted November 9, 2006 Posted November 9, 2006 What about this, any good? A very basic AutoIt app that takes the list of batch files that can be run from a basic .ini file.batchlauncher.zip
ajbritton Posted November 9, 2006 Posted November 9, 2006 @AJBritton Jsforms.dll looks good but what did you do about DLL registraton? I assume you mean 'how to get it registered on lots of machines'. As it happens, I only needed that particular script to work on a server, so I didn't need to do it, but I regularly use some of Joe's other components (JsSys3) for scripting. I made an MSI for that, but you could do a simple startup script which checks to see if the file is on the PC, if not, copy it on and register it. Incidentally, Joe has lots of very useful 'classes' which can just be included in a script without the need for registration.
CyberNerd Posted November 9, 2006 Posted November 9, 2006 I would recommend Python. Python is both a "wonderfull scripting language" AND a "proper language" It is true multiplatform and can be used for gui programming, web, scripting, executables..... one of pythons advantages is that it is easy to learn. http://www.python.org/
acb_ Posted November 9, 2006 Posted November 9, 2006 If you know a little VBscript and a small amount of HTML why not use HTA's ? Microsoft HTA Center *nods* I wrote an HTA (my first) which sits at the corner of my screen and launches all sorts of stuff at the click of a button: log on history of user (full history or last event) log on history of machine (full history or last event) opens documents folder of user opens IE history of user displays information about user's profile size backs up and zaps user profile pings remote machine opens vnc session on remote machine displays MAC address of remote machine displays date remote machine was built logs current user off immediately reports timestamp of last startup fires up PSExec aimed at remote machine, also PSKill and PSList takes and saves a screen dump of the remote machine restarts remote machine kills/enables internet access on remote machine sends message to desktop of remote machine The concept started off as a bunch of batch files I summoned from the command line. Over time I've developed it and we stick stuff on it as and when we think it's a good idea. It's an invaluable tool for sitautions where a quick response is needed. I was amazed how easy it was to create something so useful
SimpleSi Posted November 9, 2006 Author Posted November 9, 2006 Thanks for all the replies - I'll need to have a look at them all later. Just for info - what I fully want to do is to display menu - select option - change mapping of P: drive depending on option - e.g. Class1 get P: drive set to \\server\shared\class1\pupils, Class2 get \\server\shared\class2\pupils etc. regards Simon
webman Posted November 9, 2006 Posted November 9, 2006 IIRC, AutoIt can handle mapping of drives, so it'd be possible to modify the code in the zip file I posted to do all this without running a batch file.
NetworkGeezer Posted November 9, 2006 Posted November 9, 2006 I wrote an HTA (my first) which sits at the corner of my screen and launches all sorts of stuff at the click of a button: The concept started off as a bunch of batch files I summoned from the command line. Over time I've developed it and we stick stuff on it as and when we think it's a good idea. It's an invaluable tool for sitautions where a quick response is needed. I was amazed how easy it was to create something so useful Go on post it then. Pretty please
Geoff Posted November 9, 2006 Posted November 9, 2006 Viruses often use HTA files, be careful when you do in them. Your AV solution may stomp on you.
browolf Posted November 9, 2006 Posted November 9, 2006 untested: ECHO 1. Class 1 ECHO 2. Class 2 ECHO 3. Class 3 ECHO 4. Quit. CHOICE /C:1234 /N choose Class IF ERRORLEVEL 1 SET class=1 IF ERRORLEVEL 2 SET class=2 IF ERRORLEVEL 3 SET class=3 IF ERRORLEVEL 4 goto END net use p: \\server\shared\class%class%\pupils :END you'd have to get choice.com from the NT reskit cos its not in dos anymore. http://www.robvanderwoude.com/choice.html
NetworkGeezer Posted November 9, 2006 Posted November 9, 2006 @browolf Remember kids will be using thing this so it's much to better to use a GUI rather than a command prompt window. I don't think choice works with Windows XP. You're probably thinking of 9x boot disks
mac_shinobi Posted November 9, 2006 Posted November 9, 2006 Just made me think , if you go to http://www.wisesoft.co.uk there is a script builder app that lets you map drives, assign printers etc that wiseman82 from this site made etc.
SimpleSi Posted November 9, 2006 Author Posted November 9, 2006 @webman Thanks for your effort but the zip file just seems to have an exe in it. regards Simon
webman Posted November 9, 2006 Posted November 9, 2006 Sorry, don't know how that happened. Have updated it now.
SimpleSi Posted November 14, 2006 Author Posted November 14, 2006 Thanks for all replies - I'm giving AutoIt a go based on Craig's script - Ta. regards Simon
acb_ Posted November 15, 2006 Posted November 15, 2006 I wrote an HTA (my first) which sits at the corner of my screen and launches all sorts of stuff at the click of a button: The concept started off as a bunch of batch files I summoned from the command line. Over time I've developed it and we stick stuff on it as and when we think it's a good idea. It's an invaluable tool for sitautions where a quick response is needed. I was amazed how easy it was to create something so useful Go on post it then. Pretty please OK, here you are. I've spent a little while annotating the code - you'll see we do things very much our way here. The code is scrappy and needs overhauling, but as it was my first attempt, and it has grown incrementally over time it was inevitable... Er, you use it at your own risk, of course lilacadmin.zip
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now