#27624 - 2002-08-22 10:51 PM
Variable Help
|
Im-a-she
Fresh Scripter
Registered: 2002-08-22
Posts: 8
|
I am a brand new (today) kixtart user with VERY limited scripting experience. I have basically written Novell login scripts up to this point. My issue is, I need to set a variable in a login script that will run from a Windows 2000 server on a Windows 95 desktop. It creates a pointer, so to speak, for an old DOS based program we are still running. The way it was done in Novell was:
IF MEMBER OF "POLLER_1" THEN BEGIN DOS SET PRCPATH = "$1" END
IF MEMBER OF "POLLER_2" THEN BEGIN DOS SET PRCPATH = "$2" END
IF MEMBER OF "POLLER_3" THEN BEGIN DOS SET PRCPATH = "$3" END
Can someone give me a clue as to how I would write this into my script file? I have installed Kixtart 4.1 on the Win2K server to the Netlogon folder and am running kxrpc on the logon server. The scripts are executing, I just can't get this variable to work because I am guessing!
More info available on request! Thanks!
_________________________
The worst dilemmas are often the best opportunities in disguise.
'Carpe Diem'
|
|
Top
|
|
|
|
#27627 - 2002-08-22 11:06 PM
Re: Variable Help
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
I think what he is really looking for is something like: select case ingroup("POLLER_1") set "PRCPATH=$path1" case ingroup("POLLER_2") set "PRCPATH=$path2" case ingroup("POLLER_3") set "PRCPATH=$path3" endselect
|
|
Top
|
|
|
|
#27629 - 2002-08-23 03:07 PM
Re: Variable Help
|
Im-a-she
Fresh Scripter
Registered: 2002-08-22
Posts: 8
|
Wow - thanks for all of the prompt responses! Lonkero, here's what I am trying to do: DOS program - call it PRC, flat file, with many executables spread throughout it's directory structure. PRC uses what are called "pathfiles", which contain paths to each executable, as well as where to send print files. The pathfiles are named "cpathfil.$1, cpathfil.$2 and cpathfil.$3". When a user finishes data input and selects print, the pathfile sends the job to the print "poller" that renders the file and sends it to the printer. The "prcpath" variable is supposed to point the user to the appropriate pathfile in order to run the program and print output. There are 3 mainly because we have 3 print pollers.
I have placed the entry from Sealeopard in my script file and it is working - THANK YOU SO MUCH! This has been a valuable learning experience.
Also, in my haste to get answers, I didn't think about making my username gender specific, or adding enough info in my profile - I'm a she.....and thanks to everyone for your input.
_________________________
The worst dilemmas are often the best opportunities in disguise.
'Carpe Diem'
|
|
Top
|
|
|
|
#27631 - 2003-02-19 03:45 PM
Re: Variable Help
|
Im-a-she
Fresh Scripter
Registered: 2002-08-22
Posts: 8
|
Hi Folks,
After many months of testing a login script successfully using Kixtart, I created a new login script using variables as I had been but it does not work. Using debug, it gets to the "Select" then jumps to the next command in the script. The section that is not working is (my whole reason for using kixtart):
Select Case InGroup("POLLER_01") $dospath="$1" Case InGroup("POLLER_01") $dospath="$2" Case InGroup("POLLER_03") $dospath="$3" Shell 'winset.exe PRCPATH='+$dospath EndSelect
Here is the full script servername replaced by servername - my first attempt by the way so bear with me.....
;**** Last Modified on 01/17/2003 at 2:55:00 PM by kcowens **** ;**** CREATED FOR WINDOWS 95 WORKSTATIONS ****
Break ON ;(re)set Ctrl-C/Break handling CLS Color r+/n Small ? "USER INFORMATION" ? AT (4,4) "HI, @userid" ? ? "WHAT TIME IS IT?" ? ? @DAY", " @DATE ? ? @TIME ? ? @MONTH ", " @YEAR ? ? Sleep 1 CLS ? ? SetTime "\\servername" ;Use F: /DELETE ;Use F: "@HOMESHR" ;Use G: /DELETE ;Use G: \\servername\clines$ ;Use H: /DELETE ;Use H: \\servername\public Use I: /DELETE Use I: "\\servername\data$" Use J: /DELETE Use J: "\\servername\insurity$" Use W: /DELETE Use W: "\\servername\spapps$" Use y: /DELETE Use y: "\\servername\HOME" ? ? If @USERID = POLLER01 Use lpt1 /DELETE Use lpt1 "\\servername\Solimar_PRC" Use lpt2 /DELETE Use lpt2 "\\servername\UW_4SI_1" EndIf ? ? If @USERID = POLLER03 Use lpt1 /DELETE Use lpt1 "\\servername\isd_4si_1" EndIf ? ? If @USERID = POLLER04 Use lpt1 /DELETE Use lpt1 "\\servername\Solimar_PRC" Use lpt2 /DELETE Use lpt2 "\\servername\UW_4SI_1" EndIf ? ? If InGroup("CL-UNDERWRITING") Use K: /DELETE Use K: "\\servername\streets8" Use U: /DELETE Use U: "\\servername\autofac$" Use V: /DELETE Use V: "\\servername\boeckh$" EndIf ? ? If InGroup("\\servername\CLPOLICIES") Use H: /DELETE Use H: "\\servername\policies$" EndIf ? ? If InGroup("UW_4SI_1") Use lpt1: /DELETE Use lpt1 "\\servername\UW_4SI_1" EndIf ? ? If InGroup("UW_4SI_2") Use lpt1: /DELETE Use lpt1 "\\servername\UW_4SI_2" EndIf ? ? If InGroup("UW_HP8_1") Use lpt1: /DELETE Use lpt1 "\\servername\UW_HP8_1" EndIf ? ? If InGroup("GENARATE_TEST") Use T: /DELETE Use T: "\\servername\p1test$" EndIf ? ? Select Case InGroup("POLLER_01") $dospath="$1" Case InGroup("POLLER_01") $dospath="$2" Case InGroup("POLLER_03") $dospath="$3" Shell 'winset.exe PRCPATH='+$dospath EndSelect ? ? ? "Sample Windows NT Login Script For AVUpdate" ? "Please replace in this file with the name of" ? "the NT Server designated as your update server." ? If "%OS%" == "Windows_NT" Goto skip If NOT "%WINBOOTDIR%" == "" Goto 95 ? ? "Running AVupdate using WIN3x syntax" Use P: "\\servername\CheyUp$" P:\avupdate.exe Use P: /delete Goto skip ? :95 ? "Run AVupdate using WIN95 syntax" ? "Running using WIN95 syntax" \\servername\CheyUp$\avupdate.exe ? ? :skip ? "Thank you For using AV-Update" ? ? Exit
I have been through 'Known Problems of Kixtart on Windows 95' and 'fixed' those that apply and still the "PRCPATH" does not get set. All other InGroup statements work fine. We (unfortunately) use the Microsoft Client for Netware and the Microsoft Client for Windows.
Any and all help, suggestions will be appreciated! Will happily provide more information on request. Thanks!
_________________________
The worst dilemmas are often the best opportunities in disguise.
'Carpe Diem'
|
|
Top
|
|
|
|
#27635 - 2003-02-19 05:09 PM
Re: Variable Help
|
Im-a-she
Fresh Scripter
Registered: 2002-08-22
Posts: 8
|
Thanks JPOLS for the suggestions. I did update the script and moved Shell 'winset.exe PRCPATH='+$dospath to come after the EndSelect. Still the PRCPATH does not get set. It is not meant to be type string so the $ shouldn't matter. Incidentally, here is the script that works:
Break ON ;(re)set Ctrl-C/Break handling CLS Color r+/n Small ? "USER INFORMATION" ? AT (4,4) "HI, @userid" ? ? "WHAT TIME IS IT?" ? ? @DAY", " @DATE ? ? @TIME ? ? @MONTH ", " @YEAR ? ? Use w: /delete Use w: "\\vmi_nt0\spapps$" ? ? If InGroup("GENARATE_MISC") Use J: /DELETE Use J: "\\vmi_nt0\insurity$" Use lpt1: /DELETE Use lpt1: \\vmi_nt0\isd_4si_1 EndIf ? ? ? If InGroup("GENARATE_TEST") Use T: /DELETE Use T: "\\vmi_nt0\p1test$" EndIf ? ? Select Case InGroup("POLLER_1") $dospath="$1" Case InGroup("POLLER_2") $dospath="$2" Case InGroup("POLLER_3") $dospath="$3" Shell 'winset.exe PRCPATH='+$dospath EndSelect ? ? Exit
And yes it works, even with the Shell in the wrong place...go figure.
_________________________
The worst dilemmas are often the best opportunities in disguise.
'Carpe Diem'
|
|
Top
|
|
|
|
#27637 - 2003-02-19 08:39 PM
Re: Variable Help
|
ekrasner
Fresh Scripter
Registered: 2000-12-20
Posts: 9
Loc: Federal Way, WA, USA
|
Another possible problem could be that you don't have the kixrpc service running on the DC's. This will be necessary for the 95 PCs to use the INGROUP function.
|
|
Top
|
|
|
|
#27638 - 2003-02-19 09:24 PM
Re: Variable Help
|
Im-a-she
Fresh Scripter
Registered: 2002-08-22
Posts: 8
|
Thank you for all of the replies - I am happy to report that the script is now working. Once I read the FAQ regarding Win 9x/Me Kixtart Support, I found that my Global Groups would not work in a script on Win95. I updated to local groups and everything works fine now.
Thanks again everyone!
_________________________
The worst dilemmas are often the best opportunities in disguise.
'Carpe Diem'
|
|
Top
|
|
|
|
#27640 - 2003-02-19 09:47 PM
Re: Variable Help
|
Im-a-she
Fresh Scripter
Registered: 2002-08-22
Posts: 8
|
Lonkero - I am running KXRPC on all domain controllers, yet I still had to use Local Groups. July 1 is the deadline for W2k rollout...I'm with you!
_________________________
The worst dilemmas are often the best opportunities in disguise.
'Carpe Diem'
|
|
Top
|
|
|
|
#27641 - 2003-02-19 10:00 PM
Re: Variable Help
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Kathy, in your testing you have KXRPC service running on the logon domain DCs correct? Also when you tested and altered the membership of a global group did you logoff and log back on?
See this thread for detail of how INGROUP in 4.x works. RESOLVED - BUG Help 4.01 INGROUP Failures
Are you still using KiXtart version 4.10?
Have you inspected the TokenCache in the registry? HKEY_CURRENT_USER\Software\KiXtart\TokenCache
Is it populated?
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 857 anonymous users online.
|
|
|