Hi all,

I am using a combination of exe and script to be able to mute the sound control on remote pcs. The script below works although i'm aware it isn't very tidy and help with with would be much appreciated...

Another problem that I have is that I want my Teachers to be able to change passwords, now I am using the form from kixforms that works fine, only the thing is it works only if your are Domain admins. Is there anyway I can pass Domain admin or user credentials in my script so that the person has elevated
rights?

Many thanks

<

Code:
Break On 

Setconsole("hide")

$Form = CreateObject("Kixtart.Form")
$Form.Text = "Disable sound -By S. Wintle"
$Form.Size = 330,490
$Form.BackColor = 186,218,240
;$Image = $Form.Image("\\harry\netlogon\holte1.bmp",200,20,60,60)
$TextBox = $Form.TextBox("",150,100,80,20)
$Listbox = $Form.ListBox("",20,100,80,80)
$ListBox.OnClick = "ListBox_Click()"
$Label = $Form.Label("Click on a class room to enable or disable PC
sound.",20,10,150,30)
$ListBox.List = "ICT1","ICT2","ICT3","LIBRARY","DT2","Multi","music"
$Label1 = $Form.Label("The following rooms below are
disabled.",20,200,150,30)


$Button1 = $Form.Button("Disable PC sound",10,340,120,40)
$Button2 = $Form.Button("Enable PC sound" ,150,340,120,40)
$ExitButton = $Form.Button("Exit",85,410,110,40)


$ExitButton.onClick = "Quit()"
$Button1.OnClick = "Button1_Click()"
$Button2.onClick = "Button2_Click()"



$Form.Center
$Form.Show

While $Form.Visible
$=Execute($Form.DoEvents)
Loop
Quit()

Function ListBox_Click
$TextBox.Text = $ListBox.Value
EndFunction


Function Button1_Click

$cont = MessageBox("sound disabled OK?", "KiXtart", 36)

If $cont = 6
Endif

SELECT


CASE $TextBox.Value = "ICT1"

;Run "c:\winnt\system32\beyondexecv2 \\ICT1-01 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-02 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-03 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-04 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-05 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-06 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-07 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-08 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-09 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-10 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-11 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-12 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-13 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-14 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-15 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-16 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-17 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-18 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-19 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-20 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-21 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-22 c:\winnt\nircmd.exe
mutesysvolume 1"
Run "c:\winnt\system32\beyondexecv2 \\ICT1-23 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-24 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-25 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-26 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-27 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-28 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-29 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-30 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-31 c:\winnt\nircmd.exe
mutesysvolume 1"
;Run "c:\winnt\system32\beyondexecv2 \\ICT1-32 c:\winnt\nircmd.exe
mutesysvolume 1"

ENDSELECT
EndFunction


Function Button2_Click

$cont = MessageBox("PC sound enabled OK?", "KiXtart", 36)

If $cont = 6
Endif

SELECT
CASE $TextBox.Value = "ICT1"

Run "c:\winnt\system32beyondexecv2 \\serv2k1 c:\winnt\nircmd.exe
mutesysvolume 1"


CASE $TextBox.Value = "ICT2"


Run "c:\winnt\system32beyondexecv2 \\serv2k1 c:\winnt\nircmd.exe
mutesysvolume 1"

CASE $TextBox.Value = "ICT3"

Run "c:\winnt\system32beyondexecv2 \\serv2k1 c:\winnt\nircmd.exe
mutesysvolume 1"


CASE $TextBox.Value = "LIBRARY"

Run "c:\winnt\system32beyondexecv2 \\serv2k1 c:\winnt\nircmd.exe
mutesysvolume 1"

CASE $TextBox.Value = "DT2"

Run "c:\winnt\system32beyondexecv2 \\serv2k1 c:\winnt\nircmd.exe
mutesysvolume 1"

CASE $TextBox.Value = "multi"

Run "c:\winnt\system32beyondexecv2 \\serv2k1 c:\winnt\nircmd.exe
mutesysvolume 1"

CASE $TextBox.Value = "music"


Run "c:\winnt\system32beyondexecv2 \\serv2k1 c:\winnt\nircmd.exe
mutesysvolume 1"



ENDSELECT


EndFunction







EXIT

_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!