cckec / winetricks

Automatically exported from code.google.com/p/winetricks
0 stars 0 forks source link

'%ProgramFiles%' returned empty string #163

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I am receiving this error message when I try to install Visual Basic 6 runtimes

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

I am using Wine 1.3.35 on a MacProBook 2 Ghz Intel Core i7 running OSX 10.7.2 
(Lion)
WINETRICKS_VERSION=20111115

Original issue reported on code.google.com by DadsAn...@gmail.com on 14 Jan 2012 at 6:59

GoogleCodeExporter commented 8 years ago
Please run with winetricks -v.

Try running that command in terminal on its own. Likely wine isn't in your 
$PATH.

Original comment by austinenglish@gmail.com on 19 Jan 2012 at 7:52

GoogleCodeExporter commented 8 years ago
I entered winetricks -v into terminal and it spit out this:

+ return 0
+ shift
+ winetricks_handle_option
+ case "$1" in
+ return 1
+ winetricks_init
+ WINETRICKS_WORKDIR=/tmp/w.Stephen.453
+ test '' = 1
+ rm -rf /tmp/w.Stephen.453
+ WINETRICKS_METADATA=/tmp/w.Stephen.453/metadata
+ WINETRICKS_CATEGORIES='apps benchmarks dlls fonts games settings'
+ for _W_cat in '$WINETRICKS_CATEGORIES'
+ mkdir -p /tmp/w.Stephen.453/metadata/apps
+ for _W_cat in '$WINETRICKS_CATEGORIES'
+ mkdir -p /tmp/w.Stephen.453/metadata/benchmarks
+ for _W_cat in '$WINETRICKS_CATEGORIES'
+ mkdir -p /tmp/w.Stephen.453/metadata/dlls
+ for _W_cat in '$WINETRICKS_CATEGORIES'
+ mkdir -p /tmp/w.Stephen.453/metadata/fonts
+ for _W_cat in '$WINETRICKS_CATEGORIES'
+ mkdir -p /tmp/w.Stephen.453/metadata/games
+ for _W_cat in '$WINETRICKS_CATEGORIES'
+ mkdir -p /tmp/w.Stephen.453/metadata/settings
+ WINETRICKS_CURMENU=prefix
+ trap winetricks_kill_handler EXIT HUP INT QUIT ABRT
+ WINETRICKS_OPT_KEEPISOS=0
+ WINETRICKS_OPT_DD=dd
+ WINETRICKS_OPT_SHAREDPREFIX=0
++ which sha1sum
+ '[' -x '' ']'
++ which openssl
+ '[' -x /opt/local/bin/openssl ']'
+ WINETRICKS_SHA1SUM='openssl dgst -sha1'
+ case `date +%S` in
++ date +%S
+ WINETRICKS_SOURCEFORGE=http://downloads.sourceforge.net
+ test ''
+ USERNAME=Stephen
+ test -d /Users/Stephen/Library/Caches
+ XDG_CACHE_HOME=/Users/Stephen/Library/Caches
+ test ''
+ W_CACHE=/Users/Stephen/Library/Caches/winetricks
+ WINETRICKS_POST=/Users/Stephen/.local/share/winetricks/postinstall
+ test -d /Users/Stephen/Library/Caches/winetricks
+ WINETRICKS_AUTH=/Users/Stephen/.local/share/winetricks/auth
+ case "$OS" in
+ WINE=wine
+ test ''
+ WINETRICKS_ORIGINAL_WINEPREFIX=/Users/Stephen/.wine
+ winetricks_set_wineprefix
+ test ''
+ WINEPREFIX=/Users/Stephen/.wine
+ export WINEPREFIX
++ dirname /Users/Stephen/.wine
+ mkdir -p /Users/Stephen
++ w_expand_env ProgramFiles
++ winetricks_early_wine cmd.exe /c echo %ProgramFiles%
++ WINEDEBUG=-all
++ wine cmd.exe /c echo %ProgramFiles%
++ sed 's/.*1h.=//'
++ tr -d '\r'
++ grep -v 'Module not found'
++ true
+ W_PROGRAMS_WIN=
+ case "$W_PROGRAMS_WIN" in
+ w_die 'wine cmd.exe /c echo '\''%ProgramFiles%'\'' returned empty string'
+ w_warn 'wine cmd.exe /c echo '\''%ProgramFiles%'\'' returned empty string'
+ echo ------------------------------------------------------
------------------------------------------------------
+ echo 'wine cmd.exe /c echo '\''%ProgramFiles%'\'' returned empty string'
wine cmd.exe /c echo '%ProgramFiles%' returned empty string
+ echo ------------------------------------------------------
------------------------------------------------------
+ test
+ case $WINETRICKS_GUI in
+ unset _W_timeout
+ exit 1
+ winetricks_kill_handler
+ test -f /tmp/w.Stephen.453/dd-pid
+ winetricks_cleanup
+ test ''
+ test '' = 1
+ rm -rf /tmp/w.Stephen.453
+ exit
Stephens-MacBook-Pro:~ Stephen$ 

