Questions tagged [windows]

Writing software specific to the Microsoft Windows operating system: APIs, behaviors, 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 major 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

150194 questions
822
votes
15 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
  • 418,526
  • 129
  • 929
  • 1,058
795
votes
13 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
  • 33,647
  • 22
  • 66
  • 90
786
votes
36 answers

Remove credentials from Git

I'm working with several repositories, but lately I was just working in our internal one and all was great. Today I had to commit and push code into other one, but I'm having some troubles. $ git push appharbor master error: The requested URL…
balexandre
  • 69,002
  • 44
  • 219
  • 321
729
votes
7 answers

Redirect Windows cmd stdout and stderr to a single file

I'm trying to redirect all output (stdout + stderr) of a DOS 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
  • 202,011
  • 255
  • 600
  • 878
726
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 WEB is…
Mecki
  • 106,869
  • 31
  • 201
  • 225
725
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
  • 15,198
  • 14
  • 53
  • 79
722
votes
23 answers

How do I kill the process currently using a port on localhost in Windows?

How can I remove the current process/application which is already assigned to a port? For example: localhost:8080
KavinduWije
  • 23,917
  • 4
  • 11
  • 16
714
votes
18 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
  • 32,548
  • 26
  • 84
  • 113
705
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
  • 62,900
  • 26
  • 139
  • 178
693
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
  • 43,526
  • 39
  • 134
  • 202
690
votes
10 answers

UnicodeDecodeError: 'charmap' codec can't decode byte X in position Y: character maps to

I'm trying to get a Python 3 program to do some manipulations with a text file filled with information. However, when trying to read the file I get the following error: Traceback (most recent call last): File "SCRIPT LOCATION", line NUMBER,…
Eden Crow
  • 10,402
  • 9
  • 24
  • 24
690
votes
19 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
  • 314,085
  • 114
  • 576
  • 619
677
votes
39 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
  • 6,959
  • 3
  • 15
  • 9
677
votes
19 answers

How to upgrade Git on Windows to the latest version?

I just upgraded to Git 1.8.0.1 for Windows, from my previous version 1.7.9.mysysgit.0. I downloaded the new version from the Git site and installed through the normal Git installer EXE. That said, when I fire up my terminal window, it still is…
BrianScottK
  • 6,879
  • 3
  • 11
  • 7
666
votes
10 answers

How do I shutdown, restart, or log off Windows via a bat file?

I've been using Remote Desktop Connection to get into a workstation. But in this environment, I cannot use the power options in Start Menu. I need an alternative way to shutdown or restart. How do I control my computer's power state through the…
Keng
  • 48,571
  • 31
  • 77
  • 109