Vista: Problem running Custom Action: UI Custom Action - 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!

cecil@coral8.com
Posts: 18
Joined: Mon Oct 27, 2008 11:45 pm

Vista: Problem running Custom Action: UI Custom Action

Hello Caphyon!

I am working on an installer that runs on both XP and Vista/Server 2008. XP works fine.

The problem on Vista is that I need to perform an action based on a user folder/filename
selection. I can't run this in the InstalllExecuteSequence because I must determine if the
user input is correct and possibly modify the UI sequence. Specifically, I need to test for the
presence or absence of a particular file.

I can't wait for InstallFinalize as that is too late.

However, a DoAction in the Next button of the UI causes a Vista permission abort.
I have to place the vbs script in the UICustomActions. The only option is "Immediate
Execution" and this does not allow the "Deferred with no impersonation" that
Vista seems to want.

Running the install as Admin works, but running as a user with Admin privileges does not!

Running as Admin also causes all installed files to be owned by admin and I have to
run another script at the end to change tthe owner and permissions! And I certainly
do NOT want to launch the application as Admin because the application will create
lots of additional files owned by Admin - what a mess!

Is there some way around this mess? How can I get Vista to simply run my scripts?

You have a great product :D - too bad Microsoft insists on such a poor design! :(
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Re: Vista: Problem running Custom Action: UI Custom Action

Hi,

You get that behavior because the package UI runs in user context (not elevated). However you can use a "Launch File as Administrator" type of custom action. On how to configure it please see:
http://www.advancedinstaller.com/user-g ... file-admin

Note that using this CA type you cannot launch the .vbs directly, you need to run it like this: wscript.exe <path_to_file>.vbs.

Add the script file as temporary file under "Windows Volume->Temporary" folder in "Files and Folders" page. Set RunAsAdminFile property to wscript.exe, set RunAsAdminCmd property to "[&filename.vbs]". Since temporary files are expanded after MigrateFeatureStates any custom action that refers a temp file need to be scheduled after this standard action.

Hope this help. Let us know if you encounter any problem.

Kind Regards,
Gigi
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”