Page 1 of 1 1
Topic Options
#63819 - 2002-03-14 06:29 PM Windows NT, 2000 machines' PATH grows!
gakjones Offline
Fresh Scripter

Registered: 2002-03-14
Posts: 9
Loc: USA
Help! My kixtart file is a result of a migration from novell to NT. I now also have win 2000 machines and their paths keep getting longer with the same lines. Any Suggestions?
Here is an exerpt of the script:
NOTE: I've commented out the lines with SETM to keep the problem from growing for now.

$STARTPATH = %PATH% - As far as I know this is only being used by the win9x machines.

IF INGROUP("LTC USERS") = 2

IF @INWIN=1
;SETM "LTC=G:\LTC"
ELSE
SHELL("WINSET LTC=G:\LTC")
ENDIF

ENDIF

IF INGROUP("CCMAIL USERS") = 2

IF @INWIN=1

;SETM "PATH=%PATH%;G:\LOTUS\CCMAIL;G:\LOTSHARE"
ELSE

$CCMAILPATH = "G:\LOTUS\CCMAIL;G:\LOTSHARE;"
$STARTPATH = $STARTPATH + $CCMAILPATH
;SHELL "WINSET PATH=%PATH%;G:\LOTUS\CCMAIL;G:\LOTSHARE"

ENDIF
ENDIF

IF INGROUP("IQWIN USERS") = 2

IF @INWIN=1
;SETM "PATH=%PATH%;G:\IQWIN"
ELSE

$IQWINPATH = "G:\IQWIN;"
$STARTPATH = $STARTPATH + $IQWINPATH
;SHELL "WINSET PATH=G:\IQWIN;%PATH%"
ENDIF
ENDIF

Here is the result of about 7 reboots to see what PATH equals:
Path=\\GAP-NT-FS-1\NETLOGON;\\GAP-NT-FS-1\NETLOGON;\\GAP-NT-FS-1\NETLOGON;\\GAP-NT-FS-1\NETLOGON;\\GAP-NT-FS-1\NETLOGON;\\GAP-NT-FS-1\NETLOGON;\\GAP-NT-FS-1\NETLOGON;\\GAP-NT-FS-1\ NETLOGON;\\GAP-NT-FS-1\NETLOGON;\\GAP-NT-FS-1\NETLOGON;\\GAP-NT-FS-1\NETLOGON;\\GAP-NT-FS-1\NETLOGON;\\GAP-NT-FS-1\NETLOGON;\\GAP-NT-FS-1\NETLOGON;\\GAP-NT-FS-1\NETLOGON;\\GAP-NT-F S-1\NETLOGON;\\GAP-NT-FS-1\NETLOGON;\\GAP-NT-FS-1\NETLOGON;\\GAP-NT-FS-1\NETLOGON;\\GAP-NT-FS-1\NETLOGON;\\GAP-NT-FS-1\NETLOGON;\\GAP-NT-FS-1\NETLOGON;\\GAP-NT-FS-1\NETLOGON;\\GAP- NT-FS-1\NETLOGON;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Symantec\pcAnywhere\;G:\IQWIN;G:\IQWIN;G:\IQWIN;G:\IQWIN;G:\IQWIN;G:\IQWIN;G:\IQWIN;G:\IQWIN;G:\IQWIN;G:\IQWIN;G:\IQWIN;G:\IQWIN;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Common Files\American HealthTech;G:\IQWIN;G:\IQWIN;G:\IQWIN;G:\IQWIN;G:\IQWIN;G:\IQWIN;G:\IQWIN;G:\IQWIN;G:\IQWIN;G:\IQWIN;G:\IQWIN;G:\IQWIN

Again, Any help is greatly appreciated!!

Top
#63820 - 2002-03-14 06:49 PM Re: Windows NT, 2000 machines' PATH grows!
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
Do a simple instr() against the %path% to make sure that what you want to add is not already in there.

code:
if instr(%path%,$pathtoadd) = 0
;the $pathtoadd is not in the %path% statment.
setm....
endif

Once it has been added the instr() command will prevent the setm command from running again.

Bryce

[ 14 March 2002, 18:51: Message edited by: Bryce ]

Top
#63821 - 2002-03-14 08:09 PM Re: Windows NT, 2000 machines' PATH grows!
gakjones Offline
Fresh Scripter

Registered: 2002-03-14
Posts: 9
Loc: USA
Thanks for the reply! It worked for the most part! Now the only replicating line is the \\GAP-NT-FS-1\Netlogon line. any ideas?
Top
#63822 - 2002-03-22 02:16 PM Re: Windows NT, 2000 machines' PATH grows!
DiCeR Offline
Fresh Scripter
*

Registered: 2002-03-11
Posts: 7
Loc: Oslo, Norway
Use the Microsoft PathManager.Exe?

It has pretty simple way of adding to user or system environment, and also some sanity-check of the path. For your Windows 2000 needs it might replace your use of WINSET... [Smile]

Top
#63823 - 2002-03-22 07:44 PM Re: Windows NT, 2000 machines' PATH grows!
gakjones Offline
Fresh Scripter

Registered: 2002-03-14
Posts: 9
Loc: USA
I''l check it out though the winset is only used by the win9x machines. Thanks!
Top
Page 1 of 1 1


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

Who's Online
0 registered and 2870 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.063 seconds in which 0.034 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