Menu

#1138 nsDialog directory page folder browse dialog not work on hyper-v 2012 R2

2.0 Series
open
nobody
hyper-v (1)
3
2016-03-27
2016-03-25
Jimmy Wei
No

I am using NSIS 2.46, my installer directory page folder browse doesn't working on hyper-v 2012 R2 system. The script and screen shot are attached.

After debugging a simple win32 c++ which also calls into SHBrowseForFolder, I finally found on hyper-v 2012 R2, the BIF_NEWDIALOGSTYLE flag should not be used for SHBrowseForFolder call.

I am not sure whether it is really deserved to fix it in NSIS nsDialog code. But it really bring people into trouble.

One drawback of removing the BIF_NEWDIALOGSTYLE flag is that the "New Folder" button on the folder browsing dialog will not available.

2 Attachments

Discussion

  • Anders

    Anders - 2016-03-26

    The directory page does not use nsDialogs but this issue applies to the directory page, nsDialogs and InstallOptions since they all use the BIF_NEWDIALOGSTYLE flag. This flag has been documented for 15+ years and MSDN says nothing about not using it when running on Hyper-V so this is a bug in Windows.

    Even if we wanted to work around it, I don't know of a clean way of detecting that you are running on Hyper-V!

     
  • Jimmy Wei

    Jimmy Wei - 2016-03-27

    yes, you are right, when I try to recompile the code to workaround this issue, I found I need to change Source/exehead/Ui.c which was compiled into the compression stubs.

    I am wondering whether there are any way to make the directory configurable for the folder browsing behavior?

     

Log in to post a comment.