"init_redirects cannot open L"C:\\windows" (c000000f)"

Questions about Wine on Linux
Locked
rlaggren
Level 1
Level 1
Posts: 9
Joined: Mon Apr 11, 2016 10:25 pm

"init_redirects cannot open L"C:\\windows" (c000000f)"

Post by rlaggren »

After a disk problem and restoring the home dir(s) from a recovered image, everything works as before except... wine. Wine throws the title error; winetricks also fails now. The restore involved some moving of some files (after the bulk copy completed), running as root. As part of the clean up, I chown'd the home dirs to make the relevant user the owner of all content; I also made all content the group "users". AFAIK this is how it was before the disk problem. Here is an example of trying to run a previously working CAD program:

Code: Select all

rufus@Air-PC:~/.wine/SmartSketch> env WINEPREFIX="/home/rufus/.wine/SmartSketch" wine start /unix "/home/rufus/.wine/SmartSketch/drive_c/Program Files (x86)/SmartSketch/Program/SmartSketch.exe"
0009:err:file:init_redirects cannot open L"C:\\windows" (c000000f)
0009:err:process:init_windows_dirs directory L"C:\\windows" could not be created, error 2
0009:err:process:init_windows_dirs directory L"C:\\windows\\system32" could not be created, error 3
0009:err:process:init_windows_dirs directory L"C:\\windows\\syswow64" could not be created, error 3
000b:err:process:init_windows_dirs directory L"C:\\windows" could not be created, error 2
000b:err:process:init_windows_dirs directory L"C:\\windows\\system32" could not be created, error 3
000b:err:process:init_windows_dirs directory L"C:\\windows\\syswow64" could not be created, error 3
000b:err:wineboot:main Cannot set the dir to L"C:\\windows" (2)
000b:err:wineboot:ProcessRunKeys Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (2)
000d:err:process:init_windows_dirs directory L"C:\\windows" could not be created, error 2
000d:err:process:init_windows_dirs directory L"C:\\windows\\system32" could not be created, error 3
000d:err:process:init_windows_dirs directory L"C:\\windows\\syswow64" could not be created, error 3
000d:fixme:service:scmdatabase_autostart_services Auto-start service L"MountMgr" failed to start: 3
000d:fixme:service:scmdatabase_autostart_services Auto-start service L"PlugPlay" failed to start: 2
000d:fixme:service:scmdatabase_autostart_services Auto-start service L"WineBus" failed to start: 3
0009:fixme:file:GetLongPathNameW UNC pathname L"\\\\?\\unix\\home\\rufus\\.wine\\SmartSketch\\drive_c\\Program Files (x86)\\SmartSketch\\Program\\SmartSketch.exe"
0010:err:file:init_redirects cannot open L"C:\\windows" (c000000f)
0010:err:process:init_windows_dirs directory L"C:\\windows" could not be created, error 2
0010:err:process:init_windows_dirs directory L"C:\\windows\\system32" could not be created, error 3
0010:err:process:init_windows_dirs directory L"C:\\windows\\syswow64" could not be created, error 3
0010:err:module:import_dll Library MSVBVM60.DLL (which is needed by L"unix\\home\\rufus\\.wine\\SmartSketch\\drive_c\\Program Files (x86)\\SmartSketch\\Program\\SmartSketch.exe") not found
0010:err:module:attach_dlls Importing dlls for L"unix\\home\\rufus\\.wine\\SmartSketch\\drive_c\\Program Files (x86)\\SmartSketch\\Program\\SmartSketch.exe" failed, status c0000135
rufus@Air-PC:~/.wine/SmartSketch> 
Here is winetricks:

Code: Select all

rufus@Air-PC:~/.wine/SmartSketch> env WINEPREFIX="/home/rufus/.wine/SmartSketch" winetricks
------------------------------------------------------
Your version of wine 3.7 is no longer supported upstream. You should upgrade to 4.x
------------------------------------------------------
Executing mkdir -p /home/rufus/.wine
------------------------------------------------------
WINEPREFIX INFO:
Drive C: total 32
drwxr-xr-x  7 rufus users 4096 Apr  8 07:39 .
drwxr-xr-x  4 rufus users 4096 May  1 09:48 ..
drwxr-xr-x  2 rufus users 4096 Jul 25  2018 Drawing Files
drwxr-xr-x  6 rufus users 4096 Jul 25  2018 Program Files
drwxr-xr-x  7 rufus users 4096 Jul 25  2018 Program Files (x86)
drwxr-xr-x  4 rufus users 4096 Jul 25  2018 users
drwxr-xr-x 19 rufus users 4096 Apr 10 08:50 windows
-rw-r--r--  1 rufus users    9 Apr  8 07:39 .windows-serial

