views:

261

answers:

10

Linux user - Windows noob alert ;)

Could someone recommend me scripting/programming language that's functional and works on all Windows (let's focus on XP, maybe Vista too) machines without additional installation? Something that won't make me install new things to run code.

For example on Linux I have shell (heh) and can code basic things without installing anything; python is usually installed by default and I can use it without installing anything, etc. I'm searching for something like this for Windows (I guess that if I wanted to use python on Windows I would have to install it first).

...bat files? Is this used at all now?

.NET (for, let's say C#) isn't installed by default, I guess?

Something else?

+11  A: 

VBScript and JScript are two such languages.

RichieHindle
i think that might be what i'm searching for, will have to check these :)
Phil
+4  A: 

Powershell.

Does require an installation, but well worth it.

John Weldon
Er, doesn't that go against one of his key points, that he not have to install anything? Would be fine for Windows 7, since no install necessary there, but that's not exactly standard yet.
Sarah Vessels
yeah, exactly. i'm searching for something universal.
Phil
Then probably cscript is your best option, but you'd be giving up a LOT of convenience :)
John Weldon
cscript being the script host for VBScript and JScript.
John Weldon
+6  A: 
  • you can use batch files withount any additional software
  • PowerShell is included in Windows 7 (RC) by default and cannot be uninstalled; with XP/Vista you need to install it
dfa
hmmmm, nice to know that it's enabled by default in win7
Phil
+1  A: 

cmd

VbScript will work but you probably want to go through the pain of installing powershell.

This may be surprising to you as installing windows software involves double clicking the installer.

In all seriousness though if you're going to learn a new shell for windows, learn powershell, very very good.

Spence
This may be surprising to you: http://www.psychocats.net/ubuntucat/software-installation-in-linux-is-difficult/
Sarah Vessels
well, i'm debian user so for me install usually involves apt-get install packagename ;). i prefer linux but i have to say i'm not big fan of compiling programs on linux (i hope other distro users won't kill me now ;)
Phil
+1 because I respect good smackdown :). It's true though I do love the combined package managers in modern linux distros.
Spence
+1  A: 

For XP and Vista, you can stick with the enhanced functionality in the cmd.exe shell scripts.

Sinan Ünür
that's interesting...
Phil
+1  A: 

BAT files are still used as well.

Powershell is supposed to replace VBS and JS as the scripting language of choice on Windows machines but I'm not sure if you can assume it's present yet. .Net 1.0 is a pretty safe bet though.

Spencer Ruport
+2  A: 

What about Windows Script Host?

merkuro
Wow, that's interesting... So many good answers (except powershell on versions below win7 ;]), everyone talking about different good thing, though... I'll vote up each interesting answer.
Phil
A: 

PowerShell, without a shadow of a doubt. It's the future (and fortunately also the present) of scripting on Windows.

Download PowerShell

Gregory Higley
+1  A: 

As a Linux user I think you will like portablepython.

tron
that's awesome... i assume i can just extract it to dir on hd... would solve my problem
Phil
Yes, that's right. Enjoy.
tron
might as well get the whole distribution that contains lots more useful modules.
ghostdog74
A: 

@OP if you want a "universal" scripting language, why don't you try out Python (for windows, go to ActiveState Python). (Or even Perl/Java etc) As for using batch, powershell, vbscript, the one minor thing to take note is that scripts written in them are not portable to *nix. therefore, cannot be considered "universal"

ghostdog74
yeah, that's an issue... i try to limit learning curve and avoid learning language that i would use on only one platform, but most important thing for me is making my program run on every standard winxp/vista install without need to prompt user to install additional packages... so i guess portable python is fantastic in this case. although if not it, i would use something like bat scripts or vbscript even though it has learning curve - most important is portability on desired systems. i'll look into portable python and see how it goes...
Phil
*steep learning curve (du-oh, sorry, writing too fast ;)
Phil
@Phil,actually, if you use portable python, aren't you going to install that python interpreter on every PC too if you want to run your script? what i would do is, you can just download Python distribution ONCE to your development environment, do your coding, then use py2exe or pyinstaller to make it into an executable for distribution. that way, you don't have to install python interpreter on every PC you use your script.
ghostdog74