2

I am trying to modify my system Path value. I need this as I am doing an upgrade of the S/W and the users need to have access to the old and new system. I provide them with a toggle button which will change the settings and let them use both.

One of the things I need to do for this is change the system path value. I have a .reg file to do this. When I run this script, I get the message "The keys and values contained in have been successfully added to the registry"

But I do not see the change reflected when I go and check my registry.

My Original value for System Path is:

C:\Oracle01\product\11.2.0\client_1\bin;C:\Program Files\NVIDIA Corporation\PhysX\Common;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Infor\Unify\Runtime52\;C:\Program Files\QuickTime\QTSystem\;c:\Program Files\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;c:\Program Files\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files\Microsoft SQL Server\110\DTS\Binn\

My reg file is as below


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment]
"Path"="REG_EXPAND_SZ:C:\Oracle01\product\11.2.0\client_1\bin;C:\Program Files\NVIDIA Corporation\PhysX\Common;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;c:\Visual\RunTime40\;C:\Program Files\QuickTime\QTSystem\;c:\Program Files\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;c:\Program Files\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files\Microsoft SQL Server\110\DTS\Binn\"

I want entry C:\Infor\Unify\Runtime52\ to change to c:\Visual\RunTime40\ in the path.

Pls let me know what I am missing here. My reg file is in my local C drive.

Thanks, Vidya.

Vidya
  • 21

1 Answers1

0

As in comments

To change your local paths you do it via console, you use SET commands, so with it you can

View your available enviroment variable list

SET

Create a new env variable

SET newenv=hello;

Update a variable

SET newenv=%newenv%cya;

Can pint it out

echo %newenv%
SET %newenv%

At system registry keys

you can

registry /s <file>.reg

/s is for silent.