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.
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!
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?