cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

use existing registry value as part of path in folder creation

CChong
By Level 11 Flexeran
Level 11 Flexeran
Hello,

I have created a System Search to Search for the value of a particular registry key and use this value to create another regsitry key i.e. create a feature with a component, the component creates a registry value, the feature install level is set to 101 unless the search condition is true then it sets install level to one and it installed i.e. the component modified the registry this works OK.

Now we want to take the same system search value (we stored the result in DATADRVPATH (i.e as above when setting up the System Search) and use it in a path statement for creating a folder.

I cannot see how this is done. If you look at Application Data (from the editor) and Files and Folder and Add Folder there are a lot of pre-defined system folders such as [CommonFilesFolder] and [ProgramFilesFolder]

the question is how can I take the value I extraced from the registry (in my system search, and which I stored to use latter for an install condition) and convert this to a parameters like [CommonFilesFolder] i.e. [DATADRVPATH] so I can then use this in a path when creating foders?

if I try to use it directly i.e. [DATADRVPATH] it creates a folder called DATADRVPATH it does not subsitute it for the value of DATADRVPATH which I am trying to use.

Thanks very much in advance
(1) Reply
CChong
By Level 11 Flexeran
Level 11 Flexeran
OK this one fixed

Basically create a Directory Tabel Entry like

DATADRVPATH TRAGETDIR DATADRVPATH

Create a comoment set the component Destination to DATADRVPATH (using the drop down list) save, Go back to Application Data > Files and Folders and there will be a FOLDER at the root level called DATADRVPATH into which you can create other folders or files that will then be installed into the path relevent to the propery of DATADRVPATH which you extraced from the registry previously.