Page 1 of 2 12>
Topic Options
#24776 - 2002-07-11 05:48 AM Calling DoctorS in the House
seandragon Offline
Fresh Scripter

Registered: 2002-07-09
Posts: 17
I'm using KiXtart 4.10ver. And I'm trying to implement in the environment, 2K Server and XP client. I calling the KiXtart script through a batch file and so far I haven't been successful. This how I would like to happen, a simple drive mapping and group membership a windows screen and some greetings. Please see below for more info.
ThanX
Fidel

Batch

@Echo off
If exist c:\windows\system32\kix32.exe goto drive
%0\..\kix32.exe \\mmnetad1\netlogon\script.kix
goto end
:drive
c:\windows\system32\kix32.exe \\sbserver\netlogon\testras.kix
:end
@echo off

KiX


?" Hello "+ @FULLNAME "
?" Today is "+ @DAY " "+ @DATE " " " The Time is "+ @TIME
?"You Are Logging In To The "+ @DOMAIN " Domain "
?"Your Login Server Is "+ @LSERVER
? "Synchronizing your system's clock"
;synchronize with time server
SETTIME "\\server"
IF @error = 0
? "System clock synchronized"
ELSE
MESSAGEBOX ("Cannot synchronize the system clock.
Please inform your administrator.", XYZ Login Script", 0)
;ENDIF
? "Mapping network drives..."
;MAP Drives by Group Membership
;Map Domain Pcsupport T: drive
IF INGROUP ("Domain pcsupport") = 1
USE T: /delete /persistent
USE T: "\\mmnetad1\tools"
? "PcSupport Drive Mapped
ENDIF
;Map common drives for Domain Users
IF INGROUP ("DOMAIN Users") = 1
USE g: /delete /persistent
Use g: "\\mmnetad1\home\@userid"
ENDIF
? "Login Script Complete"
EXIT

Top
#24777 - 2002-07-11 06:00 AM Re: Calling DoctorS in the House
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
hi fidel.
first,
let's check that the batch gets executed:
code:
 If exist %windir%\system32\kix32.exe goto drive
%0\..\kix32.exe %0\..\script.kix
goto end
:drive
%windir%\system32\kix32.exe %0\..\testras.kix
:end

echo did I run?

pause

exit 0

just for the case that the reason is before it so no-one starts looking failure in your script [Wink]

cheers,
_________________________
!

download KiXnet

Top
#24778 - 2002-07-11 06:17 AM Re: Calling DoctorS in the House
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

We have take at your script.
Some remarks:
- scripts wasn't correct. missing quotations and ENDIF
- your batch file doesn't verify kix32 on your c:\winnt directory

Your batch file may look like:
code:
@echo off
if exist c:\windows\system32\kix32.exe goto client
if exist c:\winnt\system32\kix32.exe goto client
\\mmnetad1\netlogon\kix32.exe \\mmnetad1\netlogon\script.kix
goto end
:client
kix32.exe \\sbserver\netlogon\testras.kix
:end
@echo off

Your script may look like
code:
 ? " Hello "+@fullname
? " Today is "+@day+" "+@date+" The Time is "+@time
?
? " You Are Logging In To The "+@domain+" Domain"
? " Your Login Server Is "+@lserver
?
? " Synchronizing your system's clock"
;synchronize with time server
SETTIME "\\server"
IF (@error = 0)
? " System clock synchronized"
ELSE
$null=MessageBox("Cannot synchronize the system clock."+@crlf+@crlf+"Please inform your administrator.","XYZ Login Script",0)
ENDIF
;
; MAP Drives by Group Membership
;
? " Mapping network drives..."
;
; - Map Domain Pcsupport T: drive
IF InGroup("Domain pcsupport") <> 0
USE t: /delete /persistent
USE t: "\\mmnetad1\tools"
? " PcSupport Drive Mapped"
ENDIF
; - Map common drives for Domain Users
IF InGroup("DOMAIN Users") <> 0
USE g: /delete /persistent
USE g: "\\mmnetad1\home\@userid"
ENDIF
? " Login Script Complete"
EXIT

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#24779 - 2002-07-11 06:19 AM Re: Calling DoctorS in the House
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear Lonkero,

You beat me.
Improvements to the batch file
code:
@echo off
if exist %windir%\system32\kix32.exe goto client
\\mmnetad1\netlogon\kix32.exe \\mmnetad1\netlogon\script.kix
goto end
:client
%windir%\system32\kix32.exe \\sbserver\netlogon\testras.kix
:end
@echo off

greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#24780 - 2002-07-11 07:14 AM Re: Calling DoctorS in the House
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I have to be fast to survive [Wink]

somehow woke up early today... 05:59 without any reason.
and the speed I'm getting at new posts...

I quess I'm just little ill, nothing else.
_________________________
!

download KiXnet

Top
#24781 - 2002-07-11 07:58 AM Re: Calling DoctorS in the House
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Made some changes to MCA's version of the batch script..

This will work from any domain controller that gets the login script files replicated to it..

code:
@echo off
if exist c:\windows\system32\kix32.exe goto client
if exist c:\winnt\system32\kix32.exe goto client
%logonserver%\netlogon\kix32.exe %logonserver%\netlogon\script.kix
goto end
:client
kix32.exe %logonserver%\netlogon\testras.kix
:end

