Specifying log file location in uninstall shortcut? - 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!

canhuth
Posts: 241
Joined: Thu Jun 19, 2008 9:03 am

Specifying log file location in uninstall shortcut?

Hello everyone.

I used to specify the log file parameters in the uninstall shortcut so that a log file would be readily available in case of error at uninstallation.

Now that we switched the installer to be a per-machine installer, writing the log file to "[APPDIR]\..\" leads to an error message on Windows Vista, saying that the log file does not exist or cannot be created. I guess the problem is that msiexec.exe starts out as a non-elevated process and thus it cannot write to [ProgramFiles] and probably not to "all user" locations either, which leaves me wondering what log file location I could specify in the uninstall shortcut?

Does anyone have an idea?



With best regards

Clemens Anhuth
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Specifying log file location in uninstall shortcut?

Hi,

Unfortunately, the Windows Installer logging starts before the uninstall process is elevated. Therefore, a solution would be to create the log in a per-user location which doesn't require Administrator privileges.

Another solution would be to use a custom action which sets the "Run as Administrator" flag for the Uninstall shortcut. Perhaps this will help you:
http://forums.microsoft.com/MSDN/ShowPo ... 9&SiteID=1

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
canhuth
Posts: 241
Joined: Thu Jun 19, 2008 9:03 am

Re: Specifying log file location in uninstall shortcut?

Hello Cosmin,

thank you for your reply. I will try your suggestions.



With best regards

Clemens Anhuth

Return to “Common Problems”