How do I set OFN_HIDEREADONLY - 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!

prolancer
Posts: 17
Joined: Wed Nov 23, 2011 6:16 am

How do I set OFN_HIDEREADONLY

Hi,

I am trying to use the BrowseForFile dialog as explained in this tutorial: http://www.advancedinstaller.com/user-g ... -file.html.

How do I set the OFN_HIDEREADONLY flag so the dialog hides read only files?

Thank you
Emil
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How do I set OFN_HIDEREADONLY

Hi Emil,

Indeed this is not documented properly in our user guide but we will improve this in the future.

Here's what you need to do to set these flags:
- first of all, here's their Microsoft description and hexadecimal( HEX ) value;
- in your project, you should set this property:

Code: Select all

AI_OFN_FLAGS
before the custom action call with a "SetProperty" published event;
- the value of the above property should be set with the result of the following operation converted to integer( INT ) value:

Code: Select all

OFN_EXPLORER | OFN_HIDEREADONLY | OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST
where " | " is the bitwise OR operator;

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”