Original comment by DadsAn...@gmail.com on 20 Jan 2012 at 2:27

GoogleCodeExporter commented 8 years ago
Please try that again, this time using a freshly downloaded 
   http://winetricks.googlecode.com/svn/trunk/src/winetricks
and attaching the output rather than pasting it.  For instance, do:
   curl -o xyzzy http://winetricks.googlecode.com/svn/trunk/src/winetricks
   sh xyzzy -v vb6run > log.txt 2>&1
then attach log.txt.  That will give us a little more info.

Then try it with a clean .wine directory and see if that helps.

Original comment by daniel.r...@gmail.com on 20 Jan 2012 at 4:01

GoogleCodeExporter commented 8 years ago
Starting with a clean .wine directory did the trick. Winetricks is now 
functioning just fine. Thanks for the help. 

Original comment by DadsAn...@gmail.com on 20 Jan 2012 at 5:54

GoogleCodeExporter commented 8 years ago
My guess is that creating a wineprefix with a mismatching wine is what causes 
this.  I would like to add better detection into winetricks for this.

Maybe we need to add a note like
  Sometimes this is caused by a mismatch between wine and the wineprefix.  Please try a clean wineprefix (e.g. mv $WINEPREFIX $WINEPREFIX.bak), that may solve the problem.

Original comment by daniel.r...@gmail.com on 20 Jan 2012 at 3:01

GoogleCodeExporter commented 8 years ago
I have the same problem in Ubuntu 12.04.

It simply fails to execute line 3181:

    W_PROGRAMS_WIN="`w_expand_env ProgramFiles`"

I had both wine1.2 and 1.4 installed. Removing 1.2 made it work.

Original comment by kenneth....@gmail.com on 24 Jun 2012 at 3:57

GoogleCodeExporter commented 8 years ago
That seems unlikely, since in Ubuntu 12.04, installing wine1.2 actually
just installs wine1.4.  (Or at least that's what it did just now for me.)

Original comment by daniel.r...@gmail.com on 24 Jun 2012 at 4:38

GoogleCodeExporter commented 8 years ago
Could be related to this: 
https://code.google.com/p/winetricks/issues/detail?id=189

Original comment by YokoZar on 30 Aug 2012 at 9:36

GoogleCodeExporter commented 8 years ago
Is anyone still seeing this with recent wine / winetricks?

Original comment by austinenglish@gmail.com on 29 Jun 2013 at 12:27

GoogleCodeExporter commented 8 years ago
I can't confirm that.

WINETRICKS_VERSION=20130624

$ wine cmd.exe /c echo '%ProgramFiles%'
C:\Program Files

Original comment by litimetal on 29 Jun 2013 at 12:37

GoogleCodeExporter commented 8 years ago
This, issue 90, and issue 189 may all be related.

Original comment by daniel.r...@gmail.com on 29 Jun 2013 at 12:44

GoogleCodeExporter commented 8 years ago
I suspect there may be more...but yeah. I'm slowly going through all open bugs.

Original comment by austinenglish@gmail.com on 29 Jun 2013 at 12:48

GoogleCodeExporter commented 8 years ago
Saw it again today.  Tried installing nfsworld on a 64 bit system.
This failed when it tried to install .net, so I tried setting WINEARCH
and rerunning:

------------------------------------------------------
Note: command 'wine dotnetfx.exe /q /c:install.exe /q' returned status 26.  
Aborting.
------------------------------------------------------

dank@i7:~/winetricks/src$ rm -rf $WINEPREFIX
dank@i7:~/winetricks/src$ export WINEARCH=win32
dank@i7:~/winetricks/src$ sh winetricks -q nfsworld
------------------------------------------------------
wine cmd.exe /c echo '%ProgramFiles%' returned empty string
------------------------------------------------------

Original comment by daniel.r...@gmail.com on 7 Jul 2013 at 7:43

GoogleCodeExporter commented 8 years ago
Check for zombie wine processes next time..

Original comment by austinenglish@gmail.com on 30 Jul 2013 at 5:55

GoogleCodeExporter commented 8 years ago
I'm getting this error.

machine:~ me$ WINEPREFIX=steam winetricks vcrun6
------------------------------------------------------
wine cmd.exe /c echo '%ProgramFiles%' returned empty string
------------------------------------------------------
machine:~ me$ winetricks --version
20130707
machine:~ me$ wine --version
wine-1.7.12

That wine prefix was indeed created by an earlier version of wine, 1.6.2. I 
switched from MacPorts port wine to wine-devel to try to get something working 
in another wine prefix.

Am I to understand that I'd be expected to reinstall steam (and all the games 
installed within it) whenever wine had been updated and I wanted to run 
winetricks on that prefix again for whatever reason?

