Page 1 of 1 1
Topic Options
#114083 - 2004-02-16 05:11 PM Add to Path statement? Win2k & Win9x
Sean_M Offline
Fresh Scripter

Registered: 2001-04-26
Posts: 11
First off, I'm new to Kixtart so I appologize if this is a lame question.

I need to be able to add to every users Path statement on login but I'm unable to figure out a solution for both Win2k and Win9x.
Can you please help me with the code?

Top
#114084 - 2004-02-16 05:19 PM Re: Add to Path statement? Win2k & Win9x
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Have you looked at the SET, SETL, SETM commands in the manual. They even come with examples.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#114085 - 2004-02-16 05:21 PM Re: Add to Path statement? Win2k & Win9x
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See the various SET statements in the KiXtart Manual and the PathMod() UDF in the UDF Forum..
_________________________
There are two types of vessels, submarines and targets.

Top
#114086 - 2004-02-17 05:09 PM Re: Add to Path statement? Win2k & Win9x
Sean_M Offline
Fresh Scripter

Registered: 2001-04-26
Posts: 11
I appreciate the help but since I'm an idiot I cannot get neither SET, SETM or SETL to work in Win2k nor Win9x.
Can you please, please, PLEASE spell this out for me.

Here is the login script, drives map fine but I NEED to have a path statement added to H: because of the horrible way the Novell administrator set things up.

---------------------------------
SetConsole ("HIDE")
CLS

If InGroup ("MAHQ")
Use H: "\\xxxxx\@userid$"
EndIf

If InGroup ("Domain Admins")
Use I: "\\xxxxx\software"
EndIf

CLS

SETM "Path=H:\Lotus\Notes\"

; END OF GROUP MAPPINGS
Exit






Edited by Sean_M (2004-02-17 05:10 PM)

Top
#114087 - 2004-02-17 05:20 PM Re: Add to Path statement? Win2k & Win9x
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
SETM requires administrative privileges under Windows NT/2000/XP.

Did you even take a look at the PathMod() UDF? Did you read the Kixtart manual with regards to the differences between SET/SETL/SETM?

You could also add the path domain-wide via remote registry writes along the lines of the PathMod() UDF.

Code:

SET "PATH="H:\Lotus\Notes\"


However, this will remove any other path that has been associated with the PATH environment variable. Better isCode:

SET "PATH="%PATH%;H:\Lotus\Notes\"

, however you should check whether the path is already included in %PATH%.
_________________________
There are two types of vessels, submarines and targets.

Top
#114088 - 2004-02-17 05:38 PM Re: Add to Path statement? Win2k & Win9x
Sean_M Offline
Fresh Scripter

Registered: 2001-04-26
Posts: 11
Thank you for your help sealeopard, I'm sorry for being a pain but this probably comes alot easier to you then it does me. I shouldn't even be doing this crap but someone quit and now I'm stuck.

I did read the UDF on PathMod but since I have no coding background it was all greek to me. I also read the manual and searched for examples on this forum but found none with regard to Path statements.

I'll give your suggestions a try. thanks!


Edited by Sean_M (2004-02-17 06:10 PM)

Top
#114089 - 2004-02-17 06:36 PM Re: Add to Path statement? Win2k & Win9x
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Jens,
I am counting an odd number of quotes there.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#114090 - 2004-02-17 07:59 PM Re: Add to Path statement? Win2k & Win9x
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Oops, yeah, I guess it should be like
Code:

SET "PATH=%PATH%;H:\Lotus\Notes\"

_________________________
There are two types of vessels, submarines and targets.

Top
#114091 - 2004-02-17 09:00 PM Re: Add to Path statement? Win2k & Win9x
Sean_M Offline
Fresh Scripter

Registered: 2001-04-26
Posts: 11
Well thanks to you Jens I've made a huge step forward... it's sort of working

Code:
SET "PATH=%PATH%;H:\Lotus\Notes"


Works great for Win9x but for Win2k I have 2 problems...

Here's what it sets the path to and you'll probably see the 2 problems right off the bat:

\\xxxxx\NETLOGON;SystemRoot%\system32;H:\Lotus\Notes


- First off, it adds the Domain controller's Netlogon to the path (weird!)

- Second, it clips the first % from SystemRoot which could break alot of Windows stuff.



Is there a syntax issue here?




Edited by Sean_M (2004-02-17 09:01 PM)

Top
#114092 - 2004-02-17 09:17 PM Re: Add to Path statement? Win2k & Win9x
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
Code:
SET "PATH=%PATH%;H:\Lotus\Notes"



Worked fine on my XP machine...Are you sure this is all of the code you are using?

Top
#114093 - 2004-02-17 09:22 PM Re: Add to Path statement? Win2k & Win9x
Sean_M Offline
Fresh Scripter

Registered: 2001-04-26
Posts: 11
This is the entire login script... names changed to protect the innocent:

Code:

SetConsole ("HIDE")
CLS

If InGroup ("MAHQ")
Use H: "\\xxxxx\@userid$"
? "HQ Employee"
EndIf

If InGroup ("Domain Admins")
Use I: "\\xxxxx\software"
EndIf


CLS

SET "PATH=%PATH%;H:\Lotus\Notes"


; END OF GROUP MAPPINGS
Exit


Top
#114094 - 2004-02-18 04:06 PM Re: Add to Path statement? Win2k & Win9x
Sean_M Offline
Fresh Scripter

Registered: 2001-04-26
Posts: 11
Any suggestions?
Top
#114095 - 2004-02-18 04:22 PM Re: Add to Path statement? Win2k & Win9x
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Code:

SET 'PATH=%PATH%;H:\Lotus\Notes'


workd fine for me, too, under Windows XP. Run this code, open a new command prompt and type in SET to see the new path environment variable..
_________________________
There are two types of vessels, submarines and targets.

Top
#114096 - 2004-02-18 06:22 PM Re: Add to Path statement? Win2k & Win9x
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ja, it does.
hmm...
why do you print some info on the console if you anyway hide it and keep shooting cls?


oh, and one question (didn't see you say it... or just missed)
what version of kix you are using?
_________________________
!

download KiXnet

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
1 registered (Allen) and 1334 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.055 seconds in which 0.022 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