Solved

Setting path

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

808 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