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

Filter by
Sorted by
Tagged with
3308 votes
34 answers
5.4m views

How do I find out which process is listening on a TCP or UDP port on Windows? [closed]

How do I find out which process is listening on a TCP or UDP port on Windows?
readonly's user avatar
  • 349k
2835 votes
27 answers
891k views

Is there an equivalent of 'which' on the Windows command line?

As I sometimes have path problems, where one of my own cmd scripts is hidden (shadowed) by another program (earlier on the path), I would like to be able to find the full path to a program on the ...
namin's user avatar
  • 37.7k
2753 votes
40 answers
3.4m views

How do I install pip on Windows?

pip is a replacement for easy_install. But should I install pip using easy_install on Windows? Is there a better way?
1536 votes
21 answers
1.8m views

Ignoring directories in Git repositories on Windows

How can I ignore directories or folders in Git using msysgit on Windows?
sf.'s user avatar
  • 25k
1485 votes
18 answers
1.3m views

Filename too long in Git for Windows

I'm using Git-1.9.0-preview20140217 for Windows. As I know, this release should fix the issue with too long filenames. But not for me. Surely I'm doing something wrong: I did git config core.longpaths ...
Papa Mufflon's user avatar
  • 18.9k
1351 votes
28 answers
3.6m views

How do I remove the process currently using a port on localhost in Windows? [closed]

How can I remove the current process/application which is already assigned to a port? For example: localhost:8080
KavinduWije's user avatar
  • 41.4k
1344 votes
24 answers
1.5m views

How do I run two commands in one line in Windows CMD?

I want to run two commands in a Windows CMD console. In Linux I would do it like this touch thisfile ; ls -lstrh How is it done on Windows?
flybywire's user avatar
  • 267k
1270 votes
42 answers
1.1m views

How can I develop for iPhone using a Windows development machine?

Is there any way to tinker with the iPhone SDK on a Windows machine? Are there plans for an iPhone SDK version for Windows? The only other way I can think of doing this is to run a Mac VM image on a ...
1247 votes
26 answers
1.0m views

Git replacing LF with CRLF

On a Windows machine, I added some files using git add. I got warnings saying: LF will be replaced by CRLF What are the ramifications of this conversion?
mrblah's user avatar
  • 102k
1180 votes
8 answers
1.9m views

List all environment variables from the command line

Is it possible to list all environment variables from a Windows' command prompt? Something equivalent to PowerShell's gci env: (or ls env: or dir env:).
Nicola Cossu's user avatar
  • 55.5k
1165 votes
18 answers
940k views

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, ...
BrianScottK's user avatar
  • 11.8k
1100 votes
9 answers
384k views

Node.js/Windows error: ENOENT, stat 'C:\Users\RT\AppData\Roaming\npm'

I have Windows 7 32-bit. I installed the latest Node.js 32 bit. When I try to run the command npm install jquery, I receive the error: Error: ENOENT, stat 'C:\Users\RT\AppData\Roaming\npm How ...
tryasko's user avatar
  • 11.1k
1041 votes
44 answers
1.7m views

Can't start Eclipse - Java was started but returned exit code=13

I am trying to get my first taste of Android development using Eclipse. I ran into this problem when trying to run Eclipse, having installed version 4.2 only minutes ago. After first trying to start ...
Ben E.'s user avatar
  • 10.6k
1022 votes
17 answers
2.9m views

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 ...
Pekka's user avatar
  • 446k
1022 votes
2 answers
2.1m views

Text editor to open big (giant, huge, large) text files [closed]

I mean 100+ MB big; such text files can push the envelope of editors. I need to look through a large XML file, but cannot if the editor is buggy. Any suggestions?
1001 votes
41 answers
1.6m views

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 ...
balexandre's user avatar
  • 74.4k
984 votes
7 answers
1.1m views

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 ...
Skrud's user avatar
  • 11.8k
974 votes
24 answers
1.2m views

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 ...
Vasil's user avatar
  • 37.2k
970 votes
39 answers
1.6m views

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: ...
895 votes
12 answers
567k views

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 ...
Chris Noe's user avatar
  • 36.8k
880 votes
43 answers
960k views

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: ...
okada's user avatar
  • 8,809
863 votes
2 answers
374k views

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 ...
Mecki's user avatar
  • 130k
848 votes
7 answers
682k views

How can I redirect Windows cmd standard output and standard error to a single file?

I'm trying to redirect all output (standard output and standard error) of a Windows command to a single file: C:\ cd \ dir 1> a.txt 2> a.txt Output: The process cannot access the file because ...
ripper234's user avatar
  • 226k
836 votes
15 answers
1.3m views

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's user avatar
  • 16.7k
790 votes
27 answers
1.3m views

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's user avatar
789 votes
17 answers
418k views

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 ...
Łukasz Lew's user avatar
  • 49.4k
779 votes
40 answers
849k views

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's user avatar
  • 7,989
755 votes
25 answers
1.4m views

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 ...
Kibbee's user avatar
  • 65.9k
739 votes
21 answers
2.3m views

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 ...
Netorica's user avatar
  • 19k
