~malept/ubuntu/lucid/python2.6/dev-dependency-fix

« back to all changes in this revision

Viewing changes to Lib/test/check_soundcard.vbs

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-02-13 12:51:00 UTC
  • Revision ID: james.westby@ubuntu.com-20090213125100-uufgcb9yeqzujpqw
Tags: upstream-2.6.1
ImportĀ upstreamĀ versionĀ 2.6.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
rem Check for a working sound-card - exit with 0 if OK, 1 otherwise.
 
2
set wmi = GetObject("winmgmts:")
 
3
set scs = wmi.InstancesOf("win32_sounddevice")
 
4
for each sc in scs
 
5
   set status = sc.Properties_("Status")
 
6
   wscript.Echo(sc.Properties_("Name") + "/" + status)
 
7
   if status = "OK" then
 
8
       wscript.Quit 0 rem normal exit
 
9
   end if
 
10
next
 
11
rem No sound card found - exit with status code of 1
 
12
wscript.Quit 1
 
13