5

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?

Phil
  • 3,628
  • 8
  • 34
  • 36

10 Answers10

13

VBScript and JScript are two such languages.

RichieHindle
  • 272,464
  • 47
  • 358
  • 399
6
  • 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
  • 114,442
  • 31
  • 189
  • 228
4

Powershell.

Does require an installation, but well worth it.

John Weldon
  • 39,849
  • 11
  • 94
  • 127
2

What about Windows Script Host?

merkuro
  • 6,161
  • 2
  • 27
  • 29
  • 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 Jul 09 '09 at 16:37
2

@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
  • 327,991
  • 56
  • 259
  • 343
  • 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 Jul 10 '09 at 14:05
  • *steep learning curve (du-oh, sorry, writing too fast ;) – Phil Jul 10 '09 at 14:06
  • @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 Jul 10 '09 at 22:34
  • Python crashes if you try to output UTF-8 to the Windows console using codepage 65001 )-: – hippietrail Feb 21 '11 at 01:21
1

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
  • 28,526
  • 15
  • 68
  • 103
  • 1
    This may be surprising to you: http://www.psychocats.net/ubuntucat/software-installation-in-linux-is-difficult/ – Sarah Vessels Jul 09 '09 at 16:17
  • 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 Jul 09 '09 at 16:18
  • +1 because I respect good smackdown :). It's true though I do love the combined package managers in modern linux distros. – Spence Jul 10 '09 at 03:41
1

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

Sinan Ünür
  • 116,958
  • 15
  • 196
  • 339
1

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
  • 34,865
  • 12
  • 85
  • 147
1

As a Linux user I think you will like portablepython.

0

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

Download PowerShell

Gregory Higley
  • 15,923
  • 9
  • 67
  • 96