Original comment by wearenot...@gmail.com on 13 Feb 2014 at 10:04

GoogleCodeExporter commented 8 years ago
Oh, FYI, I don't see any zombie wine processes.

machine:~ me$ ps -e | grep wine
12789 ??         0:00.39 /usr/bin/open http://wiki.winehq.org/Mono

Original comment by wearenot...@gmail.com on 13 Feb 2014 at 10:10

GoogleCodeExporter commented 8 years ago
$WINEPREFIX must be an absolute path.

Original comment by austinenglish@gmail.com on 13 Feb 2014 at 7:10

GoogleCodeExporter commented 8 years ago
> $WINEPREFIX must be an absolute path.
Yes, but according to the winetricks help:
Usage: /usr/bin/winetricks [options] [command|verb|path-to-verb] ...
Executes given verbs.  Each verb installs an application or changes a setting.
...
Commands:
...
prefix=foobar         select 
WINEPREFIX=/home/richard/.local/share/wineprefixes/foobar

So shouldn't:
winetricks prefix=WinXP-32bit ie8 
check in '/home/richard/.local/share/wineprefixes/WinXP-32bit'

instead of '/home/richard/.wine' ? (which it does)

Original comment by richard....@gmail.com on 11 May 2014 at 2:37

GoogleCodeExporter commented 8 years ago
It's hard to say.  It's valid-ish for winetricks to reference $WINEPREFIX at 
startup.

r1182 added a better error message in this case, can you try winetricks from svn
and tell us what the new error message is?

Original comment by daniel.r...@gmail.com on 11 May 2014 at 3:15

GoogleCodeExporter commented 8 years ago
I checked with WINETRICKS_VERSION=20140415 and it is the same as before:
 $ winetricks prefix=WinXP-32bit ie8
------------------------------------------------------
wine cmd.exe /c echo '%ProgramFiles%' returned unexpanded string 
'%ProgramFiles%' ... can be caused a corrupt wineprefix, an old wine, or by not 
owning /home/richard/.wine

and my WINEPREFIX is 
WINEPREFIX=/home/richard/.local/share/wineprefixes/WinXP-32bit .

Too me it looks like winetricks doesn't respect the prefix at all.

Original comment by richard....@gmail.com on 11 May 2014 at 3:37

GoogleCodeExporter commented 8 years ago
What does  

   WINEPREFIX=/home/richard/.local/share/wineprefixes/WinXP-32bit wine cmd.exe /c echo '%ProgramFiles%'

say?

Original comment by daniel.r...@gmail.com on 11 May 2014 at 3:45

GoogleCodeExporter commented 8 years ago
C:\Program Files

Original comment by richard....@gmail.com on 11 May 2014 at 5:32

GoogleCodeExporter commented 8 years ago
soooo?

Original comment by richard....@gmail.com on 31 May 2014 at 7:26

GoogleCodeExporter commented 8 years ago
Still get that issue on ubuntu Trusty i386:
- the default installed winetricks works fine, but wants the latest from trunck
- i first purge the default oldish package installed from the archive
- then update to r1196 and apply chmod +x
- winetricks fails with that output:

 wine-1.7.19
 winetricks is /usr/bin/winetricks ; winetricks version is 20140521
+ winetricks_early_wine cmd.exe /c echo %ProgramFiles%
/usr/bin/winetricks: 2192: /usr/bin/winetricks: cannot create 
/tmp/early_wine.err.txt: Permission denied

+ cat /tmp/early_wine.err.txt
+ w_die wine cmd.exe /c echo '%ProgramFiles%' returned empty string, error 
message 'wine: /home/oem/.wine is not owned by you'

hm, these files are owned by root:root ; deleting .cache/winetricks does not 
help.

Original comment by sparb...@numericable.fr on 8 Jun 2014 at 8:55