agoto
Posts: 9
Joined: Thu Jul 06, 2006 9:23 am

ProgramMenuFolder for All Users

When I used [ProgramMenuFolder] in the Search, I can get 'C:\Documents and Settings\My Login ID\Start Menu\Programs'.

I would like to get 'All Users' folder rather than my login ID. i.e. 'C:\Documents and Settings\All Users\Start Menu\Programs'

How can I do this?

Thank you in advance.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

When the installation package is set to the "Per-machine" option (in the "Install Parameters" page), the [ProgramMenuFolder] property is resolved to "C:\Documents and Settings\All Users\Start Menu\Programs".

When the installation package is set to the "Per-user" options, the [ProgramMenuFolder] property is resolved to "C:\Documents and Settings\[current_user]\Start Menu\Programs".

You can read more about the ProgramMenuFolder property here:
http://msdn2.microsoft.com/en-us/library/aa370882.aspx

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
agoto
Posts: 9
Joined: Thu Jul 06, 2006 9:23 am

Hi Cosmin,

Thank you for your reply.

It seems ok but can I ask one more question?

I would like to create a folder in the ProgramMenuFolder and the folder name is got from a Registry value.

I have added a search for a Registry value from a key called 'Folder' and added another search for a folder specifying the Path as '[ProgramMenuFolder][PROGRAM_FOLDER_REG]'. I thought this Property will be ok to be used in 'Files and Folders' but it does not work...

I also tried to create 'New Folder' in Start Menu-Programs on 'Files and Folders' with the Property name as [PROGRAM_FOLDER_REG] above. This does not work either...

How can I create a folder with a variable name from the Registry?

Thanks and best regards,
Aki
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
How can I create a folder with a variable name from the Registry?
This can be done by creating a property-based folder using the property of the search. The property-based folder can be created in the "Files and Folders" page by using the "New Folder" menu or button.

Note that the property of the search should be initialized in the "Install Parameters" page to a valid value (for example "C:\"). Also, if the search is not successful, the path of the property-based folder will be resolved to an incorrect value (for example "C:\RESULT_PROPERTY").

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”