Page 1 of 2 12>
Topic Options
#157768 - 2006-02-23 10:56 PM Login Script Help
joshuaer Offline
Fresh Scripter

Registered: 2006-02-09
Posts: 15
I can run my login script localy and it works perfectly, but when I log off my machine and log back in so it runs the script from the server I only get one drive mapped "T" , any Ideas. It is a very basic script

$REGkey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" WRITEVALUE($REGkey,"HideFileExt","00000000","REG_DWORD")

If InGroup("urfcu-tech")
USE "T:" "\\fileserv\dept\tech$"
If AddPrinterConnection ("\\unity\brotherh") = 0
? "Added printer connection...."
If SetDefaultPrinter ("\\unity\brotherh") = 0
? "Set default printer to \\unity\brotherh"
Endif

IF INGROUP("urfcu-cs")
USE "S:" "\\fileserv\cardsource"
EndIf

IF INGROUP("Domain Users")
USE "P:" "\\fileserv\apps\apps"
EndIf

I am very green to this KixStart, so any help would be appreciated.

Top
#157769 - 2006-02-23 11:05 PM Re: Login Script Help
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
Hi Joshuaer and welcome to korg
remove the quotes from around the drive and you might consider using the /persistant switch like this:
Code:

USE T: "\\fileserv\dept\tech$" /Persistant

_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#157770 - 2006-02-23 11:40 PM Re: Login Script Help
joshuaer Offline
Fresh Scripter

Registered: 2006-02-09
Posts: 15
Ok I changed it but still the same result. The T: loads just fine but the printer, P: and S: still do not load unless I run the script from my machine

$REGkey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
WRITEVALUE($REGkey,"HideFileExt","00000000","REG_DWORD")


If InGroup("urfcu-tech")
USE T: "\\fileserv\dept\tech$" /Persistant
If AddPrinterConnection ("\\unity\brotherh") = 0
? "Added printer connection...."
If SetDefaultPrinter ("\\unity\brotherh") = 0
? "Set default printer to \\unity\brotherh"
Endif

IF INGROUP("urfcu-cs")
USE S: "\\fileserv\cardsource" /Persistant
EndIf

IF INGROUP("Domain Users")
USE P: "\\fileserv\apps\apps" /Persistant
EndIf

Top
#157771 - 2006-02-23 11:44 PM Re: Login Script Help
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
You state that the script works when you run it locally. How exactly are you doing that? Are you running the script from the server or are you running a local copy?

If you are running a local copy please update the script on the server. then verify that you scripts are replicating proper across your domain controllers.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#157772 - 2006-02-23 11:46 PM Re: Login Script Help
joshuaer Offline
Fresh Scripter

Registered: 2006-02-09
Posts: 15
when it works it is running from a local copy, every thing works great it will map all 3 drives and map the printer. I upload the same .kix file to the domain controller, then log off and log back in and it only maps the T:
Top
#157773 - 2006-02-24 12:04 AM Re: Login Script Help
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
It helps if you can spell PersistEnt.
I wonder though why you would want to map something persistent if it is mapped on every logon?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#157774 - 2006-02-24 12:22 AM Re: Login Script Help
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
Quote:

It helps if you can spell PersistEnt.



ooops, my bad


Edited by benny69 (2006-02-24 12:22 AM)
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#157775 - 2006-02-24 01:30 AM Re: Login Script Help
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
Well are you placing the files in the correct replication folder and then verifying that the PDC and ALL BDCs have the exact same copy of the files ?

If it works locally there is no reason it won't work the same from the Server during logon unless you have some other odd type of permissions or something like that.

Top
#157776 - 2006-02-24 08:40 AM Re: Login Script Help
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
You're forgetting to close the if-statments.

Code:
 
Dim $REGkey, $wr
$REGkey ="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"

$wr=WRITEVALUE($REGkey,"HideFileExt","00000000","REG_DWORD")

If InGroup("urfcu-tech")
USE T: "\\fileserv\dept\tech$"

If AddPrinterConnection ("\\unity\brotherh") = 0
? "Added printer connection...."
endif

If SetDefaultPrinter ("\\unity\brotherh") = 0
? "Set default printer to \\unity\brotherh"
endif
Endif

IF INGROUP("urfcu-cs")
USE S: "\\fileserv\cardsource"
EndIf

IF INGROUP("Domain Users")
USE P: "\\fileserv\apps\apps"
EndIf



Edited by ewook (2006-02-24 01:41 PM)

Top
#157777 - 2006-02-24 09:20 AM Re: Login Script Help
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
Give this a try and let us know.


