Questions tagged [nircmd]

15 questions
2
votes
0 answers

Issues using setappvolume with nircmd

I am using nircmd for a personal group project. I am trying to use the setappvolume command to send specific program/process sounds to a sound device other than the default sound device. This is the format of the command: setappvolume [Process]…
1
vote
1 answer

AutoHotKey v2: changing audio output (with NirCmd)

Say I want the hotkeys "Winkey + F1", "Winkey + F2" and "Winkey + F3" (so that you only need one hand) to switch between headphones, speakers and monitor audio output. I'd also like headphones to be default on startup. The answer will be posted…
1
vote
0 answers

Send 'Enter' key to window not active via NirCmd

Dear coding enthusiasts, In the last year I got to know the remarkable commandline tool NirCmd. With that I realized many functions on a single shortcut such as muting microphone, setting volume to predefined level, and many more. So when I need to…
1
vote
0 answers

Subprocess not interfacing well with Pynput when creating HotKeys

I am using Pynput and Subprocess with NirCmd in an effort to create a HotKey that will turn my monitor off. The program works fine the first time the function is triggered. However, when triggering the function a second time, pressing any ctrl key…
Jackal
  • 195
  • 9
1
vote
2 answers

Is there any way to check which monitor is the primary display, then execute a command based off of that in windows command line?

I'm using nircmd to change my primary display between my first and second monitor by using two batch files on my desktop; one to set primary display to the first monitor, and the other to set primary display to the second. I was wondering if there…
AUzun
  • 151
  • 1
  • 2
  • 9
0
votes
0 answers

Make this batch file that uses NirCMD close also folder properties windows

the batch file code is below It closes all open explorer windows without Stopping copy or move operations and I like that But I would also like if it would close windows explorer properties windows like the below one if those are open too thanks for…
0
votes
2 answers

trying to switch sound devices using nircmd and it just doesnt

i tried both this: import os os.system(r"cd C:\daten\super pooper\use\app\nircmd && nircmd setdefaultsounddevice 'BD990P' 1") where i got no error but the audio device didnt change either and this: import os os.system(r"cd C:\daten\super…
Reschif
  • 11
  • 2
0
votes
0 answers

How does Nircmd do some processes without admin privileges?

For example, if i want to empty recycle bin, i use rd /s %systemdrive%\$Recycle.bin in cmd. But it is necessary to run cmd with administrator privileges. Otherwise, access will be denied. Besides, there is a small command-line tool called Nircmd. It…
birisix
  • 13
  • 3
0
votes
1 answer

How to check if sound device connected in AutoHotkey script?

I have AutoHotkey script that can switch between multiple sound devices with a single keystroke. Everything works fine, I am using nircmd utility to activate the device (Set as Default Device) Run, Tools\nircmd.exe setdefaultsounddevice…
monstro
  • 6,254
  • 10
  • 65
  • 111
0
votes
0 answers

Return ErrorLevel or console message if NIRCMD.exe fails

I am looking for a way to identify if NIRCMD fails to do what i ask it to do. Is there a way to have NIRCMD to tell me if it fails? Example: "nircmd.exe" win activate title "Untitled - Notepad" The above code works because I have this file…
PY_
  • 1,189
  • 8
  • 18
  • 29
0
votes
0 answers

Some Nircmd command not working on task scheduler

i currently try to make script that prevent user to mute volume using nircmd . but the script is fine when i run manually but when i run using task scheduler but only 2 line of system sound script executed, i try to make 2 different script between…
0
votes
1 answer

Move remotely (via ssh) the cursor in a windows machine

I want to ssh a command to move my cursor on my Windows machine from my Linux machine. I tried to use nircmd and pyautogui, both of them works perfectly fine when I directly test them on the Windows machine. However, when I remotely enter in a…
AnnaBar
  • 29
  • 7
0
votes
3 answers

How to make a toggle switch in batch?

I need a batch file that will toggle between running two command lines; One being nircmd.exe setdefaultsounddevice "Speakers" The other being nircmd.exe setdefaultsounddevice "Headset" Ive tried using the existence of a .txt file as a flag, but…
Sokonomi
  • 41
  • 2
  • 4
0
votes
1 answer

VBS code not working when called from WMIC

I'm attempting to call some code remotely using Window 10 WMIC. rem command prompt, machine 1 (main computer) WMIC /node:"MACHINE_2" process call create "cmd.exe /k "%USERPROFILE%\test.vbs" " This call seems to go through correctly. It produces…
fat_flying_pigs
  • 92
  • 1
  • 4
  • 14
0
votes
3 answers

nircmd mediaplay: access is denied

I'm trying to make a bat file that when launched will open a mediafile and close after x-number milliseconds. mediaplay [play time] [audio file] I'm trying to use nircmd's media play command, but it dosen't recognize it. I've tried the following…