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
271
votes
18 answers

Composer install error - requires ext_curl when it's actually enabled

I'm trying to install Facebook PHP SDK with Composer. This is what I get $ composer install Loading composer repositories with package information Installing dependencies (including require-dev) Your requirements could not be resolved to an…
Michal Artazov
  • 4,368
  • 8
  • 25
  • 38
269
votes
6 answers

Change case of a file on Windows?

There are a couple of files in our git-controlled codebase that I'd like to rename. Specifically, I just want to change the case of the file, so that sourceCode.java becomes SourceCode.java, for example. The catch: I'm on a Windows box, and the…
Electrons_Ahoy
  • 36,743
  • 36
  • 104
  • 127
268
votes
13 answers

Batch file: Find if substring is in string (not in a file)

In a batch file, I have a string abcdefg. I want to check if bcd is in the string. Unfortunately it seems all of the solutions I'm finding search a file for a substring, not a string for a substring. Is there an easy solution for this?
Ben
  • 54,723
  • 49
  • 178
  • 224
268
votes
11 answers

How to delete a file after checking whether it exists

How can I delete a file in C# e.g. C:\test.txt, although apply the same kind of method like in batch files e.g. if exist "C:\test.txt" delete "C:\test.txt" else return nothing (ignore)
Tom
  • 4,187
  • 4
  • 20
  • 10
267
votes
19 answers

How can I auto-elevate my batch file, so that it requests from UAC administrator rights if required?

I want my batch file to only run elevated. If not elevated, provide an option for the user to relaunch batch as elevated. I'm writing a batch file to set a system variable, copy two files to a Program Files location, and start a driver installer. If…
PDixon724
  • 2,673
  • 3
  • 15
  • 4
267
votes
27 answers

Running Python on Windows for Node.js dependencies

I am getting into a Node.js codebase which requires that I download a few dependencies via NPM, namely jQuery. In attempting to run npm install jquery, I keep getting this error: Your environment has been set up for using Node.js 0.8.21 (x64) and…
Matt Cashatt
  • 23,490
  • 28
  • 78
  • 111
264
votes
21 answers

Nodejs cannot find installed module on Windows

I am learning nodejs at the moment on Windows. Several modules are installed globally with npm.cmd, and nodejs failed to find the installed modules. Take jade for example, npm install jade -g Jade is installed in directory "C:\Program Files…
Cosmore
  • 3,193
  • 4
  • 20
  • 22
262
votes
31 answers

The requested operation cannot be performed on a file with a user-mapped section open

Whenever I tried to copy 4 files into my bin folder, after stopping the main service, I am getting an error with one file (TexteDll). The error is: Cannot copy TexteDll: The requested operation cannot be performed on a file with a user-mapped…
peter
  • 8,158
  • 21
  • 66
  • 119
262
votes
17 answers

How do you configure an OpenFileDialog to select folders?

In VS .NET, when you are selecting a folder for a project, a dialog that looks like an OpenFileDialog or SaveFileDialog is displayed, but is set up to accept only folders. Ever since I've seen this I've wanted to know how it's done. I am aware of…
OwenP
  • 24,950
  • 13
  • 65
  • 102
262
votes
9 answers

How to run a PowerShell script from a batch file

I am trying to run this script in PowerShell. I have saved the below script as ps.ps1 on my desktop. $query = "SELECT * FROM Win32_DeviceChangeEvent WHERE EventType = 2" Register-WMIEvent -Query $query -Action { invoke-item "C:\Program…
Eka
  • 14,170
  • 38
  • 128
  • 212
260
votes
23 answers

Keyboard shortcuts are not active in Visual Studio with Resharper installed

I have Visual Studio 2012 + Resharper 7.1.1000.900 + StyleCop 4.7.44 installed. The problem is that no shortcuts are active since Resharper was installed. For example: I can still rename via 'Refactor > Rename'. But shorcut Ctrl+R does nothing. I…
Julia Meshcheryakova
  • 3,162
  • 3
  • 22
  • 42
259
votes
12 answers

How to check for DLL dependency?

Sometimes when I'm doing a little project I'm not careful enough and accidentally add a dependency for a DLL that I am not aware of. When I ship this program to a friend or other people, "it doesn't work" because "some DLL" is missing. This is of…
orlp
  • 112,504
  • 36
  • 218
  • 315
257
votes
11 answers

How do I use spaces in the Command Prompt?

How can I use spaces in the Windows Command Line? cmd /C C:\Program Files (x86)\WinRar\Rar.exe a D:\Hello 2\File.rar D:\Hello 2\*.*
faressoft
  • 19,053
  • 44
  • 104
  • 146
257
votes
11 answers

How to use "/" (directory separator) in both Linux and Windows in Python?

I have written a code in python which uses / to make a particular file in a folder, if I want to use the code in windows it will not work, is there a way by which I can use the code in Windows and Linux. In python I am using this…
hulk007
  • 2,751
  • 2
  • 13
  • 10
257
votes
12 answers

Using the "start" command with parameters passed to the started program

I have a Virtual Machine in Virtual PC 2007. To start it from the desktop, I have the following command in a batch file: "c:\program files\Microsoft Virtual PC\Virtual PC.exe" -pc "MY-PC" -launch But that leaves a dos prompt on the host machine…
JosephStyons
  • 57,317
  • 63
  • 160
  • 234