Page 1 of 1 1
Topic Options
#138017 - 2005-04-14 11:20 PM Script stops working....why?
Mouse51180 Offline
Fresh Scripter

Registered: 2005-04-14
Posts: 6
I have created a small script that when the user logs in, it checks their groups and maps the appropriate drives in reference to those groups during logon. The script seems to run fine, until it has run 5-10 times. Then it just stops running all together.

The funny thing is if I copy one of the example .kix files into my servers and have them run during startup, everything is fine so then I copy my script back over the example and my script starts working...for about 5-10 times...then it stops working again.

I have the /f command on the test accounts login script box. I have checked the registry and I have the kixtart folder in the software section of the hkey_current_user, but nothing under that folder, so I guess the /f command is working.

Any ideas or have I completely lost everyone?

Top
#138018 - 2005-04-14 11:40 PM Re: Script stops working....why?
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Can you show us what your script is? Sorry, crystal ball is broken.

BTW, Welcome to the board.

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

Top
#138019 - 2005-04-14 11:52 PM Re: Script stops working....why?
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Sounds like some kind of funky replication issue. You replace the script, then it gets trashed on a replication cycle, say 10 minutes later.

-Shawn

Top
#138020 - 2005-04-15 03:36 PM Re: Script stops working....why?
Mouse51180 Offline
Fresh Scripter

Registered: 2005-04-14
Posts: 6
Here is my script - Where it says my script actually has the share loction it doesnt say ... if that makes any sense:

COLOR r+/n at(2,2) "Initializing Logon Script - Please Stand By"
SETTIME "*"
CLS

COLOR y+/n at(2,2) BOX (2,2,17,67,Double)
COLOR b+/n at(3,3) BOX (3,19,5,49,Full)
COLOR w+/n at(4,21) "Welcome to Joe Gibbs Racing"
COLOR w+/n at(7,6) "Welcome back:" COLOR y+/n at(7,21) "@fullname"
COLOR w+/n at(8,6) "Today is:" COLOR c+/n at(8,17) "@Day - @Month @Day, @Year"
COLOR w+/n at(9,6) "The current time is:" COLOR c+/n at(9,29) "@Time"
COLOR y+/n at(12,6) "Please standby as we map your network drives:"


USE H: "\\App-Server\Homefolders$\@userid"

If InGroup ("IT Admins")
USE Z: "\\\IT Folders"
EndIf
If InGroup ("Marketing Group")
USE Y: "\\\Marketing"
EndIf

CLS
COLOR y+/n at(2,2) BOX (2,2,17,67,Double)
COLOR b+/n at(3,3) BOX (3,19,5,49,Full)
COLOR w+/n at(4,21) "Welcome to Joe Gibbs Racing"
COLOR w+/n at(7,6) "Welcome back:" COLOR y+/n at(7,21) "@fullname"
COLOR w+/n at(8,6) "Today is:" COLOR c+/n at(8,17) "@Day - @Month @Day, @Year"
COLOR w+/n at(9,6) "The current time is:" COLOR c+/n at(9,29) "@Time"
COLOR g+/n at(12,6) "Drive Mapping Complete!"
COLOR w+/n at(13,6) "Have a nice day :-P"
SLEEP 2
COLOR r+/n at(15,6) "Press Any Key to Exit"
get $x
break

Top
#138021 - 2005-04-15 03:39 PM Re: Script stops working....why?
Mouse51180 Offline
Fresh Scripter

Registered: 2005-04-14
Posts: 6
By the way...just to add to the info...
I ran the script until it broke again last night...then tried to run it again this morning to see if there is just some strage replication issue somewhere in my domain, but the script is still broken.

I copied the script and the .dll files to my local pc and ran the script manually and everything mapped and worked fine. Just cant get it to run from the server automatically everytime.

Thanks for your help

Top
#138022 - 2005-04-15 06:48 PM Re: Script stops working....why?
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
What version of KiXtart are you running?

What is BREAK? I believe you want BREAK ON or BREAK OFF. That is, BREAK gives you the ability to Break in on a script.

Here is the script changed to be more of what you are looking for:
Code:

CLS
BREAK ON

COLOR r+/n at(2,2) "Initializing Logon Script - Please Stand By"
;SETTIME "*"

COLOR y+/n at(2,2) BOX (2,2,17,67,Double)
COLOR b+/n at(3,3) BOX (3,19,5,49,Full)
COLOR w+/n at(4,21) "Welcome to Joe Gibbs Racing"
COLOR w+/n at(7,6) "Welcome back: "
COLOR y+/n at(7,21) @fullname
COLOR w+/n at(8,6) "Today is: "
COLOR c+/n at(8,17) @Day+" - "+@Month+" "+@Day+", "+@Year
COLOR w+/n at(9,6) "The current time is: "
COLOR c+/n at(9,29) @Time
COLOR y+/n at(12,6) "Please standby as we map your network drives:"


