How to set Windows PATH Environment Variable?

Questions about Wine on Linux
Locked
lesserspottedpotoroo
Newbie
Newbie
Posts: 2
Joined: Fri Jul 26, 2013 11:57 pm

How to set Windows PATH Environment Variable?

Post by lesserspottedpotoroo »

Hi, first question (please treat the n00b gently) :oops:

If I try to run an application that isn't in the windows\system32 directory, wine can't find it.

Example:

Code: Select all

lsp@jmacT400sCB:~$ wine 1Password
wine: cannot find L"C:\\windows\\system32\\1Password.exe"
lsp@jmacT400sCB:~$ 
My Linux distro is crunchbang Waldorf (Debian 3.2.46-1 x86_64 GNU/Linux)

I have set the Windows Path variable via wine regedit as described here: http://www.winehq.org/docs/wineusr-guid ... -variables

My entry is in HKEY_CURRENT_USER>Environment and is as follows:
Name: Path
Type: REG_SZ
Data: c:\\windows;c:\\windows\\system32;c:\\Program Files

I have tried various regedit Names (Path, PATH, path) and tried double-quoting the words 'Program Files' and escaping the space between the words 'Program' and 'Files'. All give the same result.

The unix path to the executable is /home/lsp/.wine/drive_c/Program\ Files/1Password/1Password.exe

I am able to run 1Password perfectly via crunchbang's bundled file manager by simply browsing to its folder and double-clicking on the .exe

I have searched these forums and Google but to no avail, so if the collected minds here could help please, I'd be most grateful.

Cheers.
User avatar
dimesio
Moderator
Moderator
Posts: 13215
Joined: Tue Mar 25, 2008 10:30 pm

Re: How to set Windows PATH Environment Variable?

Post by dimesio »

lesserspottedpotoroo
Newbie
Newbie
Posts: 2
Joined: Fri Jul 26, 2013 11:57 pm

Re: How to set Windows PATH Environment Variable?

Post by lesserspottedpotoroo »

Yes, that page has some good pointers on using the full path to the executable when running from the command line. I have been using the wine start /Unix "<full Unix path>" syntax to work around the question of where best to set PATH.

That page did lead me to http://wiki.winehq.org/UsefulRegistryKeys and, interestingly, the settings listed there suggest the place to set the PATH is under:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

Other pages on setting Windows environment variables via the Registry (usually programatically) also imply that this is the correct place to set PATH.

I might experiment by editing that entry and report back tomorrow (bedtime now in Melbourne, Australia).
Locked