Solved

Setting path

Posted on 2003-11-11
5
1,139 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows WEb Server sp2 13 525
Windows Server 2000 NIC on a 2008 R2 Hyper-V won't start 4 1,152
Building AD from Scratch 5 149
Server 2012R2 Foundation and Server 2000 3 141
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…
Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

752 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