USE H: "\\App-Server\Homefolders$$\"+@userid

If InGroup("IT Admins")
USE Z: "\\\IT Folders"
EndIf
If InGroup("Marketing Group")
USE Y: "\\\Marketing"
EndIf

COLOR g+/n at(12,6) "Drive Mapping Complete!"
COLOR w+/n at(13,6) "Have a nice day :-P"
SLEEP 2
COLOR r+/n at(15,6) "Press Any Key to Exit"
get $x



You may also want to check into SETTIME with 2000/XP machines as they will automatically sync time throughout the day.

Also, you may need to double-up on the $ for Homefolders$ as older versions of KiX will want to use this.

Thanks,

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

Top
#138023 - 2005-04-15 06:56 PM Re: Script stops working....why?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
What's with the triple hacks?
USE Z: "\\\IT Folders"

You talk about copying DLLs and then I see Z: drive map. Either you don't understand DLLs or you don't understand about the Z: drive or both. DLLs are exclusively for Win9x/ME and Z: cannot be mucked with in a logon script on WIn9x/ME.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#138024 - 2005-04-15 10:22 PM Re: Script stops working....why?
Mouse51180 Offline
Fresh Scripter

Registered: 2005-04-14
Posts: 6
Ok to answer everyones questions:

kdyer: (1) - Im running 4.23 version of Kixtart.
(2) - I was using "Break" to exit the program. For some reason if I used exit or end, it would act funny so I just tried adding break to exit the program and it seem to work so I didnt ask question.
(3) - I needed the time to be set during login because the opening screen displays the time and I didnt want that to be incorrect. I know the time gets synced throughout the day on Win 2000 and higher machines.
(4) - As for doubling up on the $. I have Kixtart running off a server and everything in my domain is Win 2000 or XP so I didnt see a need to double up on the $. I tested it on both systems and that part seem to work fine.

Les: (1) - I am well aware of how and what .DLLs are. MY code does not have \\\IT Folders and when I copied the script I replaced some of the location code with "share location" but used <> instead of "". I also explained this at the top of the script, but im not going to fight about that. Apprently this part was taken out when I copied this into my post. So the actual script says:

USE Z: "\\"SOURCE LOCATION"\IT Folders"

Top
#138025 - 2005-04-15 11:18 PM Re: Script stops working....why?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
Mouse... I don't see where anyone is trying to "fight" with you. They are simply pointing out potential issues with either your code or at least the code that you posted.

You can ignore some of those things, but later on as you become more proficient at scripting you'll find that it will start to bite you back. Learning to code better should always be valuable to anyone, not just yourself.

I learn more about coding almost daily.

Top
#138026 - 2005-04-15 11:31 PM Re: Script stops working....why?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Mouse,
No need to get your knickers in a twist. You said "I copied the script and the .dll files to my local pc" but NT/2K/XP does NOT use and should not have the DLLs. Later in your script, you muck with Z: but Wintendos, which BTW are the only macines that need the DLLs, should not have their Z: drives messed with. You come on board here, demanding answers but you don't give us anything to go on, leaving us to stare at our crystal ball or pull the info through your nose.

You talk about the /F command but you say nothing about what version of KiX or OS you have. You could learn a thing or two about providing good info.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#138027 - 2005-04-18 08:04 PM Re: Script stops working....why?
Mouse51180 Offline
Fresh Scripter

Registered: 2005-04-14
Posts: 6
Well I appologize. It sounds like a few of us have taken a few of these post out of context. I am sorry for not posting all the script and all the system variables. I didnt think they were relavent because the script runs fine. It seems more like a networking or AD issues then anything else. I am sorry if it sounds like I have come on here "demanading" information. I just wanted to know if anyone had seen this in the past, but it seems like we are all stumped.

I will continue to play around with this and I will post anything I find.

Top
#138028 - 2005-04-18 08:43 PM Re: Script stops working....why?
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
I really think that Les nailed with the three "\\\".

You have for example:
Code:

USE Z: "\\\IT Folders"



It really needs to be:
Code:

USE Z: "\\IT Folders"



And looking at this, what server is this going to?

Shouldn't it not be:
Code:

USE Z: "\\SOME_SERVER\IT Folders"



?

HTH,

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

Top
#138029 - 2005-04-18 08:51 PM Re: Script stops working....why?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Kent,
If you read carefully, mouse admits that when he sanitized his script for posting, he inadvertently stripped out the servername and failed to put in a placeholder.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

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 1057 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

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