Two problems preventing installation - 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!

cesdewar
Posts: 11
Joined: Mon Oct 20, 2008 10:27 pm

Two problems preventing installation

I am just starting to use Advanced Installer - first dozen users reported no issues with my install file, but now I have two users with a problem trying to use the same file:

1. The install includes a small VisualBasic EXE that launches in the Install section of Custom Actions. But it never runs on this person's machine. They can launch the Exe directly and it runs fine (so nothing wrong with EXE, environment etc.) - just won't launch as part of the normal install (?) or at least won't display the dialog that normally appears.

2. A user with Vista/SP1(UAC off) reports they just get the error message: Error reading from file C:\tmp\Temp1_pimlical.zip\Pimlical.msi, Verify that the file exists and that you can access it.. They also said: The file seems to be there, and in fact I can run it from the command line, which results in the same error message. The permissions are -r--r--r-- (read only) on both the directory and the file, which seems reasonable (no reason for these files to be writable?) I had zipped up the file with WinZip and it looks like they are trying to run it directly from their unzip utility (?) - but even doing this works fine on my machine (but then again I have WinXP Pro/SP3). I did tell them to extract it somewhere else and try it, but have not heard back on that yet.

Any thoughts on why these installs would fail in this manner :( . The MSI file is really pretty simple - the only even slightly "unusual" thing is launching this little EXE file (but that obviously has nothing to do with the second problem). User in case #2 is a very sophisticated power user...
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Two problems preventing installation

Hi,
The install includes a small VisualBasic EXE that launches in the Install section of Custom Actions. But it never runs on this person's machine. They can launch the Exe directly and it runs fine (so nothing wrong with EXE, environment etc.) - just won't launch as part of the normal install (?) or at least won't display the dialog that normally appears.
I'm not sure why they are encountering this behavior. Can you please send us a verbose log of the installation which shows this problem to support at advancedinstaller dot com so we can investigate it? Also, please attach the AIP (project) file you used to create the package.
A user with Vista/SP1(UAC off) reports they just get the error message: Error reading from file C:\tmp\Temp1_pimlical.zip\Pimlical.msi, Verify that the file exists and that you can access it.. They also said: The file seems to be there, and in fact I can run it from the command line, which results in the same error message. The permissions are -r--r--r-- (read only) on both the directory and the file, which seems reasonable (no reason for these files to be writable?) I had zipped up the file with WinZip and it looks like they are trying to run it directly from their unzip utility (?)
Please note that it is not recommended to disable the UAC on Vista because access and privilege-related errors may occur. A solution for them would be to enable the UAC. Another solution would be to launch the MSI as an Administrator (use the "Run As Administrator" option).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
cesdewar
Posts: 11
Joined: Mon Oct 20, 2008 10:27 pm

Re: Two problems preventing installation

I'm still waiting for the log, but in the meantime, I've had a half-dozen other Vista users all reporting the same issue, but one of them seems to have figured out something. It's definitely related to the Visual Basic EXE to run under Custom Actions as he gets a dialog saying "There is a problem with this windows installer package A program required for this install to complete could not be run. Contact your support personnel or package vendor" .

I see a note in Advanced Installer and in another thread about using the option Deferred with no impersonation with Vista and did try that under WinXP but then run into a problem because the VisualBasic program needs to access the Registry and (presumably) since there is no defined user, I get an error like Invalid root in Registry Key "HKEY_CURRENT_USER...."[/i], but I"m guessing the program might at least launch then.

So I guess the question is am I stuck under Vista? If I use Deferred with no impersonation then I can't access the Registry? Or is there some other way to get Vista to just run an EXE ? Or am I missing something obvious about how to access a particular user's registry when running with no impersonation?

I suppose at some point I'll have to find some unused machine that I can put this ghastly OS on (XP is fine - I really don't want to junk up one of my production machines with crappy Vista :x ).
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Two problems preventing installation

Hi,

Please note that if the custom action runs without impersonation, it will run under the local system account. Therefore, you will be able to access only the HKEY_LOCAL_MACHINE hive because the local system account doesn't use HKEY_CURRENT_USER.

So, if you find a solution to not access HKEY_CURRENT_USER, you can run the custom action as "Deferred with no impersonation". This way, the installation should work correctly on Vista.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
cesdewar
Posts: 11
Joined: Mon Oct 20, 2008 10:27 pm

Re: Two problems preventing installation

I'm just not that familiar with Vista at this point - I was rather hoping I could avoid having to install it here, but it looks like I'll have to for no other reason than to figure out how to use Advanced Installer to get this app properly installed under Vista (works just great under all other versions of Windows).

So you are saying that it is impossible under Vista for me to run an application as part of the install that would access the HKEY_CURRENT_USER in the registry? There's no setting in Vista that makes this possible? I've read briefly about UAC, enabling/disabling, or is there some way to run this with administrator privileges that would bypass this issue, or???

I have to say I am disappointed to see all these problems. Another user said that to even install the MSI file they had to turn of UAC as otherwise they just get a dialog saying The system administrator has set polices to prevent this installation. Presumably this latter error is the one that I bypass by setting that deferred with no impersonation option, right?

But after doing that, they of course get the error about the HKEY_CURRENT_USER root being inaccessible in the registry :(

So there is no way to access the user's registry in an install under Vista?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Two problems preventing installation

Hi,
So you are saying that it is impossible under Vista for me to run an application as part of the install that would access the HKEY_CURRENT_USER in the registry?
On Vista the custom actions which affect the system need to run without impersonation. So if your custom action affects the system (writes registry entries or modifies files), it should run without impersonation. In this case, the HKEY_CURRENT_USER hive cannot be accessed.
I've read briefly about UAC, enabling/disabling, or is there some way to run this with administrator privileges that would bypass this issue, or???
On Vista the Administrators do not have full privileges (their rights are reduced automatically). Only the local system account has full privileges (like an Administrator on Windows XP). Therefore, the custom action needs to run under the local system account (without impersonation) to have full privileges.
Another user said that to even install the MSI file they had to turn of UAC as otherwise they just get a dialog saying The system administrator has set polices to prevent this installation. Presumably this latter error is the one that I bypass by setting that deferred with no impersonation option, right?
Yes.
So there is no way to access the user's registry in an install under Vista?
A lot of workarounds can be found for this problem. For example, you can create a different custom action which accesses the HKEY_CURRENT_USER hive. This custom action can run normally because the user has enough privileges. After this custom action you can create another one which access the rest of the resources which need full privileges. This custom action can run without impersonation.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”