#190884 - 2008-12-06 08:52 PM
Need Help Urgent for logon script
|
cyber444
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
|
|
|
|
#190887 - 2008-12-07 12:43 PM
Re: Need Help Urgent for logon script
[Re: Gargoyle]
|
cyber444
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_
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.
; *****************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
|
|
|
|
#190890 - 2008-12-07 05:36 PM
Re: Need Help Urgent for logon script
[Re: cyber444]
|
Glenn Barnas
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
# 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:
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!
|
|
Top
|
|
|
|
#190891 - 2008-12-07 10:30 PM
Re: Need Help Urgent for logon script
[Re: Glenn Barnas]
|
cyber444
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
|
|
|
|
#190901 - 2008-12-08 10:41 AM
Re: Need Help Urgent for logon script
[Re: Glenn Barnas]
|
cyber444
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
|
|
|
|
#190909 - 2008-12-08 12:47 PM
Re: Need Help Urgent for logon script
[Re: Mart]
|
cyber444
Fresh Scripter
Registered: 2008-12-06
Posts: 7
|
ok, i will use gpo to register the dll file,
thanks for your support
Alex
|
|
Top
|
|
|
|
#190924 - 2008-12-08 09:01 PM
Re: Need Help Urgent for logon script
[Re: Mart]
|
cyber444
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
|
|
|
|
#190948 - 2008-12-09 10:53 AM
Re: Need Help Urgent for logon script
[Re: Sealeopard]
|
cyber444
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
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(StuTheCoder)
and 798 anonymous users online.
|
|
|