Using Task Scheduler to Mute System Volume

Page 1 of 2 12 LastLast

  1. Posts : 75
    Windows 10
       #1

    Using Task Scheduler to Mute System Volume


    I'm wanting to mute my system volume at 10:00 PM each night and unmute at 9:00 AM every day. I installed Volume Concierge but for some reason it's not working. I've never used Task Scheduler before but decided to give it a try by following instructions online.

    I first downloaded NirCmd and copied it to my Windows Directory then proceeded to try Task Scheduler. As instructed I browsed to the folder on my desktop where I extracted the NirCmd ZIP file, and selected nircmd.exe executable file. To "Mute System Volume" in Arguments I copied & pasted nircmd.exe mutesysvolume 1. Once done I created another task to "Unmute System Volume" and in Arguments I copied & pasted nircmd.exe mutesysvolume 0.

    This is a desktop PC running 24/7 so I checked or unchecked other settings I thought needed set. Pay no attention to my times I've used since I've been experimenting to try to get it to work. Can you tell by my snapshots of my task to "Mute System Volume" what I might be doing wrong since it doesn't seem to be working?
    Attached Thumbnails Attached Thumbnails Using Task Scheduler to Mute System Volume-task-scheduler.jpg   Using Task Scheduler to Mute System Volume-general.jpg   Using Task Scheduler to Mute System Volume-triggers.jpg   Using Task Scheduler to Mute System Volume-actions.jpg   Using Task Scheduler to Mute System Volume-conditions.jpg  

    Using Task Scheduler to Mute System Volume-settings.jpg  
      My Computer


  2. Posts : 1,978
    Windows 10 Pro (+ Windows 10 Home VMs for testing)
       #2

    Have you looked at Nir Sofer's NirCmd volume controls, e.g. nircmd.exe mutesysvolume?

    Perhaps a scheduled task using NIRCMD may help?
      My Computer


  3. Posts : 44,130
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #3

    Hi, first obvious thing is you appear to have
    nircmd.exe nircmd.exe
    I don't think there should be a second one..

    Second thing: from his reference:
    NirCmd Command Reference - mutesysvolume
    mutesysvolume [action] {Component} {Device Index}

    Mute/unmute the system volume.
    In the [action] parameter, specify 1 for mute, 0 for unmute, or 2 for switching between mute and normal state.
    The second parameter is optional, and you can specify one of the following sound components: master, waveout, synth, cd, microphone, phone, aux, line, headphones, wavein. The default value is 'master' (for master volume). Under Windows Vista, the component name must be identical to the one of the device names appear in the sound window of Vista (Control Panel -> Sound). If the device name contains spaces, it must be in quotes.
    {Device Index} is an optional parameter that specifies the sound device index. This parameter is useful if you have more than one sound card. If you don't specify this parameter, the default sound card in Control Panel is used.
    Examples:
    mutesysvolume 1
    mutesysvolume 0
    mutesysvolume 2 waveout
    mutesysvolume 1 master 1
    Vista Examples:
    mutesysvolume 1
    mutesysvolume 0
    mutesysvolume 2 "rear mic"
    mutesysvolume 1 speakers 1
    mutesysvolume 1 default_record

    - I can't see the final parameter.

    This works for me (nircmd is in the system path in my case so I don't need to specify the exact path)
    Using Task Scheduler to Mute System Volume-1.jpg
      My Computers


  4. Posts : 75
    Windows 10
    Thread Starter
       #4

    @ RickC
    Yes I was using http://www.nirsoft.net/utils/nircmd.html to copy & paste commands from.
    @dalchina
    Guess I'm still confused like I said never used Task Scheduler or dealt with scripts that often. Yes it does look like I had nircmd.exe nircmd.exe so I changed it like yours but it still doesn't mute. So then I tried browsing from Actions Program Script - C:\Windows\nircmd.exe but that doesn't work either.

    Maybe I'm just not understanding what you are saying? When you get to Actions and it asks you to browse for Program/Script first time I browsed to my nircmd desktop folder where I first extracted it and that didn't work (original snapshot). So next I tried inputting exacting like you have it but that didn't work. Finally I tried browsing to Windows Directory where nircmd is located and used that as my file path but that doesn't work.

    I wish the Volume Concierge program worked since it's so simple to use.
    Attached Thumbnails Attached Thumbnails Using Task Scheduler to Mute System Volume-edit-action.jpg   Using Task Scheduler to Mute System Volume-edit-actions-2.jpg  
      My Computer


  5. Posts : 44,130
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #5

    So next I tried inputting exacting like you have it but that didn't work.
    In my case I put nircmd.exe in C:\Windows.

    (Of course, you don't have to put it there). But where you put it must be consistent with the path (or implied path) used in the task scheduler. I can confirm that running the task manually toggles the volume icon in the system tray on and off.

    (For what it's worth, I run as admin).

    Note: you can test this by using the Run box (windows key + R):

    Using Task Scheduler to Mute System Volume-1.jpg

    In fact that was the first thing I did before using the task scheduler.

    Here, nircmd.exe is in a folder on my desktop:
    "E:\User folders\Desktop\nircmd folder\nircmd.exe" mutesysvolume 2
      My Computers


  6. Posts : 75
    Windows 10
    Thread Starter
       #6

    Well when I first extracted nircmd I right clicked and ran as Administrator and was given the option to copy to Windows Director which I did. I also have the original nircmd folder on my desktop but it just has the nircmd.exe along with two other files. How did you get it to show mutesyvolume 2 after nircmd?

    Boy maybe just over my head cause I still don't know what I need to do just been trying to follow these instructions Mute System Volume On Windows Lock with Task Scheduler | SumTips
      My Computer


  7. Posts : 1,978
    Windows 10 Pro (+ Windows 10 Home VMs for testing)
       #7

    mccoady said:
    @ RickC
    Yes I was using http://www.nirsoft.net/utils/nircmd.html to copy & paste commands from.
    My apologies... I wasn't paying enough attention. I do the same as dalchina, i.e. I always copy nircmd.exe to within the system's default filepath. From habit, I copy it to the C:\Windows\System32 folder (and make sure it's un-blocked).

    Probably a silly question but have you tried any other nircmd commands (like, for example, nircmd.exe monitor off) just to check the exe is, um, executing as expected?

    Hope this helps...
      My Computer


  8. Posts : 75
    Windows 10
    Thread Starter
       #8

    RickC said:
    My apologies... I wasn't paying enough attention. I do the same as dalchina, i.e. I always copy nircmd.exe to within the system's default filepath. From habit, I copy it to the C:\Windows\System32 folder (and make sure it's un-blocked).

    Probably a silly question but have you tried any other nircmd commands (like, for example, nircmd.exe monitor off) just to check the exe is, um, executing as expected?

    Hope this helps...
    Well my file path is C:\Windows\nircmd.exe unless I use the file path of the nircmd folder on my desktop but neither work. How do you make sure it's unblocked?

    No I haven't tried any other commands since I'm not sure I'm doing anything right. Lol

    I tried Run > nircmd mutesyvolume 2 like dalchina did but it asks if I want to copy to Windows Directory?

    Tried to run a command to open cd door but doesn’t work either.
    Last edited by mccoady; 05 Mar 2018 at 17:27.
      My Computer


  9. Posts : 1,978
    Windows 10 Pro (+ Windows 10 Home VMs for testing)
       #9

    mccoady said:
    Well my file path is C:\Windows\nircmd.exe but how do you make sure it's unblocked?
    Just right-click on the nircmd.exe file, choose Properties from the context menu and see whether there's an Unblock button or checkbox showing:

    Using Task Scheduler to Mute System Volume-nircmd-blocked.png

    EDIT: Never mind... I've just checked and nircmd still works even without being unblocked.

    mccoady said:
    I tried Run > nircmd mutesyvolume 2 like dalchina did but it asks if I want to copy to Windows Directory?
    The reason I suggested nircmd.exe monitor off is that it's immediately obvious whether the executable is working.

    Apologies in advance but... are you sure you downloaded the nircmd version that's the same as the 'bitness' of your OS? (e.g. NirCmd 64-bit for an x64 version of Windows)?

    Whilst I haven't used nircmd for a while, there doesn't appear to be any problems with Win 10 Pro 1709 x64. I used both nircmd.exe monitor off and nircmd mutesysvolume 2 to test... both worked perfectly, so I'm a bit confused why you are having problems.

    EDIT: I think I know what the problem is. You're not using nircmd within a commandline window or .BAT/.CMD file.

    Try this... right-click on Start and choose either Command Prompt or Command Prompt (Admin).

    (Note: From Windows 10 version 1709 [Fall Creators Update] you may see Windows PowerShell or Windows PowerShell (Admin) instead of Command Prompt or Command Prompt (Admin). I've just discovered that nircmd won't work from within the PowerShell commandline window so you may need to use Start > Personalisation > Taskbar and change the toggle switch to 'Show Command Prompt' instead of the Windows PoweShell prompt.)

    Once a CMD commandline window opens, just enter your nircmd command, e.g. nircmd.exe monitor off.

    Hope this helps...
    Last edited by RickC; 05 Mar 2018 at 18:05.
      My Computer


  10. Posts : 75
    Windows 10
    Thread Starter
       #10

    Yes I’m running 64 bit Windows 10 and the file path of NirCmd shows it as 64 bit.

    I’m copying and pasting the commands from http://www.nirsoft.net/utils/nircmd.html . I didn’t try monitor off command but did try command to open cd door (changed drive letter) and it didn’t work. Guess I can try that but expect the same results.

    I think where I could be going wrong is how I’m inputting the commands on the Action tab. I’m browsing to file path C:\Windows\nircmd.exe which is correct. Now under “Arguments” do I input nirmcd.exe monitor off?
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 18:43.
Find Us




Windows 10 Forums