Registry info:
/home/rufus/.wine/SmartSketch/system.reg:#arch=win64
/home/rufus/.wine/SmartSketch/userdef.reg:#arch=win64
/home/rufus/.wine/SmartSketch/user.reg:#arch=win64
------------------------------------------------------
------------------------------------------------------
wine cmd.exe /c echo '%AppData%' returned unexpanded string 'C:\windows\system32\unknown' ... this can be caused by a corrupt wineprefix (`wineboot -u` may help), by an old wine, or by not owning /home/rufus/.wine/SmartSketch
------------------------------------------------------
rufus@Air-PC:~/.wine/SmartSketch> 
I'm running opensuse 15.1. using the versions provided by the distro. As noted above, "it worked before...". I have checked all the dirs and spot checked all the files involved and all return owner:rufus and group:users as expected. Checking the UID and GID yield 1000:100 as expected. Eg:

Code: Select all

rufus@Air-PC:~/.wine/SmartSketch> dir -n -a
total 4072
drwxr-xr-x 4 1000 100    4096 May  1 09:57 .
drwxr-xr-x 7 1000 100    4096 May  1 09:09 ..
drwxr-xr-x 2 1000 100    4096 Apr 10 12:25 dosdevices
drwxr-xr-x 7 1000 100    4096 Apr  8 07:39 drive_c
-rw-r--r-- 1 1000 100 4039605 May  1 09:57 system.reg
-rw-r--r-- 1 1000 100      11 Apr 10 08:13 .update-timestamp
-rw-r--r-- 1 1000 100    3254 Jul 25  2018 userdef.reg
-rw-r--r-- 1 1000 100  102245 May  1 09:57 user.reg
rufus@Air-PC:~/.wine/SmartSketch> 
The relevant line from passwd in /etc:

Code: Select all

rufus:x:1000:100:Rufus:/home/rufus:/bin/bash
It looks totally like a permissions problem, but I do not see where it goes wrong - it all looks like I _think_ it should.


Thanks for any thoughts.
Rufus
spoon0042
Level 6
Level 6
Posts: 572
Joined: Thu Dec 24, 2009 11:00 am

Re: "init_redirects cannot open L"C:\\windows" (c000000f)"

Post by spoon0042 »

Weird, 0xc000000f is file not found rather than a permissions issue, I think. Two thoughts:

1. did you install a newer version of wine on the old install?

2. what's 'ls -al ~/.wine/SmartSketch/dosdevices' look like?
rlaggren
Level 1
Level 1
Posts: 9
Joined: Mon Apr 11, 2016 10:25 pm

Re: "init_redirects cannot open L"C:\\windows" (c000000f)"

Post by rlaggren »

@Spoon

Thanks for responding.

> newer version
Not since the last time I ran this program before my disk problems.

Looking at "dosdevices", I see that tree is empty. IIRC, it should mirror the one found under "drive_c". Maybe there are sym links in there somewhere that didn't make it through the imaging and recovery process. I gave up and created another Prefix and reinstalled. That gives me a running program, although I need to go through and reset all my configurations. But I need to review some CAD files asap and this program, although it has extremely good usability features, saves in a unique file format.

Program user settings (including wine overrides and additions) are the bane of any system changes I do. Sometimes it's just more effective to start over and this looks like one of those times. Some symbol library functionality seems to have died, but it's been 18 months since I've used this program heavily, so it's hard to be sure. Is there any systematic way to find what, eg. DLL's, may be problematic? The program functions well enough for now, but the command line output always has an growing list of complaints and I don't readily see how to make use of it.

And on startup a small dialog says:
"Run time error 380 --- Invalid property value".

IAC, I appreciate your taking a stab at the problem - it caused me to review the directory tree and see that gaping hole there.


