Page 1 of 1 1
Topic Options
#190884 - 2008-12-06 08:52 PM Need Help Urgent for logon script
cyber444 Offline
Fresh Scripter

Registered: 2008-12-06
Posts: 7
Hello

first of all, i'm not an IT guy and i don't know much about scripting. In my company (50 users )I'm in accounting department but i also try to manage 2 servers, a dc and a file server, just for sharing files in the network , active directory running in server 2003.
client computers are xp pro with sp3.
I want to use KiXtart and see a logon screen when a user logs on.In the script i just need drive mapping, and a welcome screen with the name of the company(ASA CO) in big character and user info(username, domain, ip address, logon server.

i found this link, i need something like this
http://www.bluestream.org/Windows/LoginScripting.htm

i couldn't make the script work.I don't know how am i going to do it.
i downloaded Kix2010.4.60, where should i copy the files and the script file?
do i have to copy any files to the client computers for the script to run at logon.
If you can write a script with a few lines and tell me how to make it work, it would be very helpfull. İ searched the forum but i don't have enough information about scripting issues.(i'm trying to learn day by day)
thank you
Alex

Top
#190885 - 2008-12-07 12:48 AM Re: Need Help Urgent for logon script [Re: cyber444]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Welcome Alex.

Step 1 write down exactly what you want to accomplish
Step 2 Keep coming here for help
Step 3 Prepare to become addicted to scripting.

As to your questions.

I am a believer in no visible trace of the logon script. The users don't pay attention and they will think you are magician when it all just works.

As for mapping drives are there any qualifications of who gets what, or is everyone the same no matter what?

What about error logging?

As for installation of the program, you will only need to copy the Kix32.EXE and the WKix32.EXE to your netlogon share.

Once you have the script complete you will place it in your netlogon share as well and for each user, you will specifiy the logon script as "kix32.exe logon.kix" and you are done.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#190887 - 2008-12-07 12:43 PM Re: Need Help Urgent for logon script [Re: Gargoyle]
cyber444 Offline
Fresh Scripter

Registered: 2008-12-06
Posts: 7
Hi Gargoyle

thanks for your answer, everyone is going to get the same drive and the folder,so there is no need for a folder map for each group,


my problem is, i want to see the logon screen showing the username, ip address and name of the dc and then mapping the drive and then disappear, that's all, i think this is a very simple thing but as i said before i'm new to scripting and in my script just the map drive part works,i can not see the the logon screen.

Note: you are right The users won't pay attention.
here is my basic script, , how am i going to add username, ip address,dc


; *****************Section 1***********************
; Default Logon Script for ASA CO
;
; *****************Section 2***********************
; Clear Screen
CLS
;
Color g+/n
big ; Display in BIG character mode
at (2,10) "ASA"
;
sleep 2 ; Wait for 2 secs
;
; *****************Section 3***********************
;
CLS

ENDIF
;
at (12,22) "Please Wait For Logon script Execution"
at (13,22) "Progress"
;

;
; *****************Section 4***********************
;
; Map Drives to Server "
;
USE H: "\\servername\foldername"

;
at (13,32) ".."
;
sleep 1 ; Wait for 1 sec
;
EXIT

Top
#190888 - 2008-12-07 02:54 PM Re: Need Help Urgent for logon script [Re: cyber444]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Wrapping up, removed ENDIF statement (there was no IF to begin with).
Added 0 to Exit statement.
Removed empty lines.
 Code:
; *****************Section 1***********************
; Default Logon Script for ASA CO
; 
; *****************Section 2***********************
; Clear Screen
CLS
;
Color g+/n
Big ; Display in BIG character mode
at (2,10) "ASA"
;
sleep 2 ; Wait for 2 secs
;
; *****************Section 3***********************
;
CLS
;
at (12,22) "Please Wait For Logon script Execution"
at (13,22) "Progress"
;
;
; *****************Section 4***********************
;
; Map Drives to Server "
;
USE H: "\\servername\foldername"
;
at (13,32) ".."
;
sleep 1 ; Wait for 1 sec
;
EXIT 0

Top
#190889 - 2008-12-07 03:00 PM Re: Need Help Urgent for logon script [Re: Arend_]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Download Kixtart from the main website, in the package is a folder called "Samples" inside there amongst others is a script called "kixtart.kix" this one will show you everything you need I think, if you don't understand something about it please don't hesistate to ask us.
Top
#190890 - 2008-12-07 05:36 PM Re: Need Help Urgent for logon script [Re: cyber444]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
Your script may not be displaying due to the default GPO settings. By default, the login script runs minimized.

I take the middle ground in login script visibility - I force my login scripts to run visibly, and even force them to remain on the screen for 15 minutes if an error occurs (unless they actually read the message and press a key). If all goes well, the login script flashes and disappears in 3-4 seconds. I color code the resource mappings - green for good and red for fail. A failure causes the script to not close and asks the user to contact the help desk. If a login script runs minimized, errors can occur and the user would never know.

There are two GPO settings - Run Login Scripts Visible (default false) and Run Login Scripts Synchronously (default false). I change both of these - the first to allow the script to run visibly and the other to prevent the desktop from appearing until the login script completes.

