https://bugs.winehq.org/show_bug.cgi?id=42424
Bug ID: 42424 Summary: Error occurs while installing Renesas_Flash_Programmer_Package_V30201_free.exe. Product: Wine Version: 2.1 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: kiwamu@debian.or.jp Distribution: ---
Created attachment 57250 --> https://bugs.winehq.org/attachment.cgi?id=57250 Screen shot when the error occurs
The issue is reproduced by following:
1. Download Renesas_Flash_Programmer_Package_V30201_free.exe from following: https://www.renesas.com/ja-jp/software/D4000308.html 2. Run the Renesas_Flash_Programmer_Package_V30201_free.exe with following: $ wine Renesas_Flash_Programmer_Package_V30201_free.exe 3. You should see attached screen shot named "shot.png".
Could you support this issue? Best regards,
https://bugs.winehq.org/show_bug.cgi?id=42424
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://www.renesas.com/ja- | |jp/software/D4000308.html Component|-unknown |ntdll Keywords| |download, hardware, | |Installer Summary|Error occurs while |Renesas Flash Programmer |installing |V3.02.01 installer fails to |Renesas_Flash_Programmer_Pa |install USB drivers |ckage_V30201_free.exe. |(NtQueryInformationToken | |missing support for | |'TokenUIAccess') CC| |focht@gmx.net Ever confirmed|0 |1 Status|UNCONFIRMED |NEW
--- Comment #1 from Anastasius Focht focht@gmx.net --- Hello Kiwamu-san,
the error message is expected.
The installer displays the following requirements:
--- snip --- Install following item(s). - Microsoft Visual C++ 2010 SP1 Redistributable Package (x86) - Microsoft .NET Framework 4.5.2 --- snip ---
The default Windows version of the WINEPREFIX (your "virtual" C: drive -> default '~/.wine') is 'Windows XP'.
Microsoft .NET Framework 4.5.2 can't be installed by design with this Windows version. See here for vendor requirements: https://www.microsoft.com/en-us/download/details.aspx?id=42642
"Microsoft .NET Framework 4.5.2 (Offline Installer) for Windows Vista SP2, Windows 7 SP1, Windows 8, Windows 8.1, Windows Server 2008 SP2, Windows Server 2008 R2 SP1, Windows Server 2012 and Windows Server 2012 R2"
So the refusal of MS installer to install in 'Windows XP' prefix is correct behaviour.
The recommended way to install MS .NET Frameworks in WINEPREFIX is to use 'winetricks' (https://wiki.winehq.org/Winetricks). That script works around several known issues and also takes care of different MS .NET Frameworks version dependencies.
WineHQ appdb contains several sections dealing with peculiarities of different MS .NET Framework installations:
version 4.5.2: https://appdb.winehq.org/objectManager.php?sClass=version&iId=25478
-> 'winetricks -q dotnet452'
That recipe actually installs all .NET Frameworks in sequence: 2.0, 3.0, 3.0SPx, 4.0, 4.5, 4.5.2 as there are some .NET Framework version interdependencies and also vendor products/apps that bundle programs using different .NET Frameworks which make it hard for end user to figure that out, hence its easier to have all installed.
After the prerequisite installation has been satisfied the installer proceeds to install:
--- snip --- - Renesas Flash Programmer V3.02.01 - USB Driver for E1/E20 emulators V1.01.00 - USB Driver for Renesas MCU Tools V2.76.01 - The USB driver for USB Boot MCU TypeA V1.00.02 - The USB driver for USB Boot MCU TypeB V1.00.00
Install location C:\Program Files\Renesas Electronics\ ---- snip ---
The USB driver installers require 'Windows 7' settings hence you need to set 'WinVer' to 'Windows 7' (winecfg) before running the installer again.
The USB kernel driver packages fail to install due to various Wine insufficiencies.
--- snip --- $ find .wine/drive_c/ -name "*USB*" ... .wine/drive_c/users/focht/Temp/Renesas_Flash_Programmer_Package_V30201/Util/Setup/Renesas_USB_Driver_for_USB_Boot_MCU_TypeA__V10002.exe .wine/drive_c/users/focht/Temp/Renesas_Flash_Programmer_Package_V30201/Util/Setup/Renesas_USB_Driver_x64_for_USB_Boot_MCU_TypeB__V10000.exe .wine/drive_c/users/focht/Temp/Renesas_Flash_Programmer_Package_V30201/Util/Setup/Renesas_USB_Driver_x86_for_USB_Boot_MCU_TypeB__V10000.exe .wine/drive_c/users/focht/Temp/Renesas_Flash_Programmer_Package_V30201/Util/Setup/USB_Driver_for_Renesas_E-Series__V10100.exe .wine/drive_c/users/focht/Temp/Renesas_Flash_Programmer_Package_V30201/Util/Setup/USB_Driver_x64_for_Renesas_MCU_Tools__V27601.exe .wine/drive_c/users/focht/Temp/Renesas_Flash_Programmer_Package_V30201/Util/Setup/USB_Driver_x86T_for_Renesas_MCU_Tools__V27601.exe --- snip ---
Running one failed USB installer manually again:
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/Renesas/Emulator/Drivers/HMSEUSBDriver/for_32bit
$ WINEDEBUG=+tid,+seh,+relay,+msi wine ./dpinst.exe >>log.txt 2>&1 ... 0058:Call ntdll.NtOpenThreadToken(fffffffe,00000008,00000000,0033fcf0) ret=01034008 0058:Ret ntdll.NtOpenThreadToken() retval=c000007c ret=01034008 0058:Call ntdll.NtOpenProcessToken(ffffffff,00000008,0033fcf0) ret=01034020 0058:Ret ntdll.NtOpenProcessToken() retval=00000000 ret=01034020 0058:Call ntdll.NtQueryInformationToken(0000005c,00000012,0033fcbc,00000004,0033fcd0) ret=01033f69 0058:fixme:ntdll:NtQueryInformationToken QueryInformationToken( ..., TokenElevationType, ...) semi-stub 0058:Ret ntdll.NtQueryInformationToken() retval=00000000 ret=01033f69 0058:Call ntdll.NtQueryInformationToken(0000005c,0000001a,0033fcc8,00000004,0033fccc) ret=01033fcd 0058:err:ntdll:NtQueryInformationToken Unhandled Token Information class 26! 0058:Ret ntdll.NtQueryInformationToken() retval=c0000002 ret=01033fcd ... --- snip ---
This specific problem can be certainly fixed. But even then these USB drivers can't be run in Wine.
Wine is not an operating system - it doesn't implement the Windows kernel design/infrastructure as found with MS Windows. There is limited built-in USB driver/class driver support (HID) in recent Wine but nowhere near to support loading of all kinds of native drivers nor layered (stacked) drivers.
The programmer app itself starts after installation with some quirks but obviously isn't very useful without USB communication.
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/Renesas Electronics/Programming Tools/Renesas Flash Programmer V3.02
$ wine ./RFPV3.exe ... --- snip ---
To make this ticket/bug report useful, I'll change to summary to request adding support for 'TokenUIAccess' in 'NtQueryInformationToken' for the driver installer.
https://msdn.microsoft.com/en-us/library/windows/desktop/aa379626(v=vs.85).a...
Everything else has already been covered.
In general app installer issues should be taken to WineHQ forums first (https://forum.winehq.org/) unless it's really obvious there is a Wine bug (crash, ..). Bugzilla is not meant for end-user support.
----
If you really depend on this app, I suggest you set up a Windows 7+ virtual machine using VirtualBox etc., install the application and drivers in it and do pass-through of USB device to VirtualBox guest OS from Linux host (assuming your Linux kernel properly detected the device(s)).
----
$ sha1sum Renesas_Flash_Programmer_Package_V30201_free.exe 08e153d3d543737f75c376704423428c9c58dbe8 Renesas_Flash_Programmer_Package_V30201_free.exe
$ du -sh Renesas_Flash_Programmer_Package_V30201_free.exe 48M Renesas_Flash_Programmer_Package_V30201_free.exe
$ wine --version wine-2.1-126-g06c5a9a
Regards
https://bugs.winehq.org/show_bug.cgi?id=42424
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
revisiting, obviously still present.
https://source.winehq.org/git/wine.git/blob/d1f858e03da732c621504f90e349d517...
$ wine --version wine-5.7-177-gad1fad8a94
Regards
https://bugs.winehq.org/show_bug.cgi?id=42424
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com Summary|Renesas Flash Programmer |Multiple programs using |V3.02.01 installer fails to |Driver Store installer |install USB drivers |"dpinst.exe" fail to |(NtQueryInformationToken |install drivers |missing support for |(NtQueryInformationToken |'TokenUIAccess') |missing support for | |'TokenUIAccess') (Renesas | |Flash Programmer V3.02.01, | |Hantek 6000B)
--- Comment #3 from Zebediah Figura z.figura12@gmail.com --- Another one, from wine-devel:
https://www.winehq.org/pipermail/wine-devel/2022-January/205250.html
These programs are both using Microsoft's Driver Store redistributable installer dpinst.exe (or dpinst64.exe).
Unlike Anastasius at the time this bug was filed, I think it's possible and worthwhile to get some USB device drivers to work. Some Windows drivers can't work due to requiring kernel features (the big one is probably going to be arbitrary user space memory access via non-buffered ioctls), but others should be able to without difficulty. I've already introduced wineusb.sys, which as of the time of writing has enough functionality for at least one Windows driver to work.
Anyway, stubbing TokenUIAccess gets the installer further, but then it breaks later due to missing Driver Store functions in setupapi. These functions are undocumented and pretty much nobody has reverse-engineered them either. Given that dpinst.exe is a Microsoft component itself, and actually has at least some documentation to it (mostly in the form of its own help message printed when run with the /? switch) I think implementing a dpinst.exe replacement would be a more feasible approach.
https://bugs.winehq.org/show_bug.cgi?id=42424
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|https://www.renesas.com/ja- |https://web.archive.org/web |jp/software/D4000308.html |/20220130191410/http://hant | |ek.com/uploadpic/hantek/fil | |es/20210731/Hantek-6000_Ver | |2.2.7_D20210721.rar
--- Comment #4 from Anastasius Focht focht@gmx.net --- Hello folks,
adding stable download link via Internet Archive.
https://web.archive.org/web/20220130191410/http://hantek.com/uploadpic/hante...
https://www.virustotal.com/gui/file/ff7a9e9dfb92769db8e5c9cae99905bfec6a4305...
$ sha1sum Hantek-6000_Ver2.2.7_D20210721.rar b82caed208c90d43b4cd2c2ea34578591ef1307d Hantek-6000_Ver2.2.7_D20210721.rar
$ du -sh Hantek-6000_Ver2.2.7_D20210721.rar 17M Hantek-6000_Ver2.2.7_D20210721.rar
Regards
https://bugs.winehq.org/show_bug.cgi?id=42424
Saulius K. saulius2@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |saulius2@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=42424
Julian Rüger jr98@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jr98@gmx.net
https://bugs.winehq.org/show_bug.cgi?id=42424
Zeb Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |alois.schloegl@gmail.com
--- Comment #5 from Zeb Figura z.figura12@gmail.com --- *** Bug 55381 has been marked as a duplicate of this bug. ***