#38776 - 2003-04-04 10:10 AM
Dos and Kixtart
|
cellnet
Starting to like KiXtart
Registered: 2002-02-26
Posts: 115
Loc: Sweden
|
Hallo
I have a couple of old PC that Im using as thin dos clients with the citrix client.
I have 3 diffrent applications. Desktop, Internet Explorer and Movex.
I have collected the mac address's in a txt file, that the client reads at boot.
code:
? "My Macaddress = @address" ? ?
IF Open(3, "t:\movex.txt") = 0 $x = ReadLine(3) WHILE @ERROR = 0 ? "Line read: [" + $x + "]" $x = ReadLine(3) IF $x = "@address" ?"Starting MOvex....." shell "t:\runapp.bat movex" Close (3) exit quit endif LOOP Close (3) ELSE BEEP ? "Config file not opened, error code: [" + @ERROR + "]" ENDIF exit
It works.
But how do I do if the client are supposed to start Desktop or IE.
Regards \erik
|
|
Top
|
|
|
|
#38777 - 2003-04-04 03:12 PM
Re: Dos and Kixtart
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
erik,
It really sounds like you are in a position where you need a lock-down policy. That is, you restrict the usage of what the client runs.
Look into the use of Policy Editor or GPO (Group Policy Objects). These are, of course, from Microsoft.
Kent
|
|
Top
|
|
|
|
#38778 - 2003-04-07 08:46 AM
Re: Dos and Kixtart
|
cellnet
Starting to like KiXtart
Registered: 2002-02-26
Posts: 115
Loc: Sweden
|
The right to start a application is controlled by citrix, and NT rights.
Im using kixtart.exe, not kix32.
I would like kix to search the txt or ini file until it finds a match, and from that start the correct application.
Ex [movex] 9q23829382
[Internet Explorer] 2343299
\erik
|
|
Top
|
|
|
|
#38781 - 2003-04-10 04:08 PM
Re: Dos and Kixtart
|
cellnet
Starting to like KiXtart
Registered: 2002-02-26
Posts: 115
Loc: Sweden
|
A update
Kixtart script first
code:
; Script begins cls COLOR w+/b ; Ta bort startbara filer SHELL "a:\COMMAND.COM /C del a:\net\net.exe" SHELL "a:\COMMAND.COM /C del a:\autoexec.bat >nul"
flushkb ? "My Macaddress = @address" sleep 10
IF Open( 3 , "T:\movex.txt" ) = 0
$x = ReadLine( 3 ) WHILE @ERROR = 0 IF $x = "@address" :movex ? "MacAddress Match, starting Movex" sleep 2 run "t:\runapp.bat movex" exit quit ENDIF $x = ReadLine( 3 ) LOOP ENDIF
:desktop ? "No Match, starting Desktop" run "t:\runapp.bat desktop" exit quit
:END
exit quit
the "run..." sends variable to runapp.bat
code:
@echo off :START cls Echo Logging in to %1... Echo. @echo off t: cd wfclient vsl >nul t:\wfclient\wfclient.exe %1 goto START :END
Jack, do you mean something like: Content of movex.txt * movex00D0B768A5DB ie03424331233 *
Please explain
\regards erik
|
|
Top
|
|
|
|
#38782 - 2003-04-10 08:14 PM
Re: Dos and Kixtart
|
Jack Lothian
MM club member
   
Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
|
If your lookup file is in INI format as you outlined above, then I was thinking of something like this:
code:
; Script begins cls COLOR w+/b ; Ta bort startbara filer SHELL "a:\COMMAND.COM /C del a:\net\net.exe" SHELL "a:\COMMAND.COM /C del a:\autoexec.bat >nul"
flushkb ? "My Macaddress = @address" sleep 10
IF Open( 3 , "T:\movex.ini" ) = 0 $apps = "" $fnd = 0 $x = ReadLine( 3 ) WHILE (@ERROR = 0 and $fnd=0) If (INSTR( $x , "movex" )>0) $apps="movex" Else If (INSTR( $x , "Internet Explorer" )>0) $apps="IE" Else If (INSTR( $x , "Desktop" )>0) $apps="Desktop" Endif Endif Endif IF $x = @address $fnd=1 ENDIF $x = ReadLine( 3 ) LOOP Close ( 3 ) If ($apps="") ? "Error - Readings Apps file - No Apps Sections found" Else If ($fnd=0) ? "Error - Address not found in list" Endif Endif Else ? "Error - App file not opened, error code : [" + @ERROR + "]" ENDIF If ($fnd>0 and $apps<>"") shell "t:\runapp.bat " + $apps Endif Exit
Please note, I haven't tested this script & I haven't used version 2.33 for a while so it could have some bugs. [ 10. April 2003, 20:19: Message edited by: Jack Lothian ]
_________________________
Jack
|
|
Top
|
|
|
|
#38783 - 2003-04-11 10:20 AM
Re: Dos and Kixtart
|
cellnet
Starting to like KiXtart
Registered: 2002-02-26
Posts: 115
Loc: Sweden
|
How will the movex.ini file look like
I have tested several layouts
code:
[MOvex] 0002A5BE048D0 0002A5BE048D0MOVEX 0002A5BE048D0"MOVEX" 0002A5BE048D0,MOVEX Movex,0002A5BE048D0 "Movex",0002A5BE048D0 Movex0002A5BE048D0 "Movex"0002A5BE048D0
No match
No error messages
Thanks for the reply
\erik
|
|
Top
|
|
|
|
#38785 - 2003-04-11 11:12 AM
Re: Dos and Kixtart
|
cellnet
Starting to like KiXtart
Registered: 2002-02-26
Posts: 115
Loc: Sweden
|
[Movex] 0002A5BE048D0=Movex 0002A5BE048D0="Movex" Movex="0002A5BE048D0" "Movex"=0002A5BE048D0
Also tested this layout = no match
\erik
|
|
Top
|
|
|
|
#38787 - 2003-05-15 03:29 PM
Re: Dos and Kixtart
|
cellnet
Starting to like KiXtart
Registered: 2002-02-26
Posts: 115
Loc: Sweden
|
hallo
Sorry for the delay
never got it to work, now running the easy way
code:
; ; Script begins cls COLOR w+/b ; Ta bort startbara filer SHELL "a:\COMMAND.COM /C del a:\net\net.exe" SHELL "a:\COMMAND.COM /C del a:\autoexec.bat >nul"
flushkb ? "My Macaddress = @address" sleep 5
IF Open( 3 , "T:\movex.txt" ) = 0
$x = ReadLine( 3 ) WHILE @ERROR = 0 IF $x = "@address" :movex ? "MacAddress Match, starting Movex" run "t:\runapp.bat movex" exit quit ENDIF $x = ReadLine( 3 ) LOOP ENDIF
:Internet
IF Open( 3 , "T:\ie.txt" ) = 0 $x = ReadLine( 3 ) WHILE @ERROR = 0 IF $x = "@address" ? "Match, starting Internet Explorer" run "t:\runapp.bat Internet" exit quit ENDIF $x = ReadLine( 3 ) LOOP ENDIF
? "No Match, starting Desktop" run "t:\runapp.bat Desktop" exit quit
:END exit quit
Thanks for the help, im going with diffrent files. Cant get the *.ini files to work
Regards \erik
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 756 anonymous users online.
|
|
|