Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Set a registry path in env. variable
#1
Hi all,

I am having a little problem executing a program using a path from the registry.
I am able to set an Env. var that is equal to me registry key.
But then I am having problems using that variable in a path to launch the program.

I did this:
str InstallPath
if(rget(InstallPath "InstPath" "Software\Test"))
out InstallPath
else
out "the value or the key does not exist"


run "InstallPathlProgram.exe"

And tried to change the structure of the Run command a few times without success.

It could be easier with environmental variable, so I tried to insert the registry key into my env variable and use it later. That failed also Sad I am not sure of the structure for the SetEnvVar that would also use the rget function.

I hope this was somewhat clear..
#2
Macro Macro2472
Code:
Copy      Help
;if InstallPath is a variable
run F"{InstallPath}\Program.exe"

;if InstallPath is an environment variable
run "%InstallPath%\Program.exe"
#3
THANKS YOU so much Smile Smile

I was missing the F at the start of the line.
I will read the help to know what "F" means Smile


Forum Jump:


Users browsing this thread: 1 Guest(s)