bsharath
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
I need to Find all computers in the network where sound is not enabled and not installed.
Regards
Sharath
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
:: 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
ASKER
Still the same message.
ASKER
Sorry wrong message
ASKER
I get this.
C:\>findsound.bat
No Instance(s) Available.
indiasophos:
Invalid Global Switch.
Invalid Global Switch.
C:\>findsound.bat
No Instance(s) Available.
indiasophos:
Invalid Global Switch.
Invalid Global Switch.
try it on a xp computer
ASKER
I checked with an Xp machine and ran from a xp machine too.
ASKER
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"
WMIC.EXE /?|find /i "sound"
ASKER
I get this.
C:\>WMIC.EXE /?|find /i "sound"
SOUNDDEV - Sound Device management.
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
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
ASKER
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:\>
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
:: 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
ASKER
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.?
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
give me some line of it
ASKER
i have
dev-chen-mrd100
dev-chen-pc1000
dev-chen-nas01
dev-chen-pc5000
dev-chen-pc5001
in the text file
dev-chen-mrd100
dev-chen-pc1000
dev-chen-nas01
dev-chen-pc5000
dev-chen-pc5001
in the text file
ASKER
ANY HELP...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You should be able to use this to find devices that are not installed.