You are not logged in.

#1 2014-06-29 15:47:32

CubeGod
Member
Registered: 2013-07-09
Posts: 120

WINE err:"wine cmd.exe /c echo '%ProgramFiles%' returned empty string"

So as the tittle states WINE is throiwng this error:

wine cmd.exe /c echo '%ProgramFiles%' returned empty string

As for what might have caused it? probably the last system update which was performed a few days ago, my old prefix works fine but I have a habit of creating new prefixes for troublesome applications, or applications I am unsure of whether they will cause trouble or not.
Hence I created a new prefix using:

export WINEARCH=win32
export WINEPREFIX=~/.problematic
winecfg

As for how wine is run, it's run as a normal, unprivileged, user.

Oh and I also tried generating yet another prefix like this:

$ WINEARCH=win32 WINEPREFIX=~/.problematic-new winetricks steam
Executing w_do_call steam
------------------------------------------------------
wine cmd.exe /c echo '%ProgramFiles%' returned empty string
------------------------------------------------------

Didn't work either.

I'm at loss, any suggestion on how to fix it?

Last edited by CubeGod (2014-06-29 15:48:05)

Offline

#2 2014-06-29 15:57:59

stevenhoneyman
Member
From: England
Registered: 2014-05-25
Posts: 241

Re: WINE err:"wine cmd.exe /c echo '%ProgramFiles%' returned empty string"

Just when using winetricks?

What happens for

$ WINEARCH=win32 WINEPREFIX=~/testprefix notepad.exe

Offline

#3 2014-06-29 23:10:39

CubeGod
Member
Registered: 2013-07-09
Posts: 120

Re: WINE err:"wine cmd.exe /c echo '%ProgramFiles%' returned empty string"

$ WINEARCH=win32 WINEPREFIX=~/testprefix notepad.exe
bash: notepad.exe: command not found

So obviously I need to correct the command wink

$ WINEARCH=win32 WINEPREFIX=~/testprefix wine notepad.exe
wine: created the configuration directory '/home/shiina/testprefix'
err:module:load_builtin_dll failed to load .so lib for builtin L"winemp3.acm": libmpg123.so.0: cannot open shared object file: No such file or directory
fixme:ntdll:NtLockFile I/O completion on lock not implemented yet
err:mscoree:LoadLibraryShim error reading registry key for installroot
err:mscoree:LoadLibraryShim error reading registry key for installroot
err:mscoree:LoadLibraryShim error reading registry key for installroot
err:mscoree:LoadLibraryShim error reading registry key for installroot
fixme:ntdll:NtLockFile I/O completion on lock not implemented yet
fixme:iphlpapi:NotifyAddrChange (Handle 0xece880, overlapped 0xece88c): stub
wine: configuration in '/home/shiina/testprefix' has been updated.
Wine cannot find the ncurses library (libncursesw.so.5).

why is ncurses a dependency anyway? besides, wicd-curses works so this shouldn't be the case.

Anyway, trying winetricks in the same prefix

$ WINEARCH=win32 WINEPREFIX=~/testprefix winetricks steam
Executing w_do_call steam
------------------------------------------------------
wine cmd.exe /c echo '%ProgramFiles%' returned empty string
------------------------------------------------------

Anyway, I expected notepad to work since it resides in %WINDOWS% not %ProgramFiles%
Is there any registry key I can set for this? all my google searching says this can cause with a mismatch of wine versions but why would that happen?
Either way checking wine --version outputs wine-1.7.20 which is the same as it was pre-update (when it still worked).

Offline

#4 2014-06-30 00:23:10

stevenhoneyman
Member
From: England
Registered: 2014-05-25
Posts: 241

Re: WINE err:"wine cmd.exe /c echo '%ProgramFiles%' returned empty string"

Yeah, missed "wine" out - oops.

wicd-curses x86_64? wine needs lib32-ncurses

It's winetricks that has the problem, not wine. I bet if you manually run

wine cmd.exe /c echo '%ProgramFiles%'

