Page 4 of 4 <1234
Topic Options
#55577 - 2002-03-04 07:43 PM Re: Modular Logon Script
Anonymous
Unregistered


Bryce, I think I found my problem on config.ini. Under modules, The "other_scripts" module is setup to be "domain users" and I setup the module to be the IP subnet of our network, it's working now, thanks alot! A simple change does make a whole lot of difference doesn't it? This is one slick modular script, two big thumbs up.
Top
#55578 - 2002-03-25 01:51 PM Re: Modular Logon Script
RalphG Offline
Fresh Scripter

Registered: 2002-01-14
Posts: 11
Loc: CH
hello ...

after doing some other things than KIX - I returned today to my old problem, that the quite fabolous script from bryce doesn't run on my W2k Professional (German) machine...

I downloaded the latest version this morning, and left everything default, just to see if it starts... (location of the script is: C:\Kix_Logon_script\*)

when I run the script i get the following in my dos-box

code:
 Verifying / Updating Script Software Installation, Please Wait...
Loading Logon Script, Please Wait...
;Set this line to = the name of the config file

;****************************************************************************

;----------------------------------------------------------------------------
; Do not edit below this Point.
;
; (only if you really really know what you are doing! Everything that this
; script can do is controlled by the Config file!)
;----------------------------------------------------------------------------
;****************************************************************************


select
case 1 = 2
$Configregkey = HKEY_LOCAL_MACHINE\SOFTWARE\Logon_Script
case 1 = 1
496-1129\logon_scriptigregkey = HKEY_USERS\S-1-5-21-673135436-1833650376-2076119
endselect


;----------------------------------------------------------------------------
; This is where all Global variables are set

$ =
$cr = chr(13)+chr(10) $lf = chr(10)
$tab = chr(9) ;$ip = enumipinfo()

M(SUBSTR(192.168. 10. 20,9,4))+LTRIM(SUBSTR(192.168. 10. 20,13,4)) 20,5,4))+LTRI

;loading Kix2001 Programming Functiuons
call logon.bat\..\ + 'functions\Kix_Functions'

;loading user defined Custom variables
call logon.bat\..\ + 'functions\Custom_Variables'
;----------------------------------------------------------------------------

Select
case readprofilestring(C:\Kix_Logon_script\config.ini,,) =
? Script error : unknown command !
? "ERROR READING $ConfigFile!!!"

