Opened 8 years ago

Closed 4 years ago

#3757 closed defect (fixed)

Tor 'Expert Bundle' for Windows does not install files into default directory

Reported by: rransom Owned by: erinn
Priority: High Milestone:
Component: Applications/Tor bundles/installation Version:
Severity: Keywords:
Cc: Shondoit Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

The Tor 'Expert Bundle' for Windows defaulted to installing Tor into "C:\Program Files (x86)\Tor" on my 64-bit Windows 7 computer, but it neither created that directory nor installed tor.exe (or the other files in the bundle) anywhere. (It did install geoip and torrc into "C:\Users\rransom\AppData\Roaming\Tor", and create a Start Menu folder for my user account.)

Child Tickets

Change History (11)

comment:1 Changed 8 years ago by rransom

When I ran the Expert Bundle installer again, Windows did not show a UAC prompt. This looks like only a permissions problem.

comment:2 Changed 8 years ago by Shondoit

Cc: shondoit@… added

comment:3 Changed 8 years ago by cypherpunks

When you run installer as admin (Run as Administrator) it works fine. Installer should trigger UAC but some reason it doesn't. And it doesn't even throw out an error even though the install was clearly unsuccessful (it wrote NOTHING to %ProgramFiles% or anywhere else). Happens with tor-0.2.3.8-alpha-win32.exe at least.

comment:4 Changed 8 years ago by Shondoit

The reason it does not show a UAC dialog is because the installer is considered a legacy application. It has not been marked as being UAC compliant and therefore is run in backwards compatibility mode.
This also explains why there is nothing installed in %ProgramFiles%, yet it did not return an error.

Basically, Vista/Win7 runs the application under user context, but a user cannot write in %ProgramFiles%. As to not break the application, Vista/Win7 uses folder/registry virtualization and redirects write calls to the user's profile.
Scenario 2: http://support.microsoft.com/kb/927387

To tell Vista/Win7 the installer can only run elevated, one must embed a .manifest into the installer.
To embed a .manifest into an executable, you use mt.exe (available in the Windows SDK).
Some more info:
http://msdn.microsoft.com/en-us/library/bb756929.aspx

And basically all the information you'll ever need about UAC:
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=3859

Caveat: when using 'requireAdministrator' the installer might install geoip and torrc to the administrator's profile.
Best practice is to not install user data, but create on first run. (Or you can install default user data to %ProgramFiles% and copy on first run, no problem)

comment:5 in reply to:  4 Changed 8 years ago by Sebastian

Replying to Shondoit:

Caveat: when using 'requireAdministrator' the installer might install geoip and torrc to the administrator's profile.
Best practice is to not install user data, but create on first run. (Or you can install default user data to %ProgramFiles% and copy on first run, no problem)

Looks like we should go with the copy approach (tho this needs a Vidalia patch...) Also, we'd need some logic to copy the new version when a new Tor gets installed.

comment:6 Changed 8 years ago by swain

If you are using NSIS just doing "RequestExecutionLevel admin" does the trick.

Please update the installer since it's annoying and time consuming for the Tor audience to find and solve the issue.

comment:7 Changed 7 years ago by rransom

It would be easier (and probably better) to replace the Expert Bundle installer with a zip file. Experts should know what to do with the zip file, and the installer only gets in the way of any expert setup.

comment:8 in reply to:  7 Changed 7 years ago by rransom

Replying to rransom:

It would be easier (and probably better) to replace the Expert Bundle installer with a zip file. Experts should know what to do with the zip file, and the installer only gets in the way of any expert setup.

Moved to #5567.

comment:9 Changed 7 years ago by Shondoit

Cc: Shondoit added; shondoit@… removed
Status: newneeds_review

I'm not sure how the Expert bundles are created, but assuming tor-mingw.nsi.in is what's used, then this should fix it.

Branch bug3757 in my repo.

comment:10 Changed 7 years ago by erinn

I made a test package with Shondoit's patch (as well as his patch for #4347) and put it here:

https://archive.torproject.org/tor-package-archive/technology-preview/tor-0.2.2.36-win32-test.exe

09b8adb621c5ebb6df8e04bf2371b005cd9787893df6e193763d67f73bac3821 tor-0.2.2.36-win32-test.exe

comment:11 Changed 4 years ago by cypherpunks

Resolution: fixed
Status: needs_reviewclosed

Expert bundle shipped currently as zip file, no installer and problem exists anymore.
Closing as auto-magically fixed.

Note: See TracTickets for help on using tickets.