Dim $REGkey,$Update
$REGkey='HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced'
$Update=WriteValue($REGkey,'HideFileExt','00000000',REG_DWORD)
If @ERROR 'Error updating registry: ' + @ERROR + ' ' + @SERROR ? EndIf

If InGroup(@Domain+'\'+'urfcu-tech')
USE T: /DELETE /PERSISTENT
USE T: '\\fileserv\dept\tech$' /PERSISTENT
If @ERROR 'Error mapping T drive: ' + @ERROR + ' ' + @SERROR ? EndIf
;if you're going to map each logon then no need for the /PERSISTENT switch
If AddPrinterConnection ('\\unity\brotherh') = 0
'Added printer connection....' ?
Else
'Error adding printer UNITY\Brotherh ' + @ERROR + ' ' + @SERROR ?
EndIf
If SetDefaultPrinter('\\unity\brotherh') = 0
'Set default printer to \\unity\brotherh' ?
Else
'Error setting default printer to UNITY\Brotherh: ' + @ERROR + ' ' + @SERROR ?
Endif
EndIf

If InGroup(@Domain+'\'+'urfcu-cs')
USE S: /DELETE /PERSISTENT
USE S: '\\fileserv\cardsource' /PERSISTENT
If @ERROR 'Error mapping S drive: ' + @ERROR + ' ' + @SERROR ? EndIf
EndIf

If InGroup(@Domain+'\'+'Domain Users')
USE P: /DELETE /PERSISTENT
USE P: '\\fileserv\apps\apps' /PERSISTENT
If @ERROR 'Error mapping P drive: ' + @ERROR + ' ' + @SERROR ? EndIf
EndIf

Top
#157778 - 2006-02-24 09:27 AM Re: Login Script Help
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
Haha, you can't get more error-reporting out of that script ;P neatly done indeed.

But, I do have one question for you now.. you tend to use '?' After the line you wish to print - you flip it. How come? =)
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#157779 - 2006-02-24 10:21 AM Re: Login Script Help
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Because "?" is not a print statement. There is an FAQ on this if you are interested.

In fact putting "?" at the start of the line that you want to output is probably not the best way of doing it, as it doesn't allow earlier code to determine where the output will start.

The "?" at the start of the output line is how most of the examples in the KiXtart manual are written, which has lead to the misconception that it is a "print" command.

In most cases it doesn't matter, so long as you understand what it is actually doing.

Top
#157780 - 2006-02-24 10:24 AM Re: Login Script Help
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
oh. I didn't know that. I will check the FAQ.
And yes, that is why I assumed that it was a print-command.
Thanks for the answer =)
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#157781 - 2006-02-24 04:50 PM Re: Login Script Help
joshuaer Offline
Fresh Scripter

Registered: 2006-02-09
Posts: 15
Ok I tried both configs that you suggest (thank you both) but I am still having the same issue, it runs fine localy but only maps the T: when run from the server script. I have check the permissions on all folders I am trying to map and they are all the same. I am taking over this network from an administrator who had no prior experiance with networking so I am not sure if that may be the cause for my problems, but are there any other suggestions? Thank you
Top
#157782 - 2006-02-24 05:07 PM Re: Login Script Help
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Could you be running two different versions of KiXtart - one on the local computer and something different from the server? If so, the version on the server may be sufficiently old that it can not properly interpret the script and ABENDs.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#157783 - 2006-02-24 05:19 PM Re: Login Script Help
joshuaer Offline
Fresh Scripter

Registered: 2006-02-09
Posts: 15
I just tried copying the kixtart files from my local machine to the server and I have the same result
_________________________
www.omfgservers.com

Top
#157784 - 2006-02-24 05:24 PM Re: Login Script Help
joshuaer Offline
Fresh Scripter

Registered: 2006-02-09
Posts: 15
In windows 2003 running active directory and exchange, is there a different place that it looks for the login script that you specify in the user profile other that netlogon?
_________________________
www.omfgservers.com

Top
#157785 - 2006-02-24 05:28 PM Re: Login Script Help
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Please post:

1: The value you have in the user account profile that calls the script.
2: The batch file use to invoke the script if item #1 calls a batch file.
3: The complete script you are attempting to execute.


Please try:

1: Open a CMD window
2: In the CMD window, invoke the same command adding the appropriate fully qualified UNC path for the command listed in the account profile.
3: Post the text ouput from the CMD window.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#157786 - 2006-02-24 05:32 PM Re: Login Script Help
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Read and configure your client according to: http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Number=111153
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#157787 - 2006-02-24 05:36 PM Re: Login Script Help
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Also:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

RunLogonScriptSync set REG_DWORD value 1
_________________________
Home page: http://www.kixhelp.com/hb/

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 293 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.072 seconds in which 0.023 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