cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Superfreak3
Level 11

System Context Deferred Custom Action ?s...

Hi there,

I can't figure out why a little .exe custom action (stored in binary table; deferred, system context) won't function properly when run from the install, but functions OK when Run As Administrator on 64 bit Vista system.

All the widget does or tries to do is copy some files from one installation directory to another. The source directory would be something like c:\program files (x86)\MyCo\MyApp\Client\Viewer\x64. The destination would be ...\Client\Viewer\MyFolder for example. I don't know if running in system context would have access to these areas as the overall requires elevation.

I did try running the action deferred, user context, but that didn't seem to work either.

Its a 32 bit app that installs some 64 bit pieces then just copies them over the 32 bit versions when VersionNT64.

If I can't get this to work, could I use the DuplicateFiles table to copy the 64 bit files over the 32 bit files or will that not work if a file already exists in the destination.

My other thought was to handle the 32 bit versions as I do the 64 bit and only install those when Not VersionNt64. That way, there would be no existing files in the destination and DuplicateFiles may serve the purpose.

Any thoughts on the problem I'm having with the copy widget run during the install or my workaround plans to use the DuplicateFiles table would be greatly appreciated!

Thanks Much!
Labels (1)
0 Kudos
(2) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

My first guess would be a matter of where the exe is sequenced. If you put a message box in your exe (or replace it with something that will pause execution), are the files you are trying to copy available on the machine at that time?

However I'd probably recommend trying to use multiple components for this. They would each install the respective files into the same location. Give the components mutually exclusive conditions (e.g. VersionNT64; Not VersionNT64) so that only one is installed at a given time.
0 Kudos
Superfreak3
Level 11

The action is sequenced after Register Product, so the files are available.

I think I'm going to go the differing component route. That way, I don't have to maintain the custom action with any changes.

UPDATE: Don't know why I was trying to be so slick with a coded Custom Action. All works fine with 32/64 bit pieces in separate Features installed based on architecture.
0 Kudos