Scripts Thread, What scripting method would you recommend in Coding and Web Development; I am after making an app that presents an option menu that runs a batch file depending on which option ...
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.
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.
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?
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 )
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
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 )
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?
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
@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.
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.
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
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.