Empty Registry keys Microsoft Office. - Advanced Installer Community
bosse@rehngruppen.se
Posts: 6
Joined: Tue Oct 08, 2013 1:09 pm

Empty Registry keys Microsoft Office.

Hi!

I am using a Search to get the Registry key for Words folders Tsemplates and Startup . The problem is that if Office is newly installed and Word never been started there are no Registry keys. So my question is: If the result of the serach is empty can I then create the folders %appdata%\Microsoft\Templates and %appdata%\Microsoft\Word\Startup?

Regrads,
Bosse Strombom
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Empty Registry keys Microsoft Office.

Hello Bosse and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

In order to achieve this you can create the above folders in "Files and Folders" page under "Application Data" folder. Next you should enable the "Create folder on target machine" option from "Folder Properties" tab. Then, using the "Go To Component" context menu option you should add, in the "Condition" field of the selected folder component, a condition like this:

Code: Select all

NOT MY_SEARCH_PROP
Let us know if this helped, otherwise please give us more details about your scenario.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bosse@rehngruppen.se
Posts: 6
Joined: Tue Oct 08, 2013 1:09 pm

Re: Empty Registry keys Microsoft Office.

Hi Daniel!

Thanks for the info. Now the msi creates the folders even if the registry keys doesnt exists, GREAT. However, the files that should be placed in the folders are placed one level up. The .dotm file that shoud be in Startup is in the Word folder and the folders that shoul be in Templates are under Microsoft. I attach my .aip file for you to see.

Regards,
Bosse
Last edited by bosse@rehngruppen.se on Wed Oct 09, 2013 4:28 pm, edited 1 time in total.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Empty Registry keys Microsoft Office.

Hello Bosse,

This happens because you are using the "WORD_TEMPLATES" and "WORD_STARTUP" properties (associated with your serches added on "Search" page) in the "Application Folder" and "Application Shortcut Folder" fields from "Install Parameters" page. Please keep in mind that when the searches from "Search" page will not return a value, then their associated properties ("WORD_TEMPLATES" and "WORD_STARTUP") will be empty. So, this is the normal behavior.

In order to avoid this you can replace the above properties from "Application Folder" and "Application Shortcut Folder" fields with the desired values.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bosse@rehngruppen.se
Posts: 6
Joined: Tue Oct 08, 2013 1:09 pm

Re: Empty Registry keys Microsoft Office.

Hi Daniel!

Since the folders can have different names in different countries I use the Search to pick the names from the Registry. If they exists, Word have been started, I put the files in these folders, works great, and if they dont exists, a new Clean Office installation, I would like the msi to create the folders Startup and Templates and put the files there.

Is that possible?

Best regards,
Bosse
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Empty Registry keys Microsoft Office.

Hello Bosse,

In order to fulfill your scenario you can set your searches associated properties to a default value when the searches don't succeed. Here are the steps to proceed:
- go to "Install Parameter" page and add your "WORD_TEMPLATES" and "WORD_STARTUP" properties (associated with your searches added on "Search" page) in the "Application Folder" and "Application Shortcut Folder" fields
- go to "Custom Actions" page and add two "Set installer property" custom actions with sequence, scheduled after "Wizard Dialogs Stage -> Searches" and "Install Execution Stage -> Searches" action groups, like this:
  • Property: WORD_TEMPLATES
    Value: default_value
    Condition: NOT WORD_TEMPLATES

    Property: WORD_STARTUP
    Value: default_value
    Condition: NOT WORD_STARTUP
Please keep in mind that when using this scenario there is no need to create the related folders under "Application Data" folder and condition their component installation.

If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bosse@rehngruppen.se
Posts: 6
Joined: Tue Oct 08, 2013 1:09 pm

Re: Empty Registry keys Microsoft Office.

Hi Daniel!

The value for the Property, should I type in the text "default_value" or is it "Template" and "Startup"?

Thanks,
Bosse
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Empty Registry keys Microsoft Office.

Hello Bosse,

You should type the folder names (e.g. "Template" and "Startup") which you want to be created by default when none of them exists.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bosse@rehngruppen.se
Posts: 6
Joined: Tue Oct 08, 2013 1:09 pm

Re: Empty Registry keys Microsoft Office.

Hi!

I must be doing something wrong because the folders are not created.
Can you send me an aip file or some screenshoot that show me how to do?

Thanks,
Bosse
bosse@rehngruppen.se
Posts: 6
Joined: Tue Oct 08, 2013 1:09 pm

Re: Empty Registry keys Microsoft Office.

Thank you Daniel!

I solved it. If you ever in Stockholm, Sweden I'll by you a beer. :D

Regards,
Bosse
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Empty Registry keys Microsoft Office.

You're always welcome Bosse. :D

I'm glad you got this working.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”