Windows Scripting
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsSystem AdministrationWindows Scripting

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old July 5th, 2006, 03:10 PM
karizma23 karizma23 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2006
Posts: 1 karizma23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 53 sec
Reputation Power: 0
Need XP Volume Mute Script

Hello,

I work in an educational environment with several computer labs running Windows XP. I have been trying to find a script that I could deploy to all machines (via Altiris), but thus far I've come up empty. Here's what I need the script to be able to do:

1) Mute the system volume (like through mmsys.cpl) on the machine.

AND

2) Place (i.e. display) the volume control speaker icon into the System Tray.

Can someone help me out with this? I thought this would be a relatively easy thing to find online but so far it hasn't proven to be so. Most everything I have found related to this deals with HotKeys and I want to avoid going down that road.

Thanks so much.

Reply With Quote
  #2  
Old January 28th, 2007, 07:58 PM
markoc's Avatar
markoc markoc is offline
Contributing User
ASP Free Regular (2000 - 2499 posts)
 
Join Date: Nov 2003
Location: UK
Posts: 2,160 markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 3 Weeks 20 h 31 m 46 sec
Reputation Power: 220
Need XP Volume Mute Script

it can be done through group policy by running vbscript on the required computers, only need to once as it will mute the HKLM key.

Code:
set oshell=createobject("wscript.shell")
oshell.run "sndvol32"
oshell.appactivate "volume control"
wscript.sleep 100
oshell.sendkeys "{tab}+{tab}"
oshell.sendkeys "m "
oshell.appactivate "volume control"
wscript.sleep 100
oshell.sendkeys "%{f4}" 
__________________
Hope this advise helps.

If so please show your appreciation by adding reputation points (click gauge image on top right of this post and score).

Reply With Quote
  #3  
Old January 29th, 2007, 12:28 AM
Nilpo's Avatar
Nilpo Nilpo is offline
ASP Free Beginner (1000 - 1499 posts)
 
Join Date: Jun 2006
Location: Salem, OH
Posts: 1,048 Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 5 Days 12 h 32 m 33 sec
Reputation Power: 555
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo
MySpace
That's what I was going to do. Good answer. One thing I would recommend it some error-handling to make sure that the proper Windows are in focus, otherwise all is lost.
__________________
Click the image if at any point you don't like my decision.

Scripting problems? Windows questions? Ask the Windows Guru!


Reply With Quote
  #4  
Old November 7th, 2008, 09:47 AM
qi24 qi24 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2008
Posts: 1 qi24 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 41 sec
Reputation Power: 0
A better solution is send just the Windows keycode

here's a better solution... found on blogger at frontierdg.blogspot.com

Uses the Windows keycode 173, which is the same keycode that multimedia keyboards use to mute the sound.


Reply With Quote
  #5  
Old November 7th, 2008, 05:11 PM
Nilpo's Avatar
Nilpo Nilpo is offline
ASP Free Beginner (1000 - 1499 posts)
 
Join Date: Jun 2006
Location: Salem, OH
Posts: 1,048 Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 5 Days 12 h 32 m 33 sec
Reputation Power: 555
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo
MySpace
Nice job. Here's the code:
vb Code:
Original - vb Code
  1. Set WshShell = CreateObject("WScript.Shell")
  2. WshShell.SendKeys(chr(173))
It's also important to know that you can use hex values as well. This is nice since most references refer to key codes by their hex value. In this case, the mute button is 0xAD.
vb Code:
Original - vb Code
  1. Set WshShell = CreateObject("WScript.Shell")
  2. WshShell.SendKeys(chr(&hAD))

Last edited by Nilpo : November 7th, 2008 at 05:17 PM.

Reply With Quote
Reply

Viewing: ASP Free ForumsSystem AdministrationWindows Scripting > Need XP Volume Mute Script


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT