12

Similar to this question What programming languages are installed by default on Windows 7?. Is the environment any differnt for Windows 10?

For some programs like MS OFfice you get the VBA, Chrome you would get Javascript, if you activate the Bash for Ubuntu on Windows then you can get bash. Not sure if that is default.

In particular, if you didn't have administration rights over a Windows 10 laptop but needed a programming language... what could you use or do about it?

ie I wanted Ruby installed but I needed our tech team to help me. I want to avoid someone else with higher access but also not breach policy.

5
  • 1
    Related: Languages that Windows supports out of the box Commented Feb 24, 2019 at 4:18
  • I would think some programming tools would work when run right off a USB drive or just copied to a user-accessible directory (like C/C++ compilers, for example) so you would have some ability to use non-built-in programming tools without having admin rights. Commented Feb 24, 2019 at 4:20
  • The only programming language included is C#, but unless you want to write the code in Notepad and compile from a command prompt you're going to need to install an IDE. There are several scripting languages available (Powershell, VBScript, and Windows batch). Commented Feb 24, 2019 at 5:26
  • 1
    The last sentence is the most important one: if you use a corporate computer, you need to ask your boss about installing any "interpreter" or "compiler", and you need to get permission to write even the smallest script. In some jobs (but not all of them) that permission could be implicit. Once you are permitted to write a script and need to install an interpreter/compiler, how exactly that happens is an organizational detail (to be discussed with your boss). Commented Feb 24, 2019 at 6:08
  • 1
    Cheers all. I've gone and read some of those related questions but wasn't sure if things had changed in the 5+ years since they were asked. Not sure why I've attracted down votes. Commented Feb 25, 2019 at 0:28

4 Answers 4

9

Out of the box no install solutions include:

(To be written using text file editing software like the preinstalled notepad)

  1. Batch (.bat)
  2. Visual basic script (.vbs)
  3. HTML (.html)
  4. CSS (^Use a style tag for the HTML doc)
  5. JavaScript (.js)

Some quick gets include:

  1. Bash (Ubuntu from Windows Store)
  2. AutoHotKey (from autohotkey.com)
  3. #Code (Windows Store. Apparently supports 12 different languages)

Hope this helps!

Edit: If you really wanna try, you can edit .exe files directly but yeesh.

Edit 2: repl.it is a website that lets you code in tons of different languages, possibly Ruby. With repl.it you can do all the things I've listed and more! (As long as you have alright internet.)

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

1 Comment

To be a little picky: It's not JavaScript but JScript.
5

I'll try to answer as exhaustively as possible.

Before starting to list the installed by default programming/scripting languages, a short overview of the libraries that are used in the windows systems:

  • DLL - a binary library that contains functions that can be used by executables. Same as .exe files but without an entry point.

  • ActiveX controller - a deprecated framework that allows libraries to be ran both in the browser (Internet Explorer) and on the machine itself. But it turned out it was a big security issue and was turned off as a functionality from the browsers. Though still the easiest way to programmatically connect to MS Office programs and some OS stuff. COM objects are basically the same thing.

  • WMI classes - Windows management instrumentation is a set of classes that allows you to interact with some OS stuff programmatically.

  • .NET framework - contains libraries, its own runtime and programming languages that use it. Installed by default on Windows since version 8 and Windows Server 2008.

