Solved

Setting path

Posted on 2003-11-11
5
1,129 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 125 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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…
Find out what the Office 365 disclaimer function is, why you would use it and its limited ability to create Office 365 signatures.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now