Regards,
Rufus
spoon0042
Level 6
Level 6
Posts: 572
Joined: Thu Dec 24, 2009 11:00 am

Re: "init_redirects cannot open L"C:\\windows" (c000000f)"

Post by spoon0042 »

There is one (very old) test result on the appdb that mentions a dll override and the error 380. If things are working though don't worry about that or the terminal output, a lot of it usually doesn't mean anything.

dosdevices should have a link to c: and you can recreate it if you haven't to try your old prefix again: 'ln -s ../drive_c c\:' in the dosdevices dir. (You can also remake the z: link 'ln -s / z\:')

If your wine version didn't change then in theory saved files and things should be in the same places, I don't know if you were having an issue there.
rlaggren
Level 1
Level 1
Posts: 9
Joined: Mon Apr 11, 2016 10:25 pm

Re: "init_redirects cannot open L"C:\\windows" (c000000f)"

Post by rlaggren »

Spoon

I'll keep the original prefix around and try that link to see if it solves the problem. If it does, I'll add it to my Upgrade-Fixit-FAQ and/or the yet to be created BkUp_Rcvr_FAQ. But that waits on the real work of getting my house repairs spec'd and contracted for this spring before all the workman are booked.

Thank you for your help here. If I get the link tested, I'll post back here with results. It sounds plausible that should work.


Regards,
Rufus
amarchessi
Newbie
Newbie
Posts: 1
Joined: Tue Aug 17, 2021 9:45 am

Re: "init_redirects cannot open L"C:\\windows" (c000000f)"

Post by amarchessi »

@rlaggren

Could you share some hints on running SmartSketch with wine? It launches and works fine with .igr files, but fails to open other formats, e.g. dxf. I think I need to install something with winetricks.
rlaggren
Level 1
Level 1
Posts: 9
Joined: Mon Apr 11, 2016 10:25 pm

Re: "init_redirects cannot open L"C:\\windows" (c000000f)"

Post by rlaggren »

Sorry, I don't think I can help you. I have always had that problem. I had the same problem when I ran it under Windows. There are various service packages issued long ago and when I was using SmartSketch many hours each week and I installed them all. Maybe it's a bug in the original program or maybe an additional purchase which I never really needed.

In the past 10 years or so I have used SmartSketch only a few hours each year for quick diagrams to clarify layouts for workmen and for that I only need it to print. I keep it around because I baked the gui into my brain and it's extremely intuitive and quick to use - for me.

There are CAD options, cheap and decent, which would likely be a better bet today. You'll spend 100's (literally) of hours getting up to real speed with any complex program and CAD is one of the craziest. It would seem to be worth it to learn something that is still developed, or at least maintained.

- The last GoogleSketchup that ran entirely on your local host was Version 8, I believe. That's not too sophisticated, but excepting (I think) some dimensioning, it can do everything SmartSketch can; plus, it has half decent 3D. If you're touching CAD more than a few hours a year, it will likely be more than worth it to maintain G-SketchUp skills because it's so gawd-awful ubiquitous; and, of course there are millions of resources for it out there.

- Varicad is an active contender at the moment - I keep getting promo blurbs from them and it seemed ok when I tried it 5 years ago. IIRC, it's $300 more or less for some basic version. You need to check for "deals" etc.

There may be a couple newer ones out there. For Linux in particular, I think a buddy sent me some promos last year.

SmartSketch, as of 7-8 years ago, was still maintained "in house" but (sorry I forget the big corporation that owns it - pipeline company?) the company doesn't market it. It's a very very fine example of gui design, but it's not part of the CAD ecosystem at large and hasn't been for 12-15 years.

If you need CAD for more than a few hours each year, I think you might want to move on from SmartSketch. At some point I realized that when I actually _use_ something a lot, any tool, and have skills I want to apply effectively myself, and I understand enough to clearly recognize what will work best for me --- that tool is worth almost anything they want to charge. Almost. But it really does work that way. If you're just playing around for one semester or something, then $$$ become very relevant. If you need to produce work without hangups and time consuming workarounds, best plan on investing in tool that will let you get on with it. Including a Windows machine if that turns out to be necessary.

Rufus
Locked