cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
alegerlotz
Level 7

Install Condition Failing in Group Policy deployment only - works interactively

I have an install that requires a file to be present in the same folder as the .msi file at install time.

My check is a system search for a file (lets call it foo.bar) in SOURCEDIR and puts the result into the property FOOBAR.

I then have an installcondition based on FOOBAR where a message is displayed if the file is not detected.

This is working perfectly well in Interactive installs.

During a group policy install (or upgrade) the install aborts, a fatal error is displayed it the event log, and no .msi logs are created. I'm assuming that the lack of .msi logs is because the install aborted before the point where logging normally starts.

I enabled this key to help debug:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Diagnostics]
"RunDiagnosticLoggingApplicationDeployment"=dword:00000001


and saw that it is, indeed, my new requirement for that file being present that is failing.

Does anyone have any ideas as to why this works interactively, but not via GP?

I have already checked the permissions no the file and tried an interactive install using the exact network share and user login as the GP deployment.

Thanks for any ideas,
-Al
Labels (1)
0 Kudos
(7) Replies
alegerlotz
Level 7

I have done more investigation, including adding the value of [SOURCEDIR] to my message.

For whatever reason, this value is not available at AppSearch and LaunchConditions time when deployment is through group policy. During an interactive install, all is well.

Why is this????
0 Kudos
alegerlotz
Level 7

I'm not sure why I'm writing any more here since nobody seems to read these posts anyway...

I've been looking some more and found that "ResolveSource" may be the missing piece. I cannot, however, determine why this is true because in both the UI and Execute Sequences, ResolveSource comes after the AppSearch and LaunchConditions actions. I'm hesitant to move the ResolveSource action because I don't want to cause other issues later on.

Advice?
0 Kudos
Christopher_Pai
Level 16

I have more experience in the SMS world then the GPO world, but does GPO even allow you to include additional files in the push? I would almost thing that you would have to apply a transform to the MSI to put a file in the ISSetupFile table and then access it from [SUPPORTDIR] at runtime.
0 Kudos
alegerlotz
Level 7

Christopher Painter wrote:
I have more experience in the SMS world then the GPO world, but does GPO even allow you to include additional files in the push? I would almost thing that you would have to apply a transform to the MSI to put a file in the ISSetupFile table and then access it from [SUPPORTDIR] at runtime.


Yes, the push worked fine until I added the AppSearch/Launch condition to require that the file is there.

Prior to adding this restriction, it all worked great and the file was copied if present in the directory with the .msi. I did the copy through the MoveFile table inside one of my MergeModules.

Whadaya think Christopher?

Just for fun I'm going to move the ResolveSource action and see if that does anything good.
[Update - Not good. Error 2732.Directory Manager not initialized. Time for a CA to check for the file I think. ]
0 Kudos
RobertDickau
Flexera Alumni

Right, "Directory Manager not initialized" means a project refers to a Directory-table property before CostFinalize runs (running ICE validation might catch that). From memory I don't have an answer, but searching these forums for "appsearch sourcedir" turns up some similar experiences others have had...
0 Kudos
alegerlotz
Level 7

RobertDickau wrote:
Right, "Directory Manager not initialized" means a project refers to a Directory-table property before CostFinalize runs (running ICE validation might catch that). From memory I don't have an answer, but searching these forums for "appsearch sourcedir" turns up some similar experiences others have had...


Thanks for the pointer, Robert.

I tried lots of searches, but not that exact one, and now I see that quite a few potentially relevant threads are listed.

At this point I have a custom action that's working, although I'd really rather do the right things to get system search/Launch conditions to work and let WindowsInstaller deal with it all.
0 Kudos
alegerlotz
Level 7

Resolution:

I'm up against a dead line, so here's what I ended up doing...

I made an InstallScript custom action that checks for the file, and fired the custom action after ResolveSource in both the UI and Execute sequences.

I then made an Error CA that checks the property from the first CA and displays my error message. I fired the Error CA after the InstallScript CA.

It works great interactively and through deployment, deals with long paths/spaces in names, and puts an error in the EventLog if there's an issue.

...Ship it
0 Kudos