Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Setting path

Posted on 2003-11-11
5
Medium Priority
?
1,146 Views
Last Modified: 2010-04-13
Hello,

How to make registry key to permanently set path for some dos program to run from command prompt from everywhere?
0
Comment
Question by:joojant200
  • 2
  • 2
5 Comments
 
LVL 5

Expert Comment

by:juliancrawford
ID: 9726765
This is the registry key that stores the path
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment
Path=

You can also set the path using the control panel
Control Panel>System>Advanced Tab>Environment Variables>System Variables>Path>Edit

or you could place a batch file in your startup folder

set path=%path%;c:\temp
<--- this adds c:\temp to the existing path
0
 
LVL 8

Expert Comment

by:nader alkahtani
ID: 9727101
My computer --->Properties--->Advanced ---> environment variable --->system variable ---> path then edit
0
 
LVL 1

Author Comment

by:joojant200
ID: 9727226
---------------------------------------------
This is the registry key that stores the path
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment
Path=
----------------------------------------

How can I make reg key, to import to registry, path for example c:\epi6 ?

If I understand correctly set path is only temporarly till first restart? Then this does't do the job?
I know where to set path mannualy on my computer, but need registry key to set on other computer with one click on it.
0
 
LVL 5

Accepted Solution

by:
juliancrawford earned 375 total points
ID: 9727452
The easiest way would be to first manually setup the path on one PC using the GUI.

Now open your registry editor
Start>Run>Regedit

Now expand the tree to this level ..
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment

Then select
Registry>Export Registry File
name it something like path.reg

Then open the path.reg with notepad and delete everything except the path string - so it should end up looking something like this ..

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment]
"Path"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,\
  00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,3b,00,25,00,\
  53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,00,3b,00,25,\
  00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,00,5c,00,\
  53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,57,00,62,00,65,00,6d,\
  00,3b,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,\
  25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6e,00,6c,\
  00,73,00,3b,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6e,\
  00,6c,00,73,00,5c,00,45,00,6e,00,67,00,6c,00,69,00,73,00,68,00,3b,00,63,00,\
  3a,00,5c,00,74,00,65,00,6d,00,70,00,00,00

Save the file, path.reg, when run will now update the path on the pc it is run on.
0
 
LVL 1

Author Comment

by:joojant200
ID: 9743825
When I import maked regystry key, I lose all old thing in path, only this imported work?

Is it possible to keep old path and with importing regiristry key to add new path, at end old path?
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Screencast - Getting to Know the Pipeline
Suggested Courses

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question