1.

Solve : homedrive?

Answer»

Hi. When I am logged onto the DOMAIN I cannot overwrite the environment variables on my local machine. If I am logged on to the local PC when I run cmd.exe it defaults to my local drive (C). HOWEVER, if I am logged on to the domain, it defaults to a mapped network drive on my PC (H). When this happens I cannot CD to C:, which is where I need to be.

I have tried set homedrive=C: when I am logged on to the domain, but when I run cmd.exe again, it defaults back to H:

If I am logged onto the local machine homedrive=C:

Is there another config file somewhere that I can use to overwrite this variable?

Patricia

Edit in the cmd.........prompt.........or easyway is this>>http://www.robvanderwoude.com/index.htmlYes I have trie tried SET homedrive=C: when I am logged on to the domain, but when I run cmd.exe again, it defaults back to H:
Sounds like domain policies are controlling this behavior. When you are logged onto a Domain, domain admins and policies win over local admins and policies.Environment variables can be changed, but they are only temporary. Thus the reason behind you running cmd.exe a second time and it defaulting back. After you close cmd.exe the first time it will set homedrive back to its original state. To work around this, you can try the following:

Create a simple batch file called cdrive.bat (or whatever you want)

Include the following CODE in the file:

@echo off

set homedrive=C:\

Save the file in the windows\system32 folder or create your own folder and create a path for cmd prompt to check by following the next steps:

Open cmd.exe

Type the following: path location;%path%

Example: path c:\scripts;%path%
Make sure %path% IS there. Otherwise you'll delete all the other paths and have only c:\scripts (or whatever you specified there)

This will add the folder where you store your custom scripts to the path that windows searches to find the commands entered. Once you save your .bat file to this folder, Windows will not have any problem finding the .bat file. This also prevents files from getting mixed up in your system32 folder.
Next:

Create a shortcut to cmd.exe and put it on your desktop. Right click on the shortcut and select Properties. In the target field you should see something like %windir%\system32\cmd.exe. Once you find that, add the following:

/k nameoffile

So, in the end, using the filename supplied (if you MADE your own just replace mine with yours), your target field should look like this:

%windir%\system32\cmd.exe /k cdrive

If done right, when you use this shortcut, it should start cmd.exe at the new dir that you wanted (C:\). If not, like gussery said, it could be your domain policies.
edit the link.
work directory is c:\docume~1\%username%



Discussion

No Comment Found