Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

value of Registry keys in registry view


5 replies to this topic

in_install

in_install
  • Members
  • 32 posts

Posted 28 February 2006 - 08:32

In registry view, I want to create two data with values(String type) given below:

%USERPROFILE%\Application Data\OD\cache


%ALLUSERSPROFILE%\Start Menu\Programs\OD\

where

ALLUSERSPROFILE=C:\Documents and Settings\All Users

USERPROFILE=C:\Documents and Settings\<current user name>

(Environment variables)

It should be created in regedit as follows:

C:\Documents and Settings\ABCD\Application Data\OD\cache [ABCD : current user]


C:\Documents and Settings\All Users\Start Menu\Programs\OD\


But, in reg edit I am finding registry entries same i.e.

%USERPROFILE%\Application Data\OD\cache


%ALLUSERSPROFILE%\Start Menu\Programs\OD\


How to get required output ??

Edited by in_install, 28 February 2006 - 08:33.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 28 February 2006 - 16:18

If you want to resolve those environment values at install time, use:
[%USERPROFILE]\Application Data\OD\cache

in_install

in_install
  • Members
  • 32 posts

Posted 03 March 2006 - 15:54

Thanks a lot . Got it. smile.gif .

deramor

deramor
  • Full Members
  • 187 posts

Posted 16 September 2014 - 16:53

Is there a way to set a registry string to evaluate to the public folder root on multiple versions of Windows?

I would like this string to point to C:\users\Public on Win7 and C:\Documents and Settings\ on XP

 

ALLUSERSPROFILE points to 2 different things.  XP is Documents and Settings... Win7 is ProgramData

PUBLIC does not exist on XP.  On Win7 is points to Users\Public.

 

What is strange is that the predefined folder ALLUSERSPROFILE does in fact have the expected behavior.

On XP, files using this folder are installed to Documents and Settings.

On Win7, the files go to Users\Public.

When this same variable (for lack of a better term) is used in defining a registry value, the result (on WIn7) is c:\ProgramData

 

It seams to me that there is no direct way to store a registry string that always points to the correct public path.

A condition would need to be set up depending on the OS.  Is this the correct assumption?



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 18 September 2014 - 18:10

Which one are you using in registry view: [ALLUSERSPROFILE] or [%ALLUSERSPROFILE] ?

You can generate a log to see whenever the value changes.



deramor

deramor
  • Full Members
  • 187 posts

Posted 18 September 2014 - 21:58

I am using [ALLUSERSPROFILE].

 

What is confusing is that taking the stored path and putting it in a run dialog brings up the very files I installed. 

 

These files happen to be code examples with visual studio solution and projects.  When i open the solution, the projects can not be found.

When I navigate to the same path through my libraries, the solution can find the project files.

 

The registry value is c:\ProgramData\Documents\Company\Project\examples\exampleName

The files are on the disk at: C:\Users\Public\Documents\Company\Project\examples\exampleName

 

I ended up creating 2 components.  One with the value of [%ALLUSERSPROFILE] and the other with [%PUBLIC]

I authored a condition on each to only install on XP or Win7 and above.  This seems to work.