Installing Setup via GPO failes when executing CA - Advanced Installer Community
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Installing Setup via GPO failes when executing CA

Hi Advanced Installer,

first, I searched through the forum, there are a some questions about GPO installs, but they not correctly cover my scenario:

A customer wants to install our product via GPO. This is so far no big issue, when you know, how to configure everything (like described in here). So far, everything works fine, we are using a MST transform file to change the installation behavior. Adding features or removing default features is no problem.

We have a certain feature, which installs a virtual printer. Installing this feature requires some extra files, which are added as temporary files to the setup. Then a Custom Action is called to install the printer: this CA is calling regsvr32 to register one of the temporary files, doing the printer installation and unregisters the printer installer before exiting (all files are provided by a third party manufacturer). Of course, there is as well another CA run on uninstall to remove the printer in the same way. This functionality is quite good tested with the last versions of our product, works as desired and is not making trouble at all.

Now a customer tried an installation of our product together with the virtual printer. So, he's using our setup, a self created transform file to install our product. He's actually faced with some error messages, that the toolkit could not be registered. We verified the behavior inhouse with the same result, the regsvr32 call returns "Path not found". Hence the installation runs during the start of Windows, its not possible to logon easily, but connecting via network is possible, even to the event log and local admin shares. I verified the temporary folder used by setup, but the files needed by the CA are at the place, where they should be:

Code: Select all

\\computer\c$\Windows\System32\config\systemprofile\AppData\Local\MANUFACTURER\11.1.1\Setup
The location of the temporary folder is provided to the CA, the CA itself is properly configured as "Execute after the system has been successfully modified (commit)" and scheduled before Finish Execution step.

So, I have no general question about HowTo-Install-via-GPO. This is clear and works. But I need to get some help to figure out, why the CA fails to register the installer toolkit using this installation method. I assume, there might be a problem in chronological order.

Please let me know, if you need more information, I will attach or provide them as soon as possible.

Thanks for helping!

Cheers,
Roland
Attachments
MSI5d7d.zip
(327.77 KiB) Downloaded 574 times
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Installing Setup via GPO failes when executing CA

Hi Roland,

What I suspect is happening is the fact that you are using a per-user extraction folder for setup package. When installing through AD/GPO
the user is "system" so the extraction folder goes to this path "Windows\System32\config\systemprofile\".

However, the Windows Installer API automatically resolves "System32" folder to "SysWOW64" special folder, in the background.
This leading to the "Path not found" error.

The solution is very simple, to set to your installer a per-machine extraction path, in Media page, also please update the custom action too. For example with this path:

Code: Select all

[TempFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install
Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Re: Installing Setup via GPO failes when executing CA

Hi Bogdan,

Ouch, I should have noticed, that the 32-Bit process is redirected to a different folder than a 64-Bit process. I have changed the temp folder accordingly to your recommendation and it works as desired.

Is it possible to move the location of this folder within a transform file and/or with a patch, or is this not recommended?

Regards,

Roland
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Installing Setup via GPO failes when executing CA

Hi Roland,

This is quite a tricky one, it tricked me too and made me spend some time on it before realizing what is the problem (this being last year, with another user having a similar problem :) ).

I'm afraid you cannot use a transform because the extraction path from Media page is stored in the bootstrapper, i.e. the EXE, not in the MSI. So the transform would not be able to change this setting.

Also, starting with Advanced Installer 10.2 we made an improvement so the bootstrapper detects it is running under a system account and automatically changes the extraction path to a per-machine location, by replacing the per-user part of the extraction path (i.e. [AppDataFolder]) with [WindowsVolume].

However for your case it is better to have the path I recommended as you also need to pass it to the custom action, so the path should always remain the same.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Re: Installing Setup via GPO failes when executing CA

Hi Bogdan,

Temporary files are extracted by the bootstapper? Also in case of a patch - here we don't have a bootstrapper, just the msp file.

Btw, the setup causing the issue was created with AI 10.5.2, so it should work around this issue, or not?

Thanks,

Roland
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Installing Setup via GPO failes when executing CA

Hi Roland,
Temporary files are extracted by the bootstapper?
No, the MSI and CAB files inside the EXE are extracted by the bootstrapper. Temporary files are handled by the MSI, this is much more complicated,
we have some custom MSI tables and custom actions defined in order to support the temp files.
Also in case of a patch - here we don't have a bootstrapper, just the msp file.
Sorry, the path you mentioned in the first post seemed very similar with the default used in Media page, for the bootstraper extraction path.
Anyway, I assume correctly that the target application, on which the patch is applied, was installed using a bootstrapper? If so, it is the same situation, you got the bootstrapper running and extracting the files when you installed the target version, when the patch tried to execute the custom action, but this resolved the path incorrectly.
Btw, the setup causing the issue was created with AI 10.5.2, so it should work around this issue, or not?
No. First, the solution we implemented was to fix another problem appearing in mixed packages. In your case there is another situation,
i.e. your custom action does not know that our bootstrapper automatically changed the extraction path so it is still looking in the per-user path.

Since you cannot have your custom action automatically switch to a per-machine or per-user path the simples solution is to always use a per-machine extraction path for the main installer, so the custom action will always get right the location of the setup package.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Re: Installing Setup via GPO failes when executing CA

Hi Bogdan,

Hough. Sorry, think this was a big misunderstanding. I have added some DLL files to the Resources View as "Temporary Files":
AI-Temporary Files in Resources View.png
AI-Temporary Files in Resources View.png (19.11 KiB) Viewed 7299 times
(Just right click in Resource View -> Add Temporary Files...). Our setup is designed as EXE setup with resources next to it, so the GPO is used to install the MSI file directly without setup.exe. I assume, that your proposal to fix the issue is correct anyway, because while doing some tests, it seems to be working.

The only question I have left over, if I can just fix the path via a transform file to fix already released versions of the product with that.

Thanks,

Roland
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Installing Setup via GPO failes when executing CA

I have never tried a transform for a temporary file but theoretically it should work.

Temporary files from Advanced Installer are different from the standard files you see in Files and Folders page.
We manage them using a custom table called "AI_TempFile". In this table there is a column "Directory_" for each file,
that you need to alter using the transform, this represents the target directory where the file will be installed.

Of course you must also modify the custom action ActionData from the transform too, but that I assume you already know how, i.e.
by altering the corresponding custom action AI_DATA_SETTER from InstallExecuteSequence table.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”