View Full Version : Installation Path from Registry
noobxl
09-09-2008, 01:49 PM
Hello,
I'm trying to let Setup Factory 8.0 automaticly select the good installation path by reading Registry.Local Machine/Software/test. In that folder is a registry key named "programpath" and the value contains the good installation path.
I tried to edit the Welcome to installation screen @ On Next... But it fails.
So any help or answers would be pleased.
, noobxl
jassing
09-09-2008, 02:15 PM
Hello,
I'm trying to let Setup Factory 8.0 automaticly select the good installation path by reading Registry.Local Machine/Software/test. In that folder is a registry key named "programpath" and the value contains the good installation path.
I tried to edit the Welcome to installation screen @ On Next... But it fails.
So any help or answers would be pleased.
, noobxl
Usually helps if you post the code you TRIED, most won't just write you code because you asked...
But I'm in a good mood.. ;-)
local ProgPath = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\test", "programpath");
And then if you need it in a session variable:
SessionVar.Set("%ProgPath%", ProgPath);
or combined into a hard to read:
SessionVar.Set("%ProgPath%", Registry.GetValue(HKEY_LOCAL_MACHINE, "Software/test", "programpath"));[/
noobxl
09-09-2008, 02:50 PM
Hmm... I get an empty path then.
I have this in On Next code of Welcome To Setup.
SessionVar.Set("%ProgPath%", Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE/test", "testpath"));
Screen.Next();
And in the Select installation path I got:
Default folder: %ProgPath%
Store result in session: %ProgPath%
Maybe I have to put %ProgPath% first in the session variables. But how exactly?
,noobxl
jassing
09-09-2008, 03:26 PM
Try \\ instead of /
Does this value exist?
are you checking Application.GetLastError()?
noobxl
09-10-2008, 08:38 AM
Yes that did the job.
Thank you very much for your good help.
,noobxl
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.