WineHQ
Bug Tracking Database – Bug 29550

 Bugzilla

 

Last modified: 2013-12-20 12:43:48 UTC  

PaintTool SAI installer complains about missing administrator rights (Wine defaults to NTFS for unknown fs type, FSCTL_GET_NTFS_VOLUME_DATA support needed)

Bug 29550 - PaintTool SAI installer complains about missing administrator rights (Wine defaults to NTFS for unknown fs type, FSCTL_GET_NTFS_VOLUME_DATA support needed)
PaintTool SAI installer complains about missing administrator rights (Wine de...
Status: CLOSED FIXED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: kernel32
1.3.36
x86 Linux
: P2 normal
: ---
Assigned To: Mr. Bugs
http://www.systemax.jp/en/sai/
: download, Installer, obfuscation
: 19476 (view as bug list)
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2012-01-06 14:35 UTC by ArdentAngel
Modified: 2013-12-20 12:43 UTC (History)
2 users (show)

See Also:
Regression SHA1:
Fixed by SHA1: 6e0d43811b5e407a77fde3a64ead5f3700ea68a9
Distribution: ---
Staged patchset:


Attachments
Screenshot of error (274.38 KB, image/png)
2012-01-06 14:35 UTC, ArdentAngel
Details
Console log of setup (819 bytes, text/plain)
2012-01-08 09:06 UTC, Luca Bennati
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ArdentAngel 2012-01-06 14:35:20 UTC
Created attachment 38284 [details]
Screenshot of error

I'm sorry if this is a duplicate, but I could not find the exact same issue on this forum.

I can not install Paint Tool Sai with Wine. First I tried by clicking (as normal) but I got an error that I am not the administrator, so I tried to open as the administrator and that did not work either.

After looking around the web, it seems that others have this same problem, Wine is not acting as the administrator and newer programs will give an error because of this. Since I am using Wine, I can not change the root of the windows (wine) to administrator. For everything I need to do, this make Wine completely useless for me also making this bug terminal for this issue.

Looked for some work arounds and found nothing except to install an older version of wine, which I may do, but that does not correct this issue and will most likely create other issues since I am NOT an advanced user of linux and may or may not be able to keep the auto update from messing with Wine.

I have uploaded a screen shot of the one time I attempted to install Paint Tool Sai at the comand line.
Comment 1 Rosanne DiMesio 2012-01-06 18:50:43 UTC
Not critical. http://bugs.winehq.org/page.cgi?id=fields.html#importance
Comment 2 Dmitry Timoshkov 2012-01-07 07:19:28 UTC
Wine version? Terminal output?
Comment 3 Luca Bennati 2012-01-08 09:06:37 UTC
Created attachment 38301 [details]
Console log of setup

Can reproduce with trial demo from http://www.systemax.jp/en/sai/ and wine-1.3.36-172-gb00e703.
The first "setup" is just unpacking: the real installation will begin when you start sai.exe from that folder.
Comment 4 Anastasius Focht 2012-01-08 13:04:24 UTC
Hello,

confirming.
It seems the installation employs some kind of DRM scheme for trial period/license data which breaks due to Wine defaulting to NTFS for unknown file system type.

Took a bit to find the relevant part because the action is done on different thread and the error condition is asynchronously propagated through message posting.

--- snip ---
...
0037:Call KERNEL32.GetLogicalDrives() ret=0045530f
0037:Ret  KERNEL32.GetLogicalDrives() retval=02000004 ret=0045530f
0037:Call KERNEL32.GetDriveTypeA(2dfee570 "c:\\") ret=00455363
0037:Ret  KERNEL32.GetDriveTypeA() retval=00000003 ret=00455363
0037:Call KERNEL32.GetVolumeInformationA(2dfee570 "c:\\",00000000,00000000,00000000,2dfee580,2dfee57c,2dfee584,0000003f) ret=004553a3
0037:Ret  KERNEL32.GetVolumeInformationA() retval=00000001 ret=004553a3
0037:Call ntdll._memicmp(2dfee584 "NTFS",004cd5c0 "NTFS",00000004) ret=004553b5
0037:Ret  ntdll._memicmp() retval=00000000 ret=004553b5
0037:Call KERNEL32.CreateFileA(2dfee078 "\\\\.\\c:",80000000,00000003,00000000,00000003,00000000,00000000) ret=004554a6
0037:Ret  KERNEL32.CreateFileA() retval=000001e0 ret=004554a6
0037:Call KERNEL32.DeviceIoControl(000001e0,00090064,00000000,00000000,2dfee1c0,00000060,2dfee064,00000000) ret=004558ff
0037:Ret  KERNEL32.DeviceIoControl() retval=00000000 ret=004558ff
0037:Call KERNEL32.CloseHandle(000001e0) ret=004558be
0037:Ret  KERNEL32.CloseHandle() retval=00000001 ret=004558be
0037:Call KERNEL32.GetDriveTypeA(2dfee570 "c:\\") ret=00455363
0037:Ret  KERNEL32.GetDriveTypeA() retval=00000003 ret=00455363
0037:Call KERNEL32.GetVolumeInformationA(2dfee570 "c:\\",00000000,00000000,00000000,2dfee580,2dfee57c,2dfee584,0000003f) ret=004553a3
0037:Ret  KERNEL32.GetVolumeInformationA() retval=00000001 ret=004553a3
0037:Call ntdll._memicmp(2dfee584 "NTFS",004cd5c0 "NTFS",00000004) ret=004553b5
0037:Ret  ntdll._memicmp() retval=00000000 ret=004553b5
0037:Call KERNEL32.CreateFileA(2dfee078 "\\\\.\\c:",80000000,00000003,00000000,00000003,00000000,00000000) ret=004554a6
0037:Ret  KERNEL32.CreateFileA() retval=000001e0 ret=004554a6
0037:Call KERNEL32.DeviceIoControl(000001e0,00090064,00000000,00000000,2dfee1c0,00000060,2dfee064,00000000) ret=004558ff
0037:Ret  KERNEL32.DeviceIoControl() retval=00000000 ret=004558ff
0037:Call KERNEL32.VirtualAlloc(00000000,00000000,00001000,00000004) ret=00455587
0037:Ret  KERNEL32.VirtualAlloc() retval=00000000 ret=00455587
0037:Call KERNEL32.CloseHandle(000001e0) ret=004558be
0037:Ret  KERNEL32.CloseHandle() retval=00000001 ret=004558be
0037:Call user32.PostMessageA(00080078,00000111,00000004,00000000) ret=00420960
0037:trace:msg:PostMessageW hwnd 0x80078 msg 111 (WM_COMMAND) wp 4 lp 0
0037:Ret  user32.PostMessageA() retval=00000001 ret=00420960 
...
0035:Call user32.MessageBoxA(00000000,001859f2 "SAI can not complete setup process because current user dose not have administrator right. Please launch SAI with one of the following way.\n\n - Logon as administrator and launch SAI\n\n - Right click SAI program file -> [Run As Other User]?Enter administrator account (Windows 2000/XP)\n\n - Right c"...,00000000,00000010) ret=00493586
--- snip ---

MSDN entry for FSCTL_GET_NTFS_VOLUME_DATA control code:

http://msdn.microsoft.com/en-us/library/windows/desktop/aa364569.aspx

NTFS_VOLUME_DATA_BUFFER structure:

http://msdn.microsoft.com/en-us/library/windows/desktop/aa365256.aspx

Implementing that ioctl and returning fake data is not enough, you also need sane FSCTL_GET_NTFS_FILE_RECORD data (hence NTFS_VOLUME_DATA_BUFFER BytesPerFileRecordSegment for proper buffer size).

This source code might be helpful to understand how low-level file system access/info retrieval is done:

"FDump - Dumping File Sectors Directly from Disk using Logical Offsets"

http://www.codeproject.com/KB/files/FDump.aspx

(FsReadFileMFT function for similar sequence)

http://www.codeproject.com/script/Articles/ViewDownloads.aspx?aid=32169&zep=fdump_src%2ffdump%2ffs_io.c&rzp=%2fKB%2ffiles%2fFDump%2f%2ffdump_src.zip

---

There is also less intrusive code for handling install on FAT32 file systems.

For this to work you need kernel32.dll GetVolumeInformationW() to return FAT32 fs type instead of NTFS for default case.

(http://source.winehq.org/git/wine.git/blob/d5ad5ca91ca6aa1a3eb2a3849bb0dbcb6f67f5d0:/dlls/kernel32/volume.c#l650)

This allows the app to install/start.

If the installer succeeds, a file containing encrypted DRM data is created in "C:\Documents and Settings\All Users\Application Data\SYSTEMAX Software Development\SAI\NotRemoveMe.ssd"

Additionally a registry entry, pointing to DRM file:

[HKEY_LOCAL_MACHINE\Software\SYSTEMAX Software Development\Sai]
"SetupInfo"="C:\\users\\Public\\Application Data\\SYSTEMAX Software Development\\SAI\\NotRemoveMe.ssd"

---

Funny tidbit (from their website) ...

--- quote ---
To use this software, the skills of basic file operation on Windows is required. Please do not buy the license for this software if you do not have the skills of basic file operation on Windows.
--- quote ---

_o0_

Straight through google translate?

Seems not: http://translate.google.com/translate?sl=ja&tl=en&js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&u=http%3A%2F%2Fwww.systemax.jp%2Fja%2Fsai%2F

--- quote ---
Furthermore, in the installation settings, use the product license, and a basic knowledge of computer basics (especially those related to the files and folders), please note that it will be imperative that it is mastered. 
--- quote ---

;-)

$ sha1sum sai-1.1.0-ful-en.exe 
fb1876e370d431f21df06428ca6ccf35de727000  sai-1.1.0-ful-en.exe

$ wine --version
wine-1.3.36-172-gb00e703

There is also an interesting issue with +relay, I'll make that a separate bug.

Regards
Comment 5 Anastasius Focht 2012-01-16 01:15:18 UTC
*** Bug 19476 has been marked as a duplicate of this bug. ***
Comment 6 Anastasius Focht 2013-12-13 18:35:51 UTC
Hello folks,

revisiting because some guy in #winehq encountered this issue, reminding me immediately of this bug.

He used an outdated Wine version 1.4.1 where this bug was still present.

As I stated in bug 33576 (http://bugs.winehq.org/show_bug.cgi?id=33576#c4) the installer hits a different code path due to addition of FILE_PERSISTENT_ACLS flag for NTFS volumes (commit 6e0d43811b5e407a77fde3a64ead5f3700ea68a9).

That commit introduced a regression though (bug 33576), letting the app fail on startup.

Resolving 'fixed' (you need at least Wine 1.5.30)

Also refining summary to get better search/hit probability.

"Paint Tool Sai" -> "PaintTool SAI"

Regards
Comment 7 Alexandre Julliard 2013-12-20 12:43:48 UTC
Closing bugs fixed in 1.7.9.


Privacy Policy
If you have a privacy inquiry regarding this site, please write to [email protected]

Hosted By CodeWeavers