725 votes
11 answers
559k views

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(...
Alex Gordon's user avatar
  • 59.6k
715 votes
60 answers
2.1m views

pip install fails with "connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:598)"

I am very new to Python and trying to > pip install linkchecker on Windows 7. Some notes: pip install is failing no matter the package. For example, > pip install scrapy also results in the SSL ...
Jeremy Cook's user avatar
  • 21.4k
713 votes
23 answers
1.7m views

How do I install and use cURL on Windows? [closed]

I am having trouble getting cURL to run on Windows. I have downloaded a cURL zip file from here, but it seems to contain source code, not an executable. Do I need to compile cURL to run it? If yes, ...
pri_dev's user avatar
  • 11.4k
710 votes
24 answers
1.0m views

"rm -rf" equivalent for Windows?

I need a way to recursively delete a folder and its children. Is there a prebuilt tool for this, or do I need to write one? DEL /S doesn't delete directories. DELTREE was removed from Windows 2000+
FlySwat's user avatar
  • 174k
694 votes
30 answers
841k views

Is there a command to refresh environment variables from the command prompt in Windows?

If I modify or add an environment variable I have to restart the command prompt. Is there a command I could execute that would do this without restarting CMD?
Eric Schoonover's user avatar
688 votes
35 answers
1.3m views

Unable to resolve "unable to get local issuer certificate" using git on Windows with self-signed certificate

I am using Git on Windows. I installed the msysGit package. My test repository has a self signed certificate at the server. I can access and use the repository using HTTP without problems. Moving to ...
RichardHowells's user avatar
685 votes
10 answers
2.5m views

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 ...
Keng's user avatar
  • 52.6k
682 votes
20 answers
738k views

What characters are forbidden in Windows and Linux directory names?

I know that / is illegal in Linux, and * " / \ < > : | ? are illegal in Windows. What else am I missing? I need a comprehensive guide that also accounts for double-byte characters.
Jeff's user avatar
  • 15.4k
678 votes
21 answers
1.0m views

How to prevent auto-closing of console after the execution of batch file

What command can I put at the end of a batch file to prevent auto-closing of the console after the execution of the file?
joe's user avatar
  • 17.3k
662 votes
27 answers
2.0m views

Error "'git' is not recognized as an internal or external command"

I have an installation of Git for Windows, but when I try to use the git command in Command Prompt, I get the following error: 'git' is not recognized as an internal or external command, operable ...
Jason Kim's user avatar
  • 18.6k
657 votes
34 answers
574k views

How do I measure execution time of a command on the Windows command line?

Is there a built-in way to measure execution time of a command on the Windows command line?
Kuroki Kaze's user avatar
  • 8,321
656 votes
37 answers
430k views

How can I set up an editor to work with Git on Windows?

I'm trying out Git on Windows. I got to the point of trying "git commit" and I got this error: Terminal is dumb but no VISUAL nor EDITOR defined. Please supply the message using either -m or -F ...
Patrick McElhaney's user avatar
655 votes
7 answers
413k views

How to create file execute mode permissions in Git on Windows?

I use Git in Windows, and want to push the executable shell script into git repo by one commit. Usually I need to do two steps (git commit). $ vi install.sh $ git add install.sh $ git commit -am &...
Larry Cai's user avatar
  • 57.8k
645 votes
35 answers
1.6m views

How can I create an empty file at the command line in Windows?

How can I create an empty file at the DOS/Windows command-line? I tried: copy nul > file.txt But it always displays that a file was copied. Is there another method in the standard cmd? It should ...
Grendler's user avatar
  • 6,617
641 votes
18 answers
294k views

How can I update the current line in a C# Windows Console App?

When building a Windows Console App in C#, is it possible to write to the console without having to extend a current line or go to a new line? For example, if I want to show a percentage representing ...
IVR Avenger's user avatar
  • 15.3k
637 votes
30 answers
1.7m views

How do I get current date/time on the Windows command line in a suitable format for usage in a file/folder name?

Update: Now that it's 2016 I'd use PowerShell for this unless there's a really compelling backwards-compatible reason for it, particularly because of the regional settings issue with using date. See @...
Rory's user avatar
  • 41.1k
620 votes
15 answers
837k views

How do I uninstall a Windows service if the files do not exist anymore?

How do I uninstall a .NET Windows Service if the service files do not exist anymore? I installed a .NET Windows Service using InstallUtil. I have since deleted the files but forgot to run InstallUtil ...
Thomas Jespersen's user avatar
620 votes
18 answers
1.7m views

How to create .pfx file from certificate and private key?

I need .pfx file to install https on website on IIS. I have two separate files: certificate (.cer or pem) and private key (.crt) but IIS accepts only .pfx files. I obviously installed certificate and ...
jlp's user avatar
  • 10.1k
610 votes
30 answers
1.2m views

How can you find and replace text in a file using the Windows command-line environment?

I am writing a batch file script using Windows command-line environment and want to change each occurrence of some text in a file (ex. "FOO") with another (ex. "BAR"). What is the simplest way to do ...
Ray's user avatar
  • 190k
601 votes
14 answers
942k views

Create folder with batch but only if it doesn't already exist

Can anybody tell me how to do the following in in a Windows batch script? (*.bat): Create a folder only if it doesn't already exist In more detail, I want to create a folder named VTS on the C:\ ...
Bill's user avatar
  • 6,011
600 votes
29 answers
1.8m views

How can I update npm on Windows?

I tried this: sudo npm cache clean -f sudo npm install -g n sudo n stable ...but it didn't work. How do I do this on Windows?
Jatin's user avatar
  • 14.2k

1
2 3 4 5
3379