1

NirCmd has been working just fine for me for a very long amount of time, but not today... I couldn't get the following command to work, although it always worked fine in the past:

nircmd win close stitle "Skype"

I tried testing/running it with some other, opened windows, but to no avail.

I then decided to remove nircmd from C:\Windows and copy it back again. But upon trying to do so, I got a 'Failed to copy NirCmd!' error, I then tried to run it as an administrator, which still resulted in the same error...

My local account is set to administrator as well, but yeah, really not sure why this is happening

IMPORTANT EDIT: Alright, so I currently managed to fix the 'Failed to copy NirCmd!' error, by moving it from Dropbox to a local folder... not sure why this is, since the Dropbox folder has all the permissions that all my local folders have... nothing was getting synced while I was doing this, also

Moving the batch file with the aforementioned command outside of Dropbox, and also trying to run it as admin, did not help however, so yeah... still looking for help on this part

EDIT: I've now manually re-added nircmd to C:\Windows, still nothing so far...

FINAL EDIT: With much help from user @w32sh, the thread is now solved. I basically re-added nircmd in the wrong place, so hence, correctly re-eadding nircmd, does indeed seem to solve this 'issue', for me anyway. Still not sure why this happened in the first place, since everything has been working fine in the past, but oh well

Vladimir
  • 87
  • 7
  • Does it work when you run the command `c:\windows\nircmd.exe win close stitle "Skype"` manually, via the Run dialog, instead of the batch file? – w32sh Dec 06 '20 at 12:13
  • @w32sh thanks for the reply! I currently get: _Windows cannot find 'c:\windows\nircmd.exe'. Make sure you typed the name correctly, and then try again._ Even though nircmd.exe is in the aforementioned directory – Vladimir Dec 06 '20 at 12:16
  • See if renaming `nircmd.exe` to `nircmd2.exe` helps you run the file. `c:\windows\nircmd2.exe win close stitle "Skype"` This is to determine if App Locker or something else is blocking the file. – w32sh Dec 06 '20 at 12:34
  • Still the same, unfortunately... Gif with the attempt: https://i.imgur.com/gYqA53L.gif – Vladimir Dec 06 '20 at 12:38
  • In the screenshot, I see that the file nircmd2.exe is located in the drive's root.Pls try `c:\nircmd2.exe win close stitle "Skype"` – w32sh Dec 06 '20 at 12:40
  • @w32sh okay, so this helped.. pardon my negligence. Now everything works as it should, so I guess readding nircmd did help after all... not sure why this happened in the first place, since it always worked fine before... anyway, thank you very much for your time, this really saved my day – Vladimir Dec 06 '20 at 12:44

1 Answers1

1

Please double-check if the file nircmd.exe exists in the C:\Windows directory.

Because, in the screenshot you uploaded, I can see the NirCmd executable file located at the drive's root directory.

enter image description here

It could be possible that the file was copied to the drive's root accidentally, instead of C:\Windows.

w32sh
  • 11,524
  • 2
  • 39
  • 44