fetching values from the regisgtry

Common questions about using Actual Installer.
Post Reply
githomas
Posts: 4
Joined: Thu Aug 23, 2012 3:43 pm

fetching values from the regisgtry

Post by githomas »

I've written a Word 2010 template document. I'd like to use Actual Installer to do the following:
1. determine if Word 2010 is installed. (I know where to look for this value.)
2. If Word 2010 is installed, I need to fFetch the registry value to determine where the new template documents are to be stored ( I know where to look for this value)
3. copy the new template to the temploate folder

In looking at the various dialogs in Actual Installer I don't see how I can do this. The dialogs seem to be designed to add new registry values. I do not want to change the registry, just fetch values, test the values read and then copy a file to the correct location.

the" personal templates" folder is contained in the following registry key
HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Word\Security\Trusted Locations\Location0\
fetch the Path value

Assuming this "path Value" exists, copy the file from the source folder.

I think I need to write custom code, but I'm not sure if it is possible. If it is possible, how do I do this?

Gail Thomas
Leo
Site Admin
Posts: 458
Joined: Fri Jan 22, 2010 12:40 pm

Re: fetching values from the regisgtry

Post by Leo »

Hi Gail,

First, go to System\Variables page and add the following:

Code: Select all

Variable Name: <PerTemplate>
Root Key: HKEY_CURRENT_USER
Subkey: Software\Microsoft\Office\14.0\Word\Security\Trusted Locations\Location0
Value Name: Path
Value Type: String
Default Value: 
Now, the variable <PerTemplate> contains the value for the 'Path' regkey and you may use it in the setup.

To copy files use System\Commands page:

Code: Select all

Command: <SystemDir>\cmd.exe
Parameters: /C IF EXIST "<PerTemplate>" ( COPY /Y "File1.exe" "C:\File1.exe")
Timing: After Installation
Leo,
Actual Installer Team
https://www.actualinstaller.com
githomas
Posts: 4
Joined: Thu Aug 23, 2012 3:43 pm

Re: fetching values from the regisgtry

Post by githomas »

Is it possible to step through the installation process? I created a sript using your suggestions above and it does not work. I'd like to place a breakpoint where the registry value is fetched, and then step through the commands. I need to be certain that the code is being executed.

Gail Thomas
Leo
Site Admin
Posts: 458
Joined: Fri Jan 22, 2010 12:40 pm

Re: fetching values from the regisgtry

Post by Leo »

Please send your project file support {at} actualinstaller.com
Leo,
Actual Installer Team
https://www.actualinstaller.com
Post Reply