I want to modify the path statement and in DOS this will do the trick
Path = %PATH%;C:\Program Files\Print PDF
In MS I have tried it like this:
RunProgram>cmd /c Path = %PATH%;C:\Program Files\Print PDF
and a few different ways with VAREXPLICIT set to 1 and to 0 with no sucess. Any ideas?
Running Dos Path Command
Moderators: JRL, Dorian (MJT support)
Running Path from MS
Bob,
Yes, I tried it without spaces
I am running it on XP and then later will test on Vista
I am using MS Pro 11.1.06 From March of 2009
There are no trailing spaces.
After I run it I open the command prompt window and type in Path to see what it is and it has never changed.
Yes, I tried it without spaces
I am running it on XP and then later will test on Vista
I am using MS Pro 11.1.06 From March of 2009
There are no trailing spaces.
After I run it I open the command prompt window and type in Path to see what it is and it has never changed.
When you set the path or any other environment variable in a DOS window, the value is only valid within that window. To set teh path you need to change it in the registry. I'm using XP. This works for me.
Code: Select all
RegistryReadKey>HKEY_LOCAL_MACHINE,SYSTEM\ControlSet001\Control\Session Manager\Environment,Path,result
Let>result=%result%;C:\Program Files\Print PDF
RegistryWriteKey>HKEY_LOCAL_MACHINE,SYSTEM\ControlSet001\Control\Session Manager\Environment,Path,result
RegistryReadKey>HKEY_LOCAL_MACHINE,SYSTEM\ControlSet001\Control\Session Manager\Environment,Path,result2
mdl>result2
update path statement
JRL
It looked like your solution would work but it didn't for some unkown reason.
I ran it, checked the registry and it was changed. So that part works fine. I went to a command prompt and typed path and it was the same as before. So I figured that I needed to reboot, which I did. Same result, it was not in the path statement after the reboot.
I then went into the registry and checked and the line was updated. So, I don't know what else to try.
It looked like your solution would work but it didn't for some unkown reason.
I ran it, checked the registry and it was changed. So that part works fine. I went to a command prompt and typed path and it was the same as before. So I figured that I needed to reboot, which I did. Same result, it was not in the path statement after the reboot.
I then went into the registry and checked and the line was updated. So, I don't know what else to try.
Set Path
Well more investigation found that although it did not appear on the line when path was entered it is somehow there.
Before if I entered the path and ran the application it would run. If I didn't change the path statement I would get an error. With the above change it runs even though it does not appear in the path when I type path at the command prompt. Thank you
Before if I entered the path and ran the application it would run. If I didn't change the path statement I would get an error. With the above change it runs even though it does not appear in the path when I type path at the command prompt. Thank you