Problem Installing on Windows 7 with a CustomAction - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

nickknw
Posts: 4
Joined: Fri May 21, 2010 8:03 pm
Contact: Website

Problem Installing on Windows 7 with a CustomAction

Hello,

I've been trying to figure out the cause of this problem for a few days (on and off) now, and I just haven't been able to get anywhere with it. The error message is: "The dialog ErrorDlg has the error style bit set, but is not an error dialog"

The scenario that we have seen this problem in is:
  • Using Advanced Installer 7.5.2 build 26791
  • Installing on Windows 7 with UAC enabled and the slider is on the 3rd or 4th level
  • With a Custom Action that calls one of our .dlls that has some installation specific code in it. When this Custom Action doesn't run, the error doesn't happen, so I know it is something to do with this action.
  • The Custom Action is set to run as (Synchronous execution, check return code, and) 'Deferred', but I have also tried it as 'Deferred with no impersonation', and have received the same error.
  • The error doesn't occur and the Custom Action works fine if we start the .msi from a command prompt that has been opened with Run As Administrator. So it sounds like there is a permissions (or maybe UAC virtualization) thing going on.
  • EDIT4: The above workaround does not work on one of our virtual PCs that has Windows 7 on it. We think it may be this way just because it is a VPC, but don't know for sure that this is the differentiating factor.
Okay, so what is this Custom Action that we made actually trying to do?

It creates a user.config file in "Environment.SpecialFolder.CommonApplicationData" (so, "Documents And Settings\All Users\ApplicationData\custompath\etc\" in XP, and "\ProgramData\custompath\etc\" in Vista and 7), and gives the Built in Users group permission to Modify that file.

My guess is that if I can force an elevation prompt, the code called by the custom action will be run with enough privileges to complete that action, and it will work. But I haven't been able to force an elevation prompt.

But, this guess may also be wrong! Can you help me?

Thanks for your time,
Nick Knowlson

EDIT: And yes I have tried the first item from the FAQ on all occurrences of [APPDIR] in the MsiCustActComponent element.
EDIT2: Okay, so I have commented out all the code inside the CustomAction, and I still receive the error, so I suppose it must not be a permissions issue. How baffling.
EDIT3: I have now tried adding two spaces after every occurrence of every other [ItemInBrackets] that is a target (as well as [APPDIR]), still not working however.
EDIT4: In list above.
Attachments
Screenshot of the error.
Screenshot of the error.
errorDlgAdvInst.PNG (50.59 KiB) Viewed 4191 times
Last edited by nickknw on Tue May 25, 2010 9:56 pm, edited 3 times in total.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Problem Installing on Windows 7 with a CustomAction

Hi,

I'm not sure why this happens. Usually adding a space after folder references or running without impersonation solves the problem. Can you please send us the .AIP (project) file you are using and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nickknw
Posts: 4
Joined: Fri May 21, 2010 8:03 pm
Contact: Website

Re: Problem Installing on Windows 7 with a CustomAction

Hi cosmin,

Thanks for your reply. I've sent the .aip file and a verbose log to the address you indicated.

Hopefully it is as simple as a folder reference that I have missed.

Thanks,
Nick
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Problem Installing on Windows 7 with a CustomAction

Hi Nick,

In the log you provided I noticed this line:

Code: Select all

MigrateFeatureStates: based on existing product, setting feature 'DefaultFeature' to 'Advertise' state.
It seems that the main feature is installed as advertised, just like the original version found on the machine. In this case the file used by your custom action is not installed, so the custom action cannot run. You can try selecting the "Disable Advertise" option in Feature Properties pane and see if it works.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nickknw
Posts: 4
Joined: Fri May 21, 2010 8:03 pm
Contact: Website

Re: Problem Installing on Windows 7 with a CustomAction

Hi Cosmin,

I tried selecting the Disable advertise option and running it again, but received the same error. Just to make things clear, take a look at the attached image. I changed 'Allow advertise' to 'Disable advertise' there. I will email you the aip and verbose log files again from this failed install.


I've only a fairly rudimentary knowledge of Advanced Installer so far, I am pretty new to it. That said, I am trying to learn more, so I have some questions for you:
In this case the file used by your custom action is not installed, so the custom action cannot run.
How could you tell it was not installed? Where can I look to find that out?
You can try selecting the "Disable Advertise" option in Feature Properties pane and see if it works
I read the section of the User Guide that you linked to, but I still don't understand what the Advertise Settings are for, or what "The default installation state is advertised" means. Could you elaborate?

Thanks for your help cosmin,
Nick
Attachments
advertise_off.PNG
advertise_off.PNG (338.03 KiB) Viewed 4154 times
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Problem Installing on Windows 7 with a CustomAction

Hi Nick,

It seems that the feature state is still migrated. You can try this:
- go to "Upgrades" page
- check the "Customize Advanced Installer upgrade rules" option
- double-click the upgrade rule which corresponds to the OLDPRODUCTS property
- in the Upgrade Action tab of the "Edit Upgrade" dialog uncheck the "Enable Migrate Features action" option
- click OK
- rebuild your project
How could you tell it was not installed? Where can I look to find that out?
You can search for the "InstallValidate" action in the log. It shows which components are installed or uninstalled. There are 3 attributes:
1) Installed - represents the install state
2) Request - represents what action should be taken under normal circumstances
3) Action - the actual action performed by the installation
I read the section of the User Guide that you linked to, but I still don't understand what the Advertise Settings are for, or what "The default installation state is advertised" means. Could you elaborate?
For an advertised feature the installer registers it on the machine, creates shortcuts and menu entries, associates file types etc. without actually copying the application files to the user's hard drive. If the user or another application tries to access components in the advertised feature, it is installed on demand. In this case the invoking of the installer is handled by the operating system.

An example of this feature is shown in the Implement self-healing into the application how-to.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nickknw
Posts: 4
Joined: Fri May 21, 2010 8:03 pm
Contact: Website

Re: Problem Installing on Windows 7 with a CustomAction

IT WORKS!

Thank you very much for your help and the detailed explanation, cosmin! Everything works as expected now and there are no more issues!

Return to “Common Problems”