Page 1 of 1 1
Topic Options
#40570 - 2003-05-21 01:06 PM Q. How do I change the "HOMEPATH" & "HOMEDRIVE" variables.
Chris Meyer Offline
Fresh Scripter

Registered: 2003-04-16
Posts: 18
Loc: Mozambique
Hi Everyone,

Firstly thanks for all the support so far, KIXTART has made a world of difference on our site.

I have one more problem that I cannot seem to resolve.

Q. How do I change the "HOMEPATH" & "HOMEDRIVE" variables. On my PC they are correct, but most users on our site have these set to their H Drive.

This code below I tried to run, the registry reflects my changes BUT when I open a dos session, the default is H Drive still. [Mad]

code:
 
SETM "HOMEDRIVE=C:"
SETM "HOMEPATH=\"



[ 21. May 2003, 13:17: Message edited by: Klaxon ]
_________________________
Chris Meyer <img border=0 title= alt=[Razz] src=tongue.gif /]

Top
#40571 - 2003-05-21 01:18 PM Re: Q. How do I change the "HOMEPATH" & "HOMEDRIVE" variables.
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
HomeDrive and HomePath are most likely user variables (which can't be found in MY registry [Frown] )

You should anyway try:


set "HOMEDRIVE=C:"
set "HOMEPATH=\"


BUT ! Always remember that this doesn't affect the current script environment [Wink]

[ 21. May 2003, 13:44: Message edited by: Jochen ]
_________________________



Top
#40572 - 2003-05-21 01:48 PM Re: Q. How do I change the "HOMEPATH" & "HOMEDRIVE" variables.
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Or, if I assume correctly and these are user variables (would even bet the house that they are!), you can Issue a second script that is started by 'HKLM\Software\Microsoft\Windows\CurrentVersion\RUN' and set the variables there ...

This is a quite safe way to make changes in HKCU

hth
_________________________



Top
#40573 - 2003-05-21 01:49 PM Re: Q. How do I change the "HOMEPATH" & "HOMEDRIVE" variables.
Chris Meyer Offline
Fresh Scripter

Registered: 2003-04-16
Posts: 18
Loc: Mozambique
Hi Jochen,

I tried this also, but as you can see. When I open a dos console. I am path'd through to my profile path. My users on the other hand see their Home Drive, the problem is we run file monitor software which does not allow users to dump temp files on the home drive. They get an system message, cannot save temp file to Home Drive.

quote:


My PC is fine

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Meyerchr>

_________________________
Chris Meyer <img border=0 title= alt=[Razz] src=tongue.gif /]

Top
#40574 - 2003-05-21 01:55 PM Re: Q. How do I change the "HOMEPATH" & "HOMEDRIVE" variables.
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
replied before with another solution maybe interesting for you [Smile]
_________________________



Top
#40575 - 2003-05-21 02:28 PM Re: Q. How do I change the "HOMEPATH" & "HOMEDRIVE" variables.
Chris Meyer Offline
Fresh Scripter

Registered: 2003-04-16
Posts: 18
Loc: Mozambique
This is so strange and it will take me a bit more time to figure this out. I tried the RUN command to set the variables but still at a dos console the set command returns, Thanks [Smile]
code:
 
C:\Set "Enter"
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\Meyerchr

Yet when I look at the registry and search for the "Homepath" I cannot find anything related to "\Documents and Settings\Meyerchr"

but still in dos console I see my profile path. [Confused]
_________________________
Chris Meyer <img border=0 title= alt=[Razz] src=tongue.gif /]

Top
#40576 - 2003-05-21 02:50 PM Re: Q. How do I change the "HOMEPATH" & "HOMEDRIVE" variables.
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
You are looking in the wrong location. [Smile]

Doing an exact search in the Registry for - \Documents and Settings\Kent

We find -

HKEY_CURRENT_USER\Volatile Environment
HOMEPATH

HTH,

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

Top
#40577 - 2003-05-21 02:50 PM Re: Q. How do I change the "HOMEPATH" & "HOMEDRIVE" variables.
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Ummmm [Confused]

And we talk about what Network ? NT ? AD ? something else ?

I mean you could always set up some policies or even user mangler settings for your users [Wink]
_________________________



Top
#40578 - 2003-05-21 03:03 PM Re: Q. How do I change the "HOMEPATH" & "HOMEDRIVE" variables.
Chris Meyer Offline
Fresh Scripter

Registered: 2003-04-16
Posts: 18
Loc: Mozambique
We are moving towards AD 2003, still busy with all the preperation work. At the moment running NT 4 Domain with NT4 Workstation, W2K & XP Pro clients. Almost all NT4WKS have the H Drive set as all W2K & XPPro clients have C:\

Yes I too found the Volatile Environment but changing this and rebooting did not resolve my problem.

Which is to change all clients that have "HOMEPATH" & "HOMEDRIVE" variables set to H: Drive.

This is not much more help.

[Roll Eyes]
_________________________
Chris Meyer <img border=0 title= alt=[Razz] src=tongue.gif /]

Top
#40579 - 2003-05-21 03:13 PM Re: Q. How do I change the "HOMEPATH" & "HOMEDRIVE" variables.
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I don't understand why you are trying to hack this in. It is a property of the user's profile. M$ TechNet article 101507 explains this. Instead of hacking it in, remove it from the user's profiles in User Manager.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#40580 - 2003-05-21 03:16 PM Re: Q. How do I change the "HOMEPATH" & "HOMEDRIVE" variables.
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
'Volatile' is by the way a speaking name in this context ...

I learned that some time ago the hard way [Wink]
_________________________



Top
#40581 - 2003-05-22 11:12 AM Re: Q. How do I change the "HOMEPATH" & "HOMEDRIVE" variables.
Chris Meyer Offline
Fresh Scripter

Registered: 2003-04-16
Posts: 18
Loc: Mozambique
Hi LLigetfa,

You were 100% correct but then you already know this [Big Grin]

Thanks for the help Jochen, this post can be closed.
_________________________
Chris Meyer <img border=0 title= alt=[Razz] src=tongue.gif /]

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 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.142 seconds in which 0.112 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