2

What is a Windows scripting language that: does not rely on .NET and offers the most OOP support and has simplest deployment?

It doesn't necessarily need to be a scripting language; It can be in the form of a compiled executable, however it needs to be self contained--only ONE file, no DLL's and it cannot be declared to "include" other files. I cannot rely on the user having any .NET installed and it needs to be able to run on Windows 7 64 bit.

By "most OOP support", I basically mean anything that has better OOP support than VBScript.

A little context: Everything I have done thus far is in VBScript and writes a bunch of data into an .html file, which in the end is to be viewed by Internet Explorer. It also zips up a bunch of directories and files. It heavily relies on accessing the registry, file-system, and WMI (I can probably do without accessing WMI though, as long as I have good registry access).

I can bring myself to write in any language so long as it meets me ridonkulous requirements stated above.

I look forward to some good answers from those more experienced than I.

4 Answers 4

4

Python has OOP Support. And no .Net. And pretty easy to install: double-click the MSI.

Sign up to request clarification or add additional context in comments.

6 Comments

It doesn't meet his requirement of "only one file" and "can't be declared to 'include' other files". Python uses import for most functionality, which requires it to look up a particular module.
@John Feminella: with py2exe or similar you can surely wrap everything (python interpreter, used libs, code, data, etc...) into one self-contained executable. +1 for the Python answer: would be a very good choice given the presumptions imo.
Ahh I was hoping someone would say Python! I think someone offers a COM module, too. However I need to iron out deployment--I would think that the user would need the interpreter engine installed and stuff.
@ChristopheD That's not completely reliable. For instance, you can load libraries dynamically, and if that's something your Python app uses, it will blow up at runtime. Still, I guess I agree that Python is a possibility, so +1.
Once Python is installed, a script can be single file. I have no idea if this meets the incomprehensible requirements "only ONE file, no DLL's and it cannot be declared to "include" other files"
|
4

I suggest AutoIt v3. It can be compiled to single exe, allows many things that VBS offers and many more. Has ability to build simple and complicated gui and works on all Windows systems (older ones are supported by older autoit v3 version, newest version supports win2k/xp and up). It supports both 32/x64.

Best of all is their forum. Much like SO where they help you with both simple and complicated tasks. It also has great helpfile which describes all commands and shows examples how to use them.

AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages (e.g. VBScript and SendKeys). AutoIt is also very small, self-contained and will run on all versions of Windows out-of-the-box with no annoying "runtimes" required!

AutoIt was initially designed for PC "roll out" situations to reliably automate and configure thousands of PCs. Over time it has become a powerful language that supports complex expressions, user functions, loops and everything else that veteran scripters would expect.

Features:

* Easy to learn BASIC-like syntax * Simulate keystrokes and mouse movements * Manipulate windows and processes * Interact with all standard windows controls * Scripts can be compiled into standalone executables * Create Graphical User Interfaces (GUIs) * COM support * Regular expressions * Directly call external DLL and Windows API functions * Scriptable RunAs functions * Detailed helpfile and large community-based support forums * Compatible with Windows 95 / 98 / ME / NT4 / 2000 / XP / 2003 / Vista / 2008 * Unicode and x64 support * Digitally signed for peace of mind * Works with Windows Vista's User Account Control (UAC) 

It may be not OO, but it can achieve your goals.

2 Comments

+1 for AutoIt. I use it all the time to get quick patches out. I'm able to write libraries, compile them all to a single Exe that doesn't require any particular framework, and I'm able to package files into the exe for deployment. Reading the registry, working with the filesystem, working with files... all child's play to AutoIt.
AutoIt with the use of AutoItObject gives you OOP with AutoIt. It is a very clever UDF/DLL combination. You can find more info about it here: autoitobject.origo.ethz.ch
3

Microsoft JScript

10 Comments

Note that this is essentially javascript for windows scripting, which is arguably worse for traditional oop than even vbscript.
@Joel - It may not be traditional OOP, but it does offer OOP.
Yes - I don't mean to detract and I did vote you up, but it cut to the heart of the question and so bore mentioning.
If I remember correctly at least JScript allows Inheritance, so a step up from VBScript I think
@Joel JavaScript has OOP: functions act as classes, variables can be private, it has inheritance, interfaces can be emulated, etc. I find it to be very OOP in nature, though not strict about it
|
-1

PowerShell is superb. Of course, you should have .NET. But look: it's already installed on Windows 7 and Vista, is widely used and has tons of docs and samples on the net.

1 Comment

I definitely would use PowerShell; if I knew everyone had .NET

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.