James_Ford
(Lurker)
2003-11-18 06:49 PM
Netlogon Command Shell Window

I have recently created a login script which displays user information and mappes local drives according to group membership. I implemented Kixtart by using a kix file and placing Kix32 in the Netlogon directory of the Domain controller and setting Kix32.exe as the login script. Everything has worked fine except that the kixtart script runs minimized instead of in maximized mode. Does anyone know how to run kixtart so when users log on they will see the kixtart window.

MCA
(KiX Supporter)
2003-11-18 07:20 PM
Re: Netlogon Command Shell Window

Dear,

Welcome to the board.

Use SetConsole("Maximize") and SetConsole("AlwaysOnTop") at the beginning of your script.
greetings.


James_Ford
(Lurker)
2003-11-18 07:39 PM
Re: Netlogon Command Shell Window

Using Setconsole("maximized"), the window is maximized over the correct portions of the window and "alwaysontop" doesn't seem to do the trick. Here is a copy of the code I am using:

Code:

; Domain Logon Script
; Written by: James Ford
; Created: November 1, 2003
; Description: Displays a login screen to users
; Deletes old mappings and creates new ones depending on group membership
; Revisions
; 11/10/2003
; Enabled the script to run in maximized mode displaying content to users

BREAK ON ; Disables users ability to interrupt the kixtart script

If SetConsole ("maximize") = 0
? "Console Maximized......"
Endif
cls

CLS ; Clears the screen
Color b/b ; Sets the Background Color of Splash Screen
Box (0,0,24,79,GRID) ; Size & Position of Splash Screen
Color n+/n ; Border of Inner Box
Box (7,20,17,60,FULL) ; Size & Position of Inner Box

$Title = "Public Safety Network Login" ; Variable Definition
Color n+/n ; Sets Color of Title Border
Box ( 2, 2, 4, Len ($Title + 8) + 4, FULL ) ; Size & Position of Title Border
Color c+/n ; Sets Color of Title Text
At ( 3, 4 ) $Title ; Display the institutions name

Color w+/n ; Sets the Color of the Text
AT ( 9,25) "Userid : " ; Displays Text inside Inner Box
AT (10,25) "Full name : " ; Displays Text inside Inner Box
AT (11,25) "Privilege : " ; Displays Text inside Inner Box
AT (12,25) "Workstation : " ; Displays Text inside Inner Box
AT (13,25) "Domain : " ; Displays Text inside Inner Box
AT (14,25) "Logon Server : " ; Displays Text inside Inner Box
AT (15,25) "Windows Version : " ; Displays Text inside Inner Box

Color c+/n ; Sets the Color of the Text
AT ( 9,40) @userid ; Displays User ID
AT (10,40) @fullname ; Displays Users Full Name
AT (11,40) @priv ; Displays users Domain Privelege
AT (12,40) @wksta ; Displays the name of the Workstation
AT (13,40) @domain ; Displays the Domain Name
AT (14,40) @lserver ; Displays the name of the Domain Controller
AT (15,43) @dos ; Displays the current Time
Sleep 5

:Domain_Admin
If InGroup ("Domain Admins")
CLS
AT (13,30) "Mapping Additional Drives"
Use p: "\\viking-fairfax\share"
EndIf

If InGroup ("Domain Users")
CLS
AT (13,30) "Mapping Additional Drives"
Use p: "\\viking-fairfax\share"
EndIf

If InGroup ("FTP Admins")
CLS
AT (13,30) "Mapping Additional Drives"
Use o: "\\psmagic1\FTP"
EndIf

:END
Exit



MCA
(KiX Supporter)
2003-11-19 12:00 AM
Re: Netlogon Command Shell Window

Dear,

Which environment you are running it? Are you using WKIX32 instead of KIX32?
greetings.


James_Ford
(Lurker)
2003-11-19 12:09 AM
Re: Netlogon Command Shell Window

I am using kix32. I can only acheive the desired effect by calling Kix32.exe from a batch file. I created a batch file called kix.bat that includes the following:

START /WAIT %logonserver%\netlogon\kix32.exe %logonserver%\netlogon\kixtart.kix
exit

This batch file calls kixtart.kix which is now displayed to the user. If anyone knows an easier way to do this, please let me know.


MCA
(KiX Supporter)
2003-11-19 12:39 AM
Re: Netlogon Command Shell Window

Dear,

You can put those information into a string, which value will be displayed by the MessageBox function.
greetings.


MCA
(KiX Supporter)
2003-11-19 12:47 AM
Re: Netlogon Command Shell Window

Dear,

In which windows version you are running it?
Are you trying also the statement

%logonserver%\netlogon\kix32.exe %logonserver%\netlogon\kixtart.kix to run?

We see which effect you are trying to get. Possible, that kixforms is a good extension of kixtart. Special
information about it you can find on the COM forum and the site www.kixforms.com
greetings.


Les
(KiX Master)
2003-11-19 01:34 AM
Re: Netlogon Command Shell Window

Have youe set the RunLogonSync policy to enable the script to be visible? If not, check your GPO settings or search our FAQ.

Kdyer
(KiX Supporter)
2003-11-19 02:20 PM
Re: Netlogon Command Shell Window

Les is correct..

However, is there not a GPO that can do this as well?

Anyway - here is the post:
W2/XP - Keep the Window visible on login?

KiXtart FAQ & How to's

HTH,

Kent




Les
(KiX Master)
2003-11-19 02:34 PM
Re: Netlogon Command Shell Window

Kent,
Did I miss something?
Quote:

...RunLogonSync policy...check your GPO settings...



Actually, I did... it is RunLogonScriptSync