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
windows
168,764
questions
3343
votes
34
answers
5.6m
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?
2850
votes
26
answers
912k
views
Is there an equivalent of 'which' on the Windows command line? [closed]
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 ...
2756
votes
40
answers
3.5m
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?
1550
votes
21
answers
1.9m
views
Ignoring directories in Git repositories on Windows
How can I ignore directories or folders in Git using msysgit on Windows?
1513
votes
19
answers
1.4m
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 ...
1362
votes
28
answers
3.7m
views
How can I close some specific port on Linux? [closed]
How can I remove the port that some application/process has used it but didn't close the port?
For example: when I run ssh on my ubuntu and tunnel the ssh connection on some port <PORT> on my ...
1356
votes
25
answers
1.6m
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?
1269
votes
43
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 ...
1259
votes
27
answers
1.1m
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?
1191
votes
17
answers
991k
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, ...
1188
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:).
1109
votes
9
answers
408k
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 ...
1044
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 ...
1040
votes
17
answers
3.1m
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 ...
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?
1010
votes
42
answers
1.7m
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 ...
1003
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 ...
989
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 ...
969
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: ...
902
votes
12
answers
575k
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 ...
878
votes
43
answers
962k
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:
...
871
votes
2
answers
381k
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 ...
852
votes
7
answers
698k
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 ...
840
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?
792
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
789
votes
17
answers
421k
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 ...
780
votes
42
answers
864k
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?
758
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 ...
744
votes
22
answers
2.4m
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 ...
735
votes
61
answers
2.2m
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 ...
730
votes
11
answers
567k
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(...
719
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, ...
716
votes
24
answers
1.1m
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+
710
votes
36
answers
1.4m
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 ...
701
votes
20
answers
761k
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.
699
votes
30
answers
861k
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?
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 ...
683
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?
673
votes
27
answers
2.1m
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 ...
668
votes
7
answers
425k
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 &...
660
votes
34
answers
581k
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?
657
votes
37
answers
436k
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 ...
651
votes
35
answers
1.7m
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 ...
645
votes
18
answers
297k
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 ...
642
votes
30
answers
1.8m
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 @...
630
votes
17
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 ...
625
votes
15
answers
845k
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 ...
615
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 ...
604
votes
14
answers
954k
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:\ ...
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?