any ideas ?!? is it because I use a german version ?!? ( ' or " thing ?!?)

thnks

.Ralph

Top
#55579 - 2002-03-25 05:21 PM Re: Modular Logon Script
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
you ran the logon.bat file and it gave you all of that on the screen?
Top
#55580 - 2002-03-26 10:44 AM Re: Modular Logon Script
RalphG Offline
Fresh Scripter

Registered: 2002-01-14
Posts: 11
Loc: CH
yes - it did [Confused]

but not all the time....

sometimes I get

code:
 Verifying / Updating Script Software Installation, Please Wait...
Loading Logon Script, Please Wait...

C:\Kix_Logon_script>

I run it locally for testing purposes, I have local administration rights, and I just unzip it, and change the name of the onfig.ini to something else, to be sure that he wants this file...

when I just want to run the script:

code:
 C:\Kix_Logon_script>kix32 logon.kix

ERROR READING Config.ini!!!
C:\Kix_Logon_script>

maybe I'm missing something completely - but it just want run...

cheersio
.R

Top
#55581 - 2002-03-26 11:16 AM Re: Modular Logon Script
RalphG Offline
Fresh Scripter

Registered: 2002-01-14
Posts: 11
Loc: CH
to me, it seems like it get's all the modules it needs and when it comes to run the modules it fails....

I put some ? in the logon.kix to see the values in the variables....

code:
 	select
case Ubound($data) <> 2
? "There is an error in the config.ini"
case 1
$Module = $data[2]
$Mstatus = readvalue("$ConfigRegkey\$Module","Status")
? "Runpath: " $runpath
? "ModuleLib: " $ModuleLib
? "Module: " $Module
IF OS($data[0]) = 1 AND GroupCode($data[1]) = 1 AND $Mstatus = "on"
call $runpath$ModuleLib$Module
endif
endselect

the result is (just a snip out)
code:
 Runpath: logon.bat\..\
ModuleLib: modules\
Module: CTRL_C

I'm not sure, but the runpath looks strange to me - is this correct [Confused] ?!?

ah wait - I placed an ? here
code:
 IF OS($data[0]) = 1 AND GroupCode($data[1]) = 1 AND $Mstatus = "on"
call $runpath$ModuleLib$Module
? $runpath$ModuleLib$Module
endif

and it didn't fire....

hmm....

what's behind this argument: GroupCode($data[1]) = 1

thnks

.Ralph

Top
#55582 - 2002-03-26 03:28 PM Re: Modular Logon Script
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
the $runpath variable is being set from the logon.bat

to run the script in debug mode you can do this

logon.bat /d

to run the script by hand.

kix32 logon.kix $runpath="%0\..\"

if groupcode is not bringing back a 1, then for what ever reason the information in the config.ini does not apply to the current user.

groupcode gets this information from the config.ini to see if the logon script should execute the desired module.

code:
	l = local groups
|L!Administrators| would be only for users that have local admin
|L!\\server\group| Would check for membership in a Local group on
a remote computer

G = Global groups
|G!Domain Admins| would only execute for users in the "Domain Admins"
global group

|G!MIS\users| Will only execute if a member of the trusted domain
"MIS" and in the global Users of that domain

|G!?user| Will search all global groups using "user" as a wild card

U = Username
|U!smithb| would only execute for user smithb

W = Workstation name
|W!testcomputer1| would only execute if ran on "testcomputer1"

I = ip#
|I!128.2.0.0/255.255.0.0| would only execute for computers in the 128.2.0.0 subnet
|I!128.2.10.11/255.255.255.255| would only execute for the ipaddress 128.2.10.11

what does your config.ini look like?

Bryce

[ 26 March 2002, 15:32: Message edited by: Bryce ]

Top
#55583 - 2002-03-27 09:08 AM Re: Modular Logon Script
RalphG Offline
Fresh Scripter

Registered: 2002-01-14
Posts: 11
Loc: CH
hi bryce

(thnks a lot for your patience [Smile] )

here you find the actual copy of the config.ini
(after struggling around with the groups, I changed everything on my pc (zhpc10)

config.ini

running the script direct with
code:
 C:\Kix_Logon_script>kix32 logon.kix $runpath="%0\..\\"

looks exactly the same than with the logon.bat
(be sure to make two \\ at the end - else it's missing)

thnks

.Ralph

Top
#55584 - 2002-03-27 09:51 AM Re: Modular Logon Script
RalphG Offline
Fresh Scripter

Registered: 2002-01-14
Posts: 11
Loc: CH
I THINK I FOUND IT ! !

1. with the groups configured in the config.ini .... there seems to be a problem with those groups... somehow (have to find out what exactly happens later)it screws something up with the groups and stuff.... so it didn't find them....

after the answer from bryce above - I changed everything to w!myworkstation to see what happens
(didn't get this out of the readme before)

but it still wasn't running [Frown]

BUT !

2. after playing around in the logon.kix with those nice ? the

code:
 IF OS($data[0]) = 1 AND GroupCode($data[1]) = 1 AND $Mstatus = "on"
call "$runpath$ModuleLib$Module"
? $Mstatus GroupCode($data[1]) OS($data[0])
? "XX: "$runpath$ModuleLib$Module
endif

call didn't fire up the modules, but at least it came into this IF (because of the w!myworkstation [Smile] )

from there, it was just a small step to the manual for the "call" command, and see there - I removed the " around the command yesterday, just because I discovered somewhere else that it might help (it helped at the other place, can't remember exactly where right now, but it runs with the " and without them...
so, i just put them into place - and it runs ! !

thnks a lot to bryce for his patience and everything ! ! !

owe you a beer [Cool]

.Ralph

Top
#55585 - 2002-03-27 05:26 PM Re: Modular Logon Script
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
Glad you got it to work.

what did you have in the config.ini file before you changed it?

Top
#55586 - 2002-03-28 07:41 AM Re: Modular Logon Script
Anonymous
Unregistered


I love this!

Bryce, did you know that 4 years ago, this is how ScriptLogic started out?

A modular script was developed by some x-Novell guys at Inteletek, a Florida-based network integrator. The script had to be modular so they could update the 'engine' while not messing with the configuration (ini).

After great success with hundreds of local customer networks, a GUI manager was developed to maintain the configuration (INI) file.

The product was commercialized and made available to the public in January 1999. At that time it was called NTscript.

Well, the rest is history...

Great minds do think a like. Keep up the good work.

Top
#55587 - 2002-03-28 09:11 AM Re: Modular Logon Script
RalphG Offline
Fresh Scripter

Registered: 2002-01-14
Posts: 11
Loc: CH
quote:
what did you have in the config.ini file before you changed it?
well, I worked with different global groups... like

|G!PEAK\Peak|
|G!PEAK\Sales|
|G!PEAK\Kader 1|
|G!PEAK\Kader 2|

and so on... (I tried it with the domain PEAK\ and without it...

the problem was, my personal firewall I have running on my machine (shame on me - I know) but after I disabled it - my origin config.ini I made some weeks ago, just worked fine

cheers.... & a happy easter

.Ralph

Top
Page 4 of 4 <1234


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

Who's Online
1 registered (Allen) and 2145 anonymous users online.
Newest Members
BeeEm, min_seow, Audio, Hoschi, Comet
17882 Registered Users

Generated in 0.058 seconds in which 0.028 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