Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

What scripting method would you recommend


Recommended Posts

Posted

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

Posted

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.

Posted

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?

Posted

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 :)

Posted
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?

Posted

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 :)

Posted
@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.

Posted

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/

Posted
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 :)

Posted

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

Posted
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.
Posted

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 :)

Posted

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

Posted

@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

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...