If you're not comfortable with setting GPO properties, you can download the pre-built login script from my web site. No need to know scripting (in fact, you can't modify it) - just create a config file to define the resources you want to map. Some advantages:
  • No script knowledge needed
  • The core display is customizable - just create a "LoginDisplay.kix" file with the display info and format you want. This runs after the script initializes but before any resource mapping is performed. This requires a minimal understanding of macros, variables, and "?" to create basic screen output. (avoid use of AT!! It's unnecessary and mostly inappropriate outside of doing plain-text forms input.)
  • Simple configuration of resource records, yet powerful mapping parameters to decide what and how resources are mapped.
  • Path rewriting - change the UNC path based on user, site, subnet, or OU.
  • Support for per-user configuration files - perfect for testing or special user situations.
  • Fully supported - we offer free startup support via email on up through complete site engineering and training for a reasonable fee.

For your simple configuration, the LOGIN.INI file would contain
 Code:
# ForceVisible is a boolean value that forces the login script to run in a maximized window
ForceVisible=y
# Minimum tune to display the login script window (in seconds)
# Insures that the window id displayed for at least "n" seconds in fast environments
MinimumDisplayTime=6

[H_DRIVE]
CLASS=DISK
TARGET=H:
PATH=\\server\share
DESC=Common data share

You'd then create a LoginDisplay.kix script with the following:
 Code:
Color g+/n
Big ; Display in BIG character mode
'ASA' ?
Small     ; rest in normal size text
'whatever else you want to display...' ?

There are dozens of variables available to you from the login script initialization at this point, all documented in the readme. You can use any of them along with macros to display what you want. The resource mappings will automatically display after your initial message, successful maps in green, unsuccessful in red.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#190891 - 2008-12-07 10:30 PM Re: Need Help Urgent for logon script [Re: Glenn Barnas]
cyber444 Offline
Fresh Scripter

Registered: 2008-12-06
Posts: 7
Thank you all, it works very well.everyday i'm learning
My last question is, it runs minimized, is there way to see it running on the screen,i want to see maximized, do i have to a line to the script ? or is it a windows server or a gpo setting?

Top
#190892 - 2008-12-07 11:39 PM Re: Need Help Urgent for logon script [Re: cyber444]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
Did you read my post? I mentioned two GPO settings that relate to login scripts - the default is to run minimized unless you change them. My script overrides that setting programatically.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#190901 - 2008-12-08 10:41 AM Re: Need Help Urgent for logon script [Re: Glenn Barnas]
cyber444 Offline
Fresh Scripter

Registered: 2008-12-06
Posts: 7
it's ok, i've found it in the manual,
SETCONSOLE(maximize), now it is maximized during logon

what i couln't find on the manual is changing color, i mean i want a color that is not in the manual, orange for instance,

can we have different colors than the ones in the manual ?
it says n for black,r for red ...etc. how do we get orange? or other color that are not in the manual?

Top
#190903 - 2008-12-08 10:51 AM Re: Need Help Urgent for logon script [Re: cyber444]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
As far as I know you are limited to the colours that are in the manual.

If you want different colours then you could use kixforms but that would mean changing the entire script so there is no more screen output and all needed/wanted info is displayed on the form.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#190906 - 2008-12-08 12:16 PM Re: Need Help Urgent for logon script [Re: Mart]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
not to mention registering KixForms.dll on every workstation... \:\(

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#190907 - 2008-12-08 12:22 PM Re: Need Help Urgent for logon script [Re: Glenn Barnas]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Yep. Good old sneakernet isn’t dead yet
But this can also be done with a GPO that installs the MSI package. Just to save on sneakers wear and tear.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#190909 - 2008-12-08 12:47 PM Re: Need Help Urgent for logon script [Re: Mart]
cyber444 Offline
Fresh Scripter

Registered: 2008-12-06
Posts: 7
ok, i will use gpo to register the dll file,

thanks for your support

Alex

Top
#190911 - 2008-12-08 01:27 PM Re: Need Help Urgent for logon script [Re: cyber444]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
It is not just the dll. You also need to review the entire script. The kixforms dll does not open up a bucket of colours that can be used as colours for console text.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#190924 - 2008-12-08 09:01 PM Re: Need Help Urgent for logon script [Re: Mart]
cyber444 Offline
Fresh Scripter

Registered: 2008-12-06
Posts: 7
by the way, can we add bmp,jpeg or any other picture format in the script for company logo.

while it starts running, i maximized the script window, can i add a small logo into the script to show it, in any format like jpeg, bmp or other?
of course first i should use kixform but how,

i have the msi package of kixforms and i can distribute it with gpo. what's next?


Edited by cyber444 (2008-12-08 09:38 PM)

Top
#190928 - 2008-12-08 10:13 PM Re: Need Help Urgent for logon script [Re: cyber444]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
KixForms is another whole level of scripting. You would do best by posting your questions on that board http://www.kixforms.org

Look at some of the scripts over at the site as well so that you can begin to get an idea of what can be accomplished.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#190941 - 2008-12-09 05:49 AM Re: Need Help Urgent for logon script [Re: Gargoyle]
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Why the need for all this fancy stuff? Will the end-users even care about it? Logon scripts should be un-intrusive and just do their jobs without intrfering too much with a quick logon process.
_________________________
There are two types of vessels, submarines and targets.

Top
#190948 - 2008-12-09 10:53 AM Re: Need Help Urgent for logon script [Re: Sealeopard]
cyber444 Offline
Fresh Scripter

Registered: 2008-12-06
Posts: 7
yeah i know, they don't care, in fact i have vbs script running and users don't know about it \:\)

it is just to improve my knowlegde, and it is very exciting to write a script and see it running and working on it to make it better. thanks all for your help \:\)

Alex

Top
Page 1 of 1 1


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

Who's Online
0 registered and 685 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.084 seconds in which 0.037 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org