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!

brucer
Posts: 5
Joined: Tue Nov 23, 2004 12:30 am
Location: Palo Alto, CA
Contact: Website

User privileges and Install Dir

I'm having trouble solving a problem with user privileges.

Our application updates selected dll files after initially
being installed. The installer allows the user to install to
[ProgramFilesFolder], but when the user starts the app, the
files can't be updated.

If I can determine that the user doesn't have admin
permissions, then I would like to change the default path,
shown in the Location dialog, to [AppDataFolder][ProductName].


* Can someone point me to a VBS or JS function, or steps for
determining a user's permissions. Then I can set a property,
to the best default install dir.

* Part two, will changing the TARGETDIR before the Location
dialog is displayed, change what is displayed in the input
field? I can use Orca to move a custom action from the
InstallExeecuteSequence to InstallUISequence.


Of course I could write my own Location dialog, but writing a
directory browser doesn't look like fun, and it would just
duplicate the nice browser that is already in Advanced
Installer. Or maybe there are better solutions for this
problem?
Mike
Posts: 292
Joined: Wed Jun 01, 2005 10:50 am
Location: Craiova, Romania
Contact: Website

Hi,

The property [AdminUser] is set to the value "1" if the user is an administrator. You can use it to condition a change of the Target Dir.

Yes, if you edit the MSI with Orca you can change the location displayed in the Location dialog.

Regards,
Mihai
Mihai Bobaru
Advanced Installer Team
http://www.advancedinstaller.com
brucer
Posts: 5
Joined: Tue Nov 23, 2004 12:30 am
Location: Palo Alto, CA
Contact: Website

Thanks! I missed seeing that obvious property in the Windows Installer docs :-)
Setting the TARGETDIR work too (after I move the custom action).

_BruceR

Return to “Common Problems”