Automatic Mute on Lock/Unlock in Windows 7

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

About these ads

Posted on July 2, 2009, in Windows 7. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: