Hello gurus,
How can I add a new path string to the current system path?
Using Environ('Path') we can able to retrieve the current system path, but how to add new path string?
Current System Path:
Path = c:\windows;c:\windows\system32;
I want to add this path c:\temp;
New system path will be:
Path := c:\windows;c:\windows\system32;c:\temp;
Any work around? Which automation should we use?
Thanks in advance.
Rodel
Sydney, Australia
Rodel Bernardo
Pressure is an opportunity.
0
Comments
CreateFolder(NewFolder : Text[100]) : Boolean
IF ISCLEAR(FileSystem) THEN
IF NOT CREATE(FileSystem) THEN
EXIT;
FileSystem.CreateFolder(NewFolder);
Take a look at the following post:
http://www.mibuso.com/forum/viewtopic.php?t=1853
Tino Ruijs
Microsoft Dynamics NAV specialist
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Path
so, you can use WshShell
Name DataType Subtype Length
WshShell Automation 'Windows Script Host Object Model'.WshShell
if isclear(WshShell) then
create(WshShell);
RegKey := 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Path';
Variantvariable := WshShell.RegRead(RegKey);
.....
WshShell.RegWrite(RegKey,YOURNEWVAUE);
clear(WshShell);
Regards
Thanks guys.
Rodel
Sydney Australia
Pressure is an opportunity.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!