Questions tagged [windows]

Windows is the brand name for a series of operating systems from Microsoft. Current versions are Windows 10, Windows 11, Windows Server 2016, Windows Server 2019, and Windows Server 2022. Instead of tagging a post "Windows", try to use a tag for a specific version.

Introduction

Windows is a family of operating systems developed by Microsoft. Originally a graphical add-on for Microsoft DOS, Windows is currently the market leader for operating systems on the desktop.

Today there are several branches of Windows:

  • Windows for desktops, notebooks, and tablets
  • Windows Server, for servers
  • Windows IoT, for embedded devices such as point of sale, kiosks, and signage

Tag recommendations

If your question is version-specific, consider using a version-specific tag.

17405 questions
38
votes
4 answers

Get directory containing the currently executed batch script

I use %0 in batch file to get the containing directory of the batch file but the result is :- c:\folder1\folder2\batch.bat I want just directory, without batch file name, like this :- c:\folder1\folder2\ How can I do it? Maybe I should filter the…
38
votes
16 answers

How to get own process pid from the command prompt in Windows

I'm trying to find a way to get my own PID from a command prompt (for later use in bat scripts). So far the only useful way I found was to use getpids.exe from here : http://www.scheibli.com/projects/getpids/index.html, but I'm looking for a command…
radai
  • 525
  • 2
  • 5
  • 9
37
votes
5 answers

How to route different traffic thru different network interfaces (in Windows)

I've searched for details on how to do this but I've been unsuccessful - I wondered if someone could offer up some advice. So, let's say I have 2 network cards (LAN and 3G in my instance), both assigned dynamic IP addresses. The LAN interface is my…
user28599
37
votes
7 answers

Why is this preventing me installing an MSI: The System Administrator has set policies to prevent this installation

I am trying to install an MSI on a Windows Server 2012 machine which is part of my lab domain. I am local and domain admin, but I seem to be prevented from installing this MSI. For clarification, when attempting to install the git extension for…
Jason Hyland
  • 923
  • 1
  • 7
  • 10
37
votes
10 answers

How to take ownership of files from the command line?

Every so often I run into a file that I need to take ownership of. I normally use cacls for changing ntfs permissions, but it doesn't seem to do ownership. Under *nix I would run something like chown me:me . Is there a windows equivalent to…
Joe
  • 1,545
  • 1
  • 10
  • 15
36
votes
3 answers

ssh on windows - Corrupted MAC on input

I've installed OpenSSH on Windows. I can successfully connect to my remote server via ssh with Putty from this Windows machine. But when opening a PowerShell, and trying ssh my_user@1.2.3.4 I've got the error: debug3: send packet: type 5 …
Raoul Debaze
  • 521
  • 1
  • 4
  • 6
36
votes
1 answer

Unexpected and unexplained slow (and unusual) memory performance with Xeon Skylake SMP

We've been testing a server using 2x Xeon Gold 6154 CPUs with a Supermicro X11DPH-I motherboard, and 96GB RAM, and found some very strange performance issues surrounding memory when compared to running with only 1 CPU (one socket empty), similar…
Marc Micalizzi
  • 393
  • 3
  • 7
36
votes
2 answers

Is IIS SFTP natively supported by Windows?

Does Windows Server 2012 R2 have native SFTP support? I see a role FTP Server but it doesn't say whether this includes SFTP.
James20
  • 361
  • 1
  • 3
  • 3
36
votes
3 answers

For Loop counting from 1 to n in a windows bat script

I need to run a windows command n times within a bat script file. I know how to do this in various programming languages but cannot manage to get it right on the windows command line :-( I would expect something like either for(int i = 0; i < 100;…
raoulsson
  • 4,763
  • 10
  • 34
  • 29
36
votes
3 answers

How to stop Remote Desktop from closing my session due to inactivity?

I'm connecting from a windows vista desktop to a server running windows server 2003. I'm using Remote Desktop and I'm running some very long running processes on the remote server. My problem is that Remote Desktop logs out my session and terminates…
Robin
  • 817
  • 3
  • 11
  • 20
36
votes
7 answers

Determine process uptime

Is there a way to determine the 'uptime' of a process in Windows. Disappointed to find that it is not one of the attributes available when using the Task Manager.
nick
  • 363
  • 1
  • 3
  • 4
36
votes
4 answers

Which is the default TCP connect timeout in Windows?

Which is the default TCP connect timeout in Windows? There is a registry key to configure it or it's set dynamically?
35
votes
4 answers

How to make Firefox trust system CA certificates?

Our network admin recently enabled HTTPS inspection on our firewall/router. For IE users this is fine because the certs have all been distributed via Active Directory for domain-joined machines. However, we have a number of Firefox users that are…
Wes Sayeed
  • 1,902
  • 6
  • 28
  • 43
35
votes
4 answers

Given a PID on Windows - how do I find the command line instruction that executed it?

On a database, I can get a list of all the currently running processes, and the sql command that kicked them off. I'd like to do a similar thing on a windows box. I can get the list of processes, but not the command line that kicked them off. My…
Hawkeye
  • 2,699
  • 9
  • 30
  • 35
35
votes
2 answers

Why does computer name change require a reboot in Windows?

I understand that changing the host name/computer name for a Windows based machine (Client or Server) requires a reboot. I realize that once a computer name is changed, a pending machine name is stored in the system registry and is applied on next…
Ameer Deen
  • 3,598
  • 4
  • 26
  • 27