Though Windows contains much more things.

  1. Batch files (executed by cmd.exe) - the default shell since Windows NT. Batch files have .bat or .cmd extensions (Windows batch files: .bat vs .cmd?). The 32bit versions of even the latest version of Windows still have the cmd.exe predecessor command.com, which has fewer capabilities than cmd.exe. Through RUNDLL32.exe batch files have some limited access to some built-in .dll libraries (https://www.tenforums.com/tutorials/77458-rundll32-commands-list-windows-10-a.html). And through WMIC.exe they also have some limited access to the WMI classes. Batch files can become extremely powerful if you embed another language within - you can call C#, PowerShell, JScript and etc. languages from a .bat file.

  2. WQL - as the WMIC was mentioned above, WMI classes support their own query language that can be used through the WMIC or the provided interfaces for the other languages. It is not complicated and can be useful.

  3. WSH - Windows script host. Not EXACTLY its own language. Rather an engine that allows other languages to be registered to it. I.e. VBScript and JScript use WSH and are registered by default. There are implementations of Perl, Ruby, PHP, etc. using WSH. Though the languages installed by default are JScript and VBScript. BUT.. you can combine code of multiple languages registered to WSH in a Windows Script File (.wsf) (https://en.wikipedia.org/wiki/Windows_Script_File) and even call functions written in another language. WSH allows you to access ActiveX controllers and WMI classes. You cannot access DLL functions (at least not without third party binaries and dirty hacks).

  4. JScript - a WSH based superset of JavaScript 1.4. Does not have the newest stuff of JavaScript like Promises etc. but can be really useful under Windows. Can access ActiveX and WMI.

  5. VBScript - a WSH based version of Basic. Can access ActiveX and WMI.

  6. HTML - of course if you create a .html file it will be opened by the default browser if double clicked. Though you can add JavaScript (and CSS) and do some useful stuff with it, you have no access to the file system of your machine (except for uploading files). And here comes HTA .. which is in the next point.

  7. HTA - which should mean HTML application. The FASTEST way to create UI under Windows (though it is limited in capabilities). HTA files are handled by mshta.exe which is something like a special version of Internet Explorer which has access to the OS. You can call other executables, create files etc. Besides HTML it supports JavaScript and VBScript, though some of the WSH capabilities are not directly accessible (i.e. printing to the console is more verbose). You can use the tag "X-UA-Compatible" to switch to older versions of Internet Explorer/HTA, which have some functions turned off for security reasons or newer versions in order to access the newer versions of JavaScript. HTA has access to ActiveX and WMI.

  8. C# - installed by default in Windows 7 and above. Though it does not include an IDE, but only a command line compiler under %SystemRoot%\Microsoft.NET\Framework\ . C# is the most powerful language from the .NET family and you can do everything that Windows offers with it. You have access to the DLLs (through pinvoke), ActiveX, WMI, .NET functions. You can create UI applications and etc.

  9. VisualBasic.NET - also only a command line compiler as part of .NET. In theory should have the same capabilities as C#, but there are fewer examples, it is less used, etc.

  10. JScript.NET - deprecated version of the .NET languages though the compiler is still there. Again, a superset of ECMAScript 1.4. It is convenient for short scripts though, as it does not require a main function. Ha access to ActiveX, WMI and .NET functions. Platform Invoke (i.e. access to the dll functions) is not implemented.

  11. MSBUILD - part of .NET used to compile a whole project (described in an xml file) instead of a single file. The interesting part is that the latest versions have something called inline task in which you can use any of the .NET languages and also combine more than one language and call one inline task from another. UNLIKE the other .NET options, you don't need to compile the code - it will execute directly in-memory (i.e. will not create additional .exe file). Like WSH it is not EXACTLY its own language. Inline tasks are available with the latest versions of windows 10 though.

  12. PowerShell - also based on .NET but it is its own thing. It is a command line shell (as the name suggests) and is much more powerful than cmd.exe. It us installed by default on Windows since Windows 8. The coolest part - Windows by default includes PowerShell ISE (Integrated Scripting Environment) - its own IDE! One more cool thing - PowerShell can call code written in C#, VB.NET or JScript.NET through TypeDefinition (not available in the earlier versions of PowerShell though). Has access to the .NET libraries, ActiveX objects, WMI. With the TypeDefinitions and C# you can access also some dll functions.

  13. SQL (to some degree) - By default, Windows machines come installed with ODBC driver (https://learn.microsoft.com/en-us/office/troubleshoot/access/jet-odbc-driver-available-32-bit-version) that can process text-based tables (CSV and TSV though you need to create a schema file). Here you can see an example - https://www.dostips.com/forum/viewtopic.php?t=6184

Of course, within Windows there are many text file formats used by the OS tools that contain data, but I can't call them programming languages - .REG, .INI, .SED, .XML, .MOF, .SCT, .URL, .INF, etc.

Comments

1

Although windows core is written in C and extended primarily with C# and C++ it doesn't actually come natively with a scripting environment for those languages. You would have to install IDE's that will definitely not be allowed by any corporate policy. The only language that comes with the os really is shell language, which isn't really a language but more like an object call sheet. You call objects, mostly small executables, and give them some parameters to perform certain actions on other objects. There are two. The simple shell often wrongly called dos which you can access with CMD.exe. Power shell is the second built in shell scripting environment with .net access that allows you to virtually write anything using any natively installed library in the system. I'd first have a look at powershell as it's very close to the native c and c# languages and comes with windows out of the box and can be extended to compile any script into executables.

Both shell environments can do quite a lot of things before needing administrator rights by using system objects that have already been given permission to execute their code. There will be a limit though which usually is encountered when you try to change system settings or meddle with files in system folders. The work around would be to keep everything in the user documents folder and don't try to meddle with system files or settings.

1 Comment

As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
0

what could you use

You could use pretty much any languages. Any compiled executables looks the same to the OS as any other.

The only catch is that some languages' runtime libraries are quite big, so it's common for smaller programs not to include the entire language runtime and instead expects it to be preinstalled on the machine to keep its own download size small.

However, even high level scripting languages that requires huge runtime support libraries can often be packaged into standalone executable, so that you don't need to install the runtime yourself.

Ultimately it depends on what you wanted to do. If you wanted to just make simple scripts, probably .bat scripts will do just fine. If you wanted something simple and fast, then you can write native executable in C, otherwise if you want to do something a bit more complex and you're fine with the larger download size if you can keep your own program simple, or if you can later get admin to preinstall your preferred runtime on your target machines, then high level languages like Python or Ruby would be great options.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.