winetricks won't open from terminal

Questions about Wine on Linux
Locked
holmesmr
Newbie
Newbie
Posts: 1
Joined: Tue Jun 12, 2012 3:45 pm

winetricks won't open from terminal

Post by holmesmr »

mike@mike-Inspiron-N4010:~$ winetricks
------------------------------------------------------
wine cmd.exe /c echo '%ProgramFiles%' returned unexpanded string '%ProgramFiles%' ... can be caused a corrupt wineprefix, an old wine, or by not owning /home/mike/.wine
------------------------------------------------------
mike@mike-Inspiron-N4010:~$


I'm new to linux so does anybody have a fix for this? I'm trying to play LoL on here but I need extra packages from winetricks, and it won't open. Please help!
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: winetricks won't open from terminal

Post by dimesio »

holmesmr wrote:mike@mike-Inspiron-N4010:~$ winetricks
------------------------------------------------------
wine cmd.exe /c echo '%ProgramFiles%' returned unexpanded string '%ProgramFiles%' ... can be caused a corrupt wineprefix, an old wine, or by not owning /home/mike/.wine
------------------------------------------------------
mike@mike-Inspiron-N4010:~$
The terminal gave you three possible reasons; figure out which one it is. Delete the wineprefix, upgrade to the latest development release if you're not already using it, and reinstall your apps as a normal user (never run Wine as root).
gutigen
Level 2
Level 2
Posts: 16
Joined: Wed Dec 14, 2011 3:51 pm

Post by gutigen »

Same error here while trying to run winetricks.
The terminal gave you three possible reasons; figure out which one it is. Delete the wineprefix, upgrade to the latest development release if you're not already using it, and reinstall your apps as a normal user (never run Wine as root).
This is not helpfull at all. I got latest wine release, fresh Ubuntu 12.04 install and deleting wineprefix doesn't help.
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Post by dimesio »

gutigen wrote: This is not helpfull at all. I got latest wine release, fresh Ubuntu 12.04 install and deleting wineprefix doesn't help.
Read the sticky at the top of the forum about Ubuntu 12.04.
gabrielmng
Newbie
Newbie
Posts: 1
Joined: Tue Jan 08, 2013 2:00 pm

Re: winetricks won't open from terminal

Post by gabrielmng »

To fully reset wine one must delete (or rename if you wanna do some backup) ~/.wine folder.
After that you can remove and re-install wine and everything will be as new.
kanutomay
Newbie
Newbie
Posts: 1
Joined: Tue Apr 23, 2013 11:01 pm

Re: winetricks won't open from terminal

Post by kanutomay »

The problem is with windows environment variables set by wine (%SystemDrive% is not set). To fix this, registry needs to be modified and variable set to "C:"

1) Verify variable settings:
$ wine cmd.exe /c echo '%ProgramFiles%
%SystemDrive%\Program Files

$ wine cmd.exe /c echo '%SystemDrive%
%SystemDrive%

2) Set missing variable:
$ wine cmd.exe /c regedit
a) Go to: [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment]
b) Set string variable: "SystemDrive"="C:"

Hope is more helpful than moderator answer
Locked