After installing my VB6 application on a administrator account, I want to run it on a standard user account. Immediately after double clicking the shortcut Windows Installer starts up and it asks me to provide the path to the installation package. If I cancel this, I am presented with an error dialog that says "Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item." The error dialog contains the path to the installer in the titlebar of the dialog, the path in the titlebar points to the admin users' desktop.
When I run the shortcut as Admin the application works fine and doesn't launch Windows Installer. The application also works fine if I completely turn off UAC.
Please note that the application is installed "per-machine" and doesn't require admin privileges to run according to its manifest. The installer was created using Advanced Installer 11.1 Enterprise Edition.
I have added permissions to "Everyone" for all the registry keys in the registry tab of Advanced Installer. I do however have custom actions that register my COM dll's after the installation is done copying the files to the filesystem. It would be almost impossible to give these keys the same permissions because there are quite alot of keys being added when registered this way.
Am I correct in saying that Windows Installer is repairing my application so that the standard user can use it? After I let the installer do its thing I must restart my pc, after the restart the application also works fine.
I have also tried to create a .sdb using Microsoft Compatibility Administrator to set the "RunAsInvoker" compatibility fix for the application, this also doesn't seem to have any effect whatsoever. Furthermore I also gave "Everyone" FullControl of all the folders and files that my application uses, this also doesn't do anything.
When I run ProcessMonitor, I don't see any AccessDenied errors. All the registry access though is set to DesiredAccess:Maximum Allowed. Most registry access is also pointing to HKCU hive, this is expected however as most keys from my application reside there.
Am I missing something here, is there some permission that is being set that I am not aware of? Is it possible that some registry value is being modified that requires admin privileges, and if so, is it possible to allow my application access to all the keys that are added by the installer? Manually setting the permissions on each key is a pain because of the somewhat 100+ keys that are added.
Indeed, Windows Installer is detecting that key members of your components are missing for the non-admin user and tries to launch an automatic repair. It is nothing wrong with that, a lot of applications that install per-user resources use this technique.
The problem is that your non-admin user does not have access to the MSI that installed the application, so it cannot run the repair. This can happen because:
1) you have the installer generated from Advanced Installer as an EXE (with MSI inside) and after the installation finishes the MSI and CAB files get deleted.
To solve this situation go to Media page and enable the option "Do not delete extracted files".
2) you have the installer generated from Advanced Installer as an EXE (with MSI inside) and ts extraction path is set to a per-user location, which resolves to the admin user folder, to which your new user does not have access.
To solve this go to Media page and change the extraction folder to something like this:
[TempFolder][|Manufacturer][|ProductName] [|ProductVersion]\install
This will make your EXE to extract all its resources in the system Temp folder, making it accessible to all users from the machine, admins and non admins.
NOTE The above apply only if you have an EXE generated by Advanced Installer as setup package. You can see what package type is Advanced Installer generating from the above mentioned Media page.
If this does not solve the problem you should automatic verbose logging (see last part of the linked article) and see what is the installer writing in it after you allow it to run, i.e. login with admin credentials. The log should tell us exactly what it is missing and why the MSI is re-launched by Windows Installer.
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句