Search

Like a lot of self confessed geeks I listen to music while I’m working on my PC.  At home this isn’t so much of an issue though at work where locking your machine when you leave your desk it gets a little irritating as if I don’t want to irritate my work mates I have to mute or pause what I’m listening to before locking an undo it when I get back.  Today, I figured a way to automate the process in Windows 7.  It may work in other operating systems too, I haven’t any handy to test this on.

  1. Get a command line tool to mute system volume, I’m using the freeware tool “NirCmd” from Nirsoft
  2. Open Task Scheduler (open the start menu then type “Task” or via the control panel
  3. Create the “On Lock” task
    1. Right click on “Task Scheduler Library” and select “Create task”
    2. Name it “Mute On Lock” or whatever you please
    3. In the triggers tab, click New then in the combo box select “On workstation lock”.  Click ok.
    4. In actions click New then enter the following then click ok;
      nircmd.exe mutesysvolume 1
    5. Click ok to save the task
  4. Create the “On Unlock” task
    1. Right click on “Task Scheduler Library” and select “Create task”
    2. Name it “Mute On Unlock” or whatever you please
    3. In the triggers tab, click New then in the combo box select “On workstation unlock”.  Click ok.
    4. In actions click New then enter the following then click ok;
      nircmd.exe mutesysvolume 0
    5. Click ok to save the task

Job done.

Keegan