then it comes back with "C:\Program Files"

Offline

#5 2014-06-30 10:08:58

CubeGod
Member
Registered: 2013-07-09
Posts: 120

Re: WINE err:"wine cmd.exe /c echo '%ProgramFiles%' returned empty string"

indeed but I need .NET, msvc runtime and a few other microsoft libraries for proper functionality (skyrim is one thing I'll put in this prefix, it requires vcrun and .NET for some reason)
Besides, isn't winetricks made by the wine developers?

Either way a way to fix this would be lovely.

Offline

#6 2014-06-30 10:19:31

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,961

Re: WINE err:"wine cmd.exe /c echo '%ProgramFiles%' returned empty string"

for .NET support, you could try wine-mono from [community] repo.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#7 2014-06-30 15:23:46

CubeGod
Member
Registered: 2013-07-09
Posts: 120

Re: WINE err:"wine cmd.exe /c echo '%ProgramFiles%' returned empty string"

Lone_Wolf wrote:

for .NET support, you could try wine-mono from [community] repo.


Tried and it wouldn't even launch, it required .NET 3.5 SP1, afaik mono only covers up to 2.0 (and it isn't even 100% compatible to that), as for manually insatlling 3.5 SP1 it says I need to use add/remove windows components, not sure how to do this with wine since winetricks always did that for me (curse my laziness, however this might not even be directly doable by itself)

I also tried having steam handle that installing, it just ended up with an infinite loop of crashing installers (the program setup.exe has encountered a problem...) which was only rectified by killing the wineserver and then killing every process spawned manually (or in other words unless you're careful you can inadvertently make wine into an inefficient forkbomb (based on it only spawning new processes every 5 or so seconds making it more or less manageable)

I also tried in a 64-bit prefix, in this case winetricks gets further but says it's a 64-bit prefix and then the .NET installer err's out because it can't install in a 64-bit environment for some arcane reason.

Offline

#8 2014-09-13 20:58:45

MaTachi
Member
Registered: 2011-06-07
Posts: 52

Re: WINE err:"wine cmd.exe /c echo '%ProgramFiles%' returned empty string"

I encountered the same error. Following the instructions in https://code.google.com/p/winetricks/is … ?id=189#c8 solved it for me:

# let's star on a clean table
$ rm -r ~/.local/share/wineprefixes/steam ~/.wine 
$ WINEARCH=win32 winecfg
[Press OK]
$ WINEARCH=win32 winetricks steam

And I had the following two environment variables set in my .zshrc (.bashrc if bash is your default shell) file:

export WINEPREFIX=$HOME/.wine/
export WINEARCH=win32

Offline

#9 2014-09-13 21:06:17

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: WINE err:"wine cmd.exe /c echo '%ProgramFiles%' returned empty string"

export WINEPREFIX=$HOME/.wine/

 That seems redundant and the slash at the end is not needed. It would be more efficient to export or better yet alias certain prefixes like this:

alias win7='env ALSA_DEFAULT_PCM=wine WINEARCH=win32 WINEDEBUG=-all WINEDLLOVERRIDES='\''amstream=n;devenum=n;quartz=n'\'' WINEPREFIX=$HOME/.PlayOnLinux/wineprefix/Windows7'

Last edited by emeres (2014-09-13 21:06:57)

Offline

#10 2015-06-14 16:20:57

oconnor663
Member
Registered: 2012-12-16
Posts: 46

Re: WINE err:"wine cmd.exe /c echo '%ProgramFiles%' returned empty string"

MaTachi's answer solved this for me. I had been deleting `~/.wine` but not `~/.local/share/wineprefixes`. Thanks!

Offline

#11 2015-07-16 14:13:10

CubeGod
Member
Registered: 2013-07-09
Posts: 120

Re: WINE err:"wine cmd.exe /c echo '%ProgramFiles%' returned empty string"

was there really a need to necro this thread for that? If the answer worked then great, don't raise the dead just to let everyone know; it's redundant at best.

Offline

Board footer

Powered by FluxBB