Questions tagged [windows]

Writing software specific to the Microsoft Windows operating system: APIs, behaviours, etc. GENERAL WINDOWS SUPPORT IS OFF-TOPIC. Support questions may be asked on https://superuser.com

General support questions for Windows should be asked on Super User

Windows is a family of graphical operating systems developed by Microsoft for server, client, and mobile platforms.

Recent Versions

  • Windows 10 was released on July 29, 2015.

  • Windows 8.1, the first significant update to Windows 8, was released on October 17, 2013.

  • Windows 8, the successor to Windows 7, was released to the market on October 26, 2012. It was designed to be used on both tablets and conventional PCs.

Specific Version Tags

If your question relates to using Windows APIs or Windows-specific behavior with a particular version of Windows, use the tag for that particular version – for example:

Other Related Tags

Resources

166791 questions
969
votes
7 answers

How do I get the application exit code from a Windows command line?

I am running a program and want to see what its return code is (since it returns different codes based on different errors). I know in Bash I can do this by running echo $? What do I do when using cmd.exe on Windows?
Skrud
  • 11,604
  • 5
  • 24
  • 22
964
votes
39 answers

Failed to load the JNI shared Library (JDK)

When I try opening Eclipse, a pop-up dialog states: Failed to load the JNI shared library "C:/JDK/bin/client/jvm.dll"`. Following this, Eclipse force closes. Here's a few points I'd like to make: I checked to see if anything exists at that…
Mxyk
  • 10,678
  • 16
  • 57
  • 76
961
votes
17 answers

How to run a PowerShell script

How do I run a PowerShell script? I have a script named myscript.ps1 I have all the necessary frameworks installed I set that execution policy thing I have followed the instructions on this MSDN help page and am trying to run it like…
Pekka
  • 442,112
  • 142
  • 972
  • 1,088
939
votes
24 answers

Setting Windows PowerShell environment variables

I have found out that setting the PATH environment variable affects only the old command prompt. PowerShell seems to have different environment settings. How do I change the environment variables for PowerShell (v1)? Note: I want to make my changes…
Vasil
  • 36,468
  • 26
  • 90
  • 114
880
votes
12 answers

Windows batch files: .bat vs .cmd?

As I understand it, .bat is the old 16-bit naming convention, and .cmd is for 32-bit Windows, i.e., starting with NT. But I continue to see .bat files everywhere, and they seem to work exactly the same using either suffix. Assuming that my code will…
Chris Noe
  • 36,411
  • 22
  • 71
  • 92
876
votes
43 answers

error: Unable to find vcvarsall.bat

I tried to install the Python package dulwich: pip install dulwich But I get a cryptic error message: error: Unable to find vcvarsall.bat The same happens if I try installing the package manually: > python setup.py install running…
okada
  • 8,769
  • 3
  • 16
  • 4
842
votes
2 answers

How do SO_REUSEADDR and SO_REUSEPORT differ?

The man pages and programmer documentations for the socket options SO_REUSEADDR and SO_REUSEPORT are different for different operating systems and often highly confusing. Some operating systems don't even have the option SO_REUSEPORT. The WWW is…
Mecki
  • 125,244
  • 33
  • 244
  • 253
828
votes
7 answers

How to redirect Windows cmd stdout and stderr to a single file?

I'm trying to redirect all output (stdout + stderr) of a Windows command to a single file: C:\>dir 1> a.txt 2> a.txt The process cannot access the file because it is being used by another process. Is it possible, or should I just redirect to two…
ripper234
  • 222,824
  • 274
  • 634
  • 905
810
votes
15 answers

How to export/import PuTTY sessions list?

Is there a way to do this? Or I have to take manually every record from Registry?
s.webbandit
  • 16,332
  • 16
  • 58
  • 82
771
votes
40 answers

How do I run Redis on Windows?

How do I run Redis on Windows? The Redis download page just seems to offer *nix options. Can I run Redis natively on Windows?
DaveHeller
  • 7,899
  • 3
  • 19
  • 9
771
votes
26 answers

How can I echo a newline in a batch file?

How can you you insert a newline from your batch file output? I want to do something like: echo hello\nworld Which would output: hello world
Brian R. Bondy
  • 339,232
  • 124
  • 596
  • 636
769
votes
17 answers

What is the difference between Cygwin and MinGW?

I want to make my C++ project cross platform, and I'm considering using Cygwin/MinGW. But what is the difference between them ? Another question is whether I will be able to run the binary on a system without Cygwin/MinGW ?
Łukasz Lew
  • 48,526
  • 41
  • 139
  • 208
746
votes
25 answers

Batch file to delete files older than N days

I am looking for a way to delete all files older than 7 days in a batch file. I've searched around the web, and found some examples with hundreds of lines of code, and others that required installing extra command line utilities to accomplish the…
Kibbee
  • 65,369
  • 27
  • 142
  • 182
706
votes
22 answers

Adding a directory to the PATH environment variable in Windows

I am trying to add C:\xampp\php to my system PATH environment variable in Windows. I have already added it using the Environment Variables dialog box. But when I type into my console: C:\>path it doesn't show the new C:\xampp\php…
Netorica
  • 18,523
  • 17
  • 73
  • 108
706
votes
11 answers

CSV file written with Python has blank lines between each row

import csv with open('thefile.csv', 'rb') as f: data = list(csv.reader(f)) import collections counter = collections.defaultdict(int) for row in data: counter[row[10]] += 1 with open('/pythonwork/thefile_subset11.csv', 'w') as…
Alex Gordon
  • 57,446
  • 287
  • 670
  • 1,062