Link to home
Start Free TrialLog in
Avatar of bsharath
bsharathFlag for India

asked on

Find all computers in the network where sound is not enabled and installed

Hi,

I need to Find all computers in the network where sound is not enabled and not installed.

Regards
Sharath
Avatar of Rob
Rob
Flag of Australia image

I haven't done this per se but have a look at the windows scripting object model: http://msdn2.microsoft.com/En-US/library/a74hyyw0.aspx

You should be able to use this to find devices that are not installed.
Avatar of bsharath

ASKER

Any help with a script...
@echo off
:: Get sound info on "switched on" computers found in the list c:\computers.txt
::
::
setlocal ENABLEDELAYEDEXPANSION
for /f %%c in ('type computers.txt') do (
  set t=
  (ping -n 1 -w 999 %%c|find /i "TTL" >nul)&&  call:_GETsound %%c
  (ping -n 1 -w 999 %%c|find /i "TTL" >nul) ||echo %%c:  switched off
)
goto :_END
:_GETsound
for /f "skip=1 delims=/" %%a in ('WMIC.EXE /Node:%1  Path Win32_SoundDevice   get Description^,Status') do  echo %1: %%a
goto :_EOF
:_END
:_EOF

Still the same message.
Sorry wrong message
I get this.

C:\>findsound.bat
No Instance(s) Available.
indiasophos:
Invalid Global Switch.
Invalid Global Switch.
try it on a xp computer
I checked with an Xp machine and ran from a xp machine too.
Same error. An even get as switched off even though the machines are pinging...
You can give me the output of this command
WMIC.EXE /?|find /i "sound"
I get this.

C:\>WMIC.EXE /?|find /i "sound"
SOUNDDEV                 - Sound Device management.
Add double quotes with machine name.
Like:
WMIC.EXE /Node:"%1" Path Win32_SoundDevice get Description^,Status

@echo off
:: Get sound info on "switched on" computers found in the list c:\computers.txt
::
::
setlocal ENABLEDELAYEDEXPANSION
for /f %%c in ('type computers.txt') do (
  set t=
  (ping -n 1 -w 999 %%c|find /i "TTL" >nul)&&  call:_GETsound %%c
  (ping -n 1 -w 999 %%c|find /i "TTL" >nul) ||echo %%c:  switched off
)
goto :_END
:_GETsound
for /f "skip=1 delims=/" %%a in ('WMIC.EXE /Node:"%1" Path Win32_SoundDevice get Description^,Status') do  echo %1: %%a
goto :_EOF
:_END
:_EOF
I get this.


C:\>Findsound.bat
dev-chen-mrd100: Microsoft UAA Function Driver for High Definition Audio - Adi 1
986  OK
dev-chen-mrd100:
dev-chen-pc1014: SoundMAX Integrated Digital Audio  OK
dev-chen-pc1014:
No Instance(s) Available.
dev-chen-srv401:
C:\>
@echo off
:: GetSound.cmd
:: Get sound info on "switched on" computers found in the list c:\computers.txt
:: just a little be better
::
setlocal
for /f %%c in ('type c:\computers.txt') do (
  ((ping -n 1 -w 500 %%c|find /i "TTL" >nul)&&  call:_GETsound %%c 2>nul) ||echo %%c:  switched off)
goto :_END
:_GETsound
for /f "skip=1 delims=/" %%a in ('WMIC.EXE /Node:"%1" Path Win32_SoundDevice get Description^,Status ') do echo %1: %%a
goto :_EOF
:_END
:_EOF

Canali.

I think now its working fine.


C:\>Findsound.bat
dev-chen-pc1000: Realtek AC'97 Audio  OK
dev-chen-pc1000:
dev-chen-mrd100: Microsoft UAA Function Driver for High Definition Audio - Adi 1
986  OK
dev-chen-mrd100:
dev-chen-nas01:
dev-chen-pc5000: SoundMAX Integrated Digital Audio  OK
dev-chen-pc5000:
dev-chen-pc5001: SoundMAX Integrated Digital HD Audio  OK
dev-chen-pc5001:
C:\>
Why is the name being repeated.?
something wrong in computers.txt?
give me some line of it
i have

dev-chen-mrd100
dev-chen-pc1000
dev-chen-nas01
dev-chen-pc5000
dev-chen-pc5001
in the text file
ANY HELP...
ASKER CERTIFIED SOLUTION
Avatar of Gastone Canali
Gastone Canali
Flag of Italy image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial