Page 1 of 1 1
Topic Options
#140981 - 2005-06-03 10:34 PM Syntax
Stephen Wintle Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 444
Loc: England
Hi. i am having trouble with the below syntax...trying to pass a variable. Any suggestions please? thanks

Code:
 Run "beyondexecv2 "\\" + + " $wrkid c:\winnt\pv -k" + " " + $proId + " " + "-f"" 



The Run command uses beyondexecv2 to pass a workstation I.D and terminate an application on that system, which is stored in $proId.
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!

Top
#140982 - 2005-06-03 10:40 PM Re: Syntax
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
ok i'll be the first to take a stab at it ...

SHELL '%COMSPEC% /C beyondexecv2.exe \\' + $wrkid + ' c:\winnt\pv -k ' + $proId + ' -f'


-Shawn

Top
#140983 - 2005-06-03 11:31 PM Re: Syntax
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
nice quess shawn...
stephen, could you say what you are actually trying to do with that line?
execute beyondexecv2 I understand but after that the quotes and signs are so messed up, one can only quess what is the actual list of wanted arguments.
_________________________
!

download KiXnet

Top
#140984 - 2005-06-04 01:13 PM Re: Syntax
Stephen Wintle Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 444
Loc: England
Hi. what that line is doing is, identifying the pc selected by the user via($wrkid) short for workstation I.D, then trying to end a program selected by te user of which the .exe is stored in $proId (short for program I.D). Any suggestions?

Here is the full syntax

Code:
 Break On 
SetConsole("hide")
Global $proId
Global $wrkid

$Form = CreateObject("Kixtart.Form")
;$Form.Text = "Remote -By S. Wintle"
$Form.Size = 450,390
$Form.BackColor = 186,218,240

$Listbox2 = $Form.ListBox("",35,100,80,80)
$Listbox3 = $Form.ListBox("",135,100,80,80)
$Listbox = $Form.ListBox("",235,100,80,80)
$Textbox= $Form.Textbox("",335,100,80,80)

$ListBox.OnClick = "ListBox_Click()"
$ListBox2.OnClick = "ListBox2_Click()"

$Label = $Form.Label("1. Select a Room.",30,60,80,30)
$Label1 = $Form.Label("2. Select a Machine.",120,60,101,30)
$Label2 = $Form.Label("3. Select program.",230,60,90,30)
$Label3 = $Form.Label("4. Selected program.",340,60,100,30)

$ListBox.List = "Internet","Paint","Word"
$ListBox2.List = "ICT1","ICT2","ICT3","LIBRARY","DT2","Multi"



$fraBanner = $FORM.PictureBox
$fraBanner.BACKCOLOR = $FORM.RGB(255,255,255)
$fraBanner.HEIGHT = 30
$fraBanner.Left = 7
$fraBanner.TOP = 10
$fraBanner.WIDTH = 420
$fraBanner.FONTSIZE = 11
$fraBanner.FONTBOLD = 1
$fraBanner.FONTNAME = "verdana"
$fraBanner.ForeColor = 0
$fraBanner.PrintXY(0,0,"View and terminate active Processes on a machine")

$Button1 = $Form.Button("kill",60,200,120,40)
;$Button2 = $Form.Button("Back to main menu" ,60,250,120,40)
$ExitButton = $Form.Button("Exit",60,250,120,40)

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

$Form.Center
$Form.Show

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

Quit()

Function ListBox2_Click

Select
;$Listbox2.Value = $Listbox3.Value
Case $ListBox2.Value = "ICT1"
$Listbox3.List= "ICT1-01","ICT1-02","ICT1-03","ICT1-04","ICT1-05","ICT1-06","ICT1-07","ICT1-08","ICT1-09","ICT1-10","ICT1-11","ICT1-12","ICT1-13","ICT1-14","ICT1-15","ICT1-16","ICT1-17","ICT1-18","ICT1-19","ICT1-20","ICT1-21","ICT1-22","ICT1-23","ICT1-24","ICT1-25","ICT1-26","ICT1-27","ICT1-28","ICT1-29","ICT1-30","ICT1-31"
Case$ListBox2.Value = "ICT2"
$ListBox3.list= "ICT2-001","ICT2-002","ICT2-003","ICT2-004","ICT2-005","ICT2-006","ICT2-006","ICT2-007","ICT2-008","ICT2-009","ICT2-010","ICT2-011","ICT2-012","ICT2-013","ICT2-014","ICT2-015","ICT2-016","ICT2-017","ICT2-018","ICT2-019","ICT2-020","ICT2-021","ICT2-022","ICT2-022","ICT2-023","ICT2-024","ICT2-025","ICT2-026","ICT2-027","ICT2-028","ICT2-029","ICT2-030","ICT2-031","ICT2-032","ICT2-033"
Case $ListBox2.Value = "ICT3"
$ListBox3.list= "ICT3-001","ICT3-002","ICT3-003","ICT3-004","ICT3-005","ICT3-006","ICT3-007","ICT3-008","ICT3-009","ICT3-010","ICT3-011","ICT3-012","ICT3-013","ICT3-014","ICT3-015","ICT3-016","ICT3-017","ICT3-018","ICT3-019","ICT3-020","ICT3-021","ICT3-022","ICT3-023","ICT3-024","ICT3-025"
Case $ListBox2.Value = "Library"
$ListBox3.list= "Lib-01","Lib-02","Lib-03","Lib-04","Lib-05","Lib-06","Lib-07","Lib-08","Lib-09","Lib-10","Lib-11","Lib-12","Lib-13","Lib-13","Lib-14","Lib-15"
Case $ListBox2.Value = "DT2"
$ListBox3.list = "DT-01","DT-02","DT-03","DT-04","DT-05","DT-06","DT-08","DT-09","DT-10","DT-11","DT-12","DT-13","DT-14","DT-15","Dt-16"
Case $ListBox2.Value = "Multi"
$ListBox3.list = "MULTI-01","MULTI-02","MULTI-03","MULTI-04","MULTI-05","MULTI-06","MULTI-07","MULTI-08","MULTI-09","MULTI-10","MULTI-11","MULTI-12","MULTI-13","MULTI-14","MULTI-15","MULTI-16","MULTI-17","MULTI-18","MULTI-19","MULTI-20","MULT-21","MULTI-22","MULTI-23","MULTI-24","MULTI-25","MULTI-26","MULTI-27","MULTI-28","MULTI-29","MULTI-30","MULTI-31","MULTI-32"
EndSelect
EndFunction


Function ListBox_Click

$Textbox.Text = $Listbox.Value
If $Textbox.Text = "Internet"
$proId = "iexplore.exe"
EndIf
If $Textbox.Text = "Paint"
$proId = "mspaint.exe"
EndIf
If $Textbox.Text = "Word"
$proId = "winword.exe"
EndIf
EndFunction

Function Button1_Click

$wrkid = $Listbox3.Value

$cont = MessageBox("Do you wish to kill the selected program?", "WARNING", 36)

Run "beyondexecv2 "\\" + + " $wrkid c:\winnt\pv -k" + " " + $proId + " " + "-f""

EndFunction

Exit




That Run command at the bottom doesnt seem to work...???????
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!

Top
#140985 - 2005-06-04 02:13 PM Re: Syntax
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
The RUN command doesn't work because you're use of double quotes messes up the string. Please read the following FAQ: Proper use of quotes

Change the line so that the command-line itself is enclosed by single quotes and use double quotes inside the command-line string only.
_________________________
There are two types of vessels, submarines and targets.

Top
#140986 - 2005-06-04 09:08 PM Re: Syntax
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Could you please break the long lines in your post.

Thanks.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 248 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.058 seconds in which 0.025 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org