Replaced \\mmnetad1 and \\sbserver with %logonserver%.. Removed the second @echo off.

Regards,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#24782 - 2002-07-11 08:00 AM Re: Calling DoctorS in the House
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
kent, good.
same as in my first post. [Big Grin]

well, syntax is different...
_________________________
!

download KiXnet

Top
#24783 - 2002-07-12 12:52 AM Re: Calling DoctorS in the House
seandragon Offline
Fresh Scripter

Registered: 2002-07-09
Posts: 17
Guys, thanks for all your help. I just want to ask if this would allow user to see a welcome screen after login.
Thankx...

Top
#24784 - 2002-07-11 01:14 PM Re: Calling DoctorS in the House
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
this?
like, the script like it is now shows welcome stuff at the time of logon.

so, do you want a message after the logon?
perhaps a messagebox?
_________________________
!

download KiXnet

Top
#24785 - 2002-07-11 02:38 PM Re: Calling DoctorS in the House
Ghost Offline
Starting to like KiXtart

Registered: 2000-09-14
Posts: 171
Have a look at this post. Click Here!

Hope this helps.

[Smile]
_________________________
Who are you? Who slips into my robot body and whispers to my ghost?

Top
#24786 - 2002-07-11 04:27 PM Re: Calling DoctorS in the House
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Improve the SETTIME function by either:
1) check for admin group to execute the SETTIME command
code:
IF INGROUP('Administrators')
SETTIME @LDOMAIN
ENDIF

2) install W32TIME service which will synchronize the clients automatically

3) schedule a 'NET TIME /SET' through the Task Scheduler under an administrative account
_________________________
There are two types of vessels, submarines and targets.

Top
#24787 - 2002-07-11 10:23 PM Re: Calling DoctorS in the House
seandragon Offline
Fresh Scripter

Registered: 2002-07-09
Posts: 17
Thanx to everybody and to Jens!

Server Time Sync was an issue but with your advice its working....

Is there anyway that I can see the "cmd windows automatically"?
I have to catch the dos window in order for me to see the greetings.
ThanX
Fidel

Top
#24788 - 2002-07-11 10:25 PM Re: Calling DoctorS in the House
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Fidel,

If you want to slow things down to see what is going on..

Try the debug mode:

kix32 yourscript.kix /d

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#24789 - 2002-07-11 10:26 PM Re: Calling DoctorS in the House
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See W2k/XP - Keep the Window visible on login? and add
code:
$rc=SETCONSOLE('SHOW')
$rc=SETCONSOLE('FOREGROUND')

to the first lines of your code.
_________________________
There are two types of vessels, submarines and targets.

Top
#24790 - 2002-07-11 10:29 PM Re: Calling DoctorS in the House
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
fidel, also if you want to see that greeting you can place a sleep somewhere there.

better could though be using messagebox which is opened and script execution is carried on in the background.

this way users do not even see that the script is there [Big Grin]

messagebox with timeout of ten seconds is like good...
_________________________
!

download KiXnet

Top
#24791 - 2002-07-11 10:41 PM Re: Calling DoctorS in the House
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
seandragon,

You could use a timer to slow down the process.

Kent, MCA:

A better approach for the batch file would be:

code:
@echo off
if exist %windir%\system32\kix32.exe goto client
kix32.exe script.kix
goto end
:client
%windir%\system32\kix32.exe %logonserver%\netlogon\testras.kix
:end

On my system 2000 is installed on the F: drive. This batch would also work if the client PATH was invalid or screwed up, just calling by path might fail on some clients. NT/2000/XP (according to MS) already know where they are in the environment during logon, so they don't need to be told the path to the logon server either. So would work on all logon servers as well.

Top
#24792 - 2002-07-11 10:45 PM Re: Calling DoctorS in the House
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
thanks doc...
golfscore?
_________________________
!

download KiXnet

Top
#24793 - 2002-07-11 10:49 PM Re: Calling DoctorS in the House
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Hey... Lonkero!

Are you working on an installation package for your BB checker? or a least a zip file that includes everything needed? Also maybe posting a NEW topic so that the links are at the top instead of being buried somewhere on page 3 or so of the post!

Top
#24794 - 2002-07-11 11:12 PM Re: Calling DoctorS in the House
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
doc, it will be.
it just is in beta.
we are developing kixforms at the same time with my code.

I will do a new topic for actual release.
this one is not something I want to release (read = not perfect)

it actually was my intend to do selfinstallation package same way I did for bbcodeparser.
just don't know should I publish it and then when get TNG kixforms do other release or...

some things are still open and shawn should give me some improvement code today.

when it get's complex enough, I'll going on with first actual release.

cheers,
_________________________
!

download KiXnet

Top
#24795 - 2002-07-11 11:43 PM Re: Calling DoctorS in the House
seandragon Offline
Fresh Scripter

Registered: 2002-07-09
Posts: 17
Lonkero,

How do you go about that? I apologize for my lock of knowledge in this.
[Confused]

Top
Page 1 of 2 12>


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

Who's Online
0 registered and 837 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.116 seconds in which 0.066 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