works as expected on XP-Home, SP 3 :-)
But possibly the dialog can be made more idiot-proof?! The missing icons for not-associated types will *undoubted* arise questions here…
Oh, and just for the record: associations made by an admin cannot be changed by a normal user. But that should be known ;-)
Best regards!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is a very good design with much flexibility, although the user needs to make some exploration to discover some of the features. I have tried it under Windows 7 32-bit, and I have these comments:
1. If the user tries to change an "All Users" association, then 7-Zip should request elevation. At present, any changes made are simply lost when the dialog closes, unless 7-Zip had been launched "As Administrator".
2. Some icons are not shown for file-types which are associated to other apps. Examples I have seen are:
a. .zip associated to CompressedFolder
b. .dmg associated to MacDrive.DMG.8
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Igor, sorry for the delay in this. I wanted to test it as soon as you posted (since I have complained about thi several times, it's only fair that I try to help in fixing it), but I have been extremely busy. I had some time today, but only to test in 32 bits. Perhaps tomorrow I can test in 64 bits. Here is the details of my test:
Platform: Windows 7 32bit, US English. Fresh install, no software installed of any type (including no previous version of 7zip). Windows has UAC enabled (as it is on any fresh Windows install).
I created a user account without administrative privileges, although what home people will use is an administrator account that still requires UAC elevation for administrative tasks such as associating extensions with 7zip.
- There was no problem at all associating extensions for the current user. It alll worked.
- There was a problem associating extensions for all users. The behavior is the same as before: If the user did not start 7zip with "Run as Administrator", then the file associations do not take effect.
This behavior was the same with an administrative user as well. Both types of accounts require "Run as administrator" if the global file associations are to be saved.
I think what people expect on Vista or Windows 7 is a UAC prompt like other applications give you asking you "Yes/No" to authorize the global settings change. Once you click "Yes" then the setting take effect.
The traditional way to accomplish this is in the following way: Elevation is done only at processes start time (actually, right before the process is started). That means that a running application cannot "elevate itself" to perform a task that required elevation. What has to happen is that the application starts another process (another EXE file), which has the "Run As Administrator" requirement flag set on its manifest. This subordinate EXE will _always_ prompt for "Yes/No" at startup. This subordinate application runs without a user interface (usually), and it's sole task is to make the systemwide changes that the owner/parent cannot make.
In this way, you can have both things: People can start 7zFM like they always have, without elevation, and when they want to change the global file associations, you shell out to the surrogate EXE, which will start out with a UAC elevation prompt. If the user allows the application to run, then the surrogate does its job and exits. The user is happy then because it all worked teh way other application work. :-)
I hope this makes sense, I am incredibly short on time, but I wanted to let you know how it can be made to work.
Thanks for working on the fix to this! It's probably the #1 7zip issue.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Forgot to say something you can figure out anyway, but I say it: The surrogate is run with certain command-line arguments that tell it the executable the details of the file association changes to make. If you would like to prevent people from running this EXE without it being started by 7zFM, then you can put some sort of encryption/obfuscation on the parameters. There are other ways to solve this as well… Just wanted to be fairly complete in my answer :-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I know about these things.
But I still try to work without additional exe file.
Administrators after first fail probably will guess that they need "run as Admin". I will show "Access denied" error message in next version.
But usual users has no admin rights so they don't need any UAC prompts.
So I want to check that version, and if there will be big number of complaints, I'll think about additional admin exe file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
One additional option is to run the same EXE (7zFM.EXE) with elevation required (and special command-line parameters), rather than a third specialized EXE. This means that 7zFM starts another (elevated) copy of 7zFM to do the pending task. The difference is that 7zFM will not have a manifest stating that run as admin is required, and the elevation requirement will be specified in the way the process is spawned.
The key seems tyo be a call to ShellExecuteEx() with the SHELLEXECUTEINFO.lpVerb = "runas" parameter set.
From my point of view the association tab is absolutely unclear now.
Добавлю по-русски для простоты. Я так и не смог догадаться, чем отличается 7zip от 7zip в скобочках, что конкретно делают плюсы наверху диалога, и как переключаются настройки по каждома конкретному расширению - то ли кликом, то ли дабл кликом - получалось то так, то этак.
Или это так и задумано, как отладочный вариант?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Options will not retain choices made in any of the tabs.
For example… Several file format are selected on the 'Options\System' tab, Apply is clicked, and 7-Zip is closed. Upon reopening, the Options\System tab is again blank. I have chosen NOT to integrate 7-Zip to shell, and NOT to cascaded context menu.
1. Does "integrate 7-Zip to shell context menu" have to be selected in order for selected file formats to be retained?
2. Can the 'Working folder' be located in a place other than 7-Zip program folder?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
7-Zip 9.20.02 - test version:
http://dl.7-zip.org/7z920.02.7z
Please test new feature in:
7-Zip File Manager / Tools / Options.
Now 7-Zip allows to associate 7-Zip for "Current user" or for "All Users".
I hope it can fix problems when user has no administrator's rights.
Please write comments here.
And include information about version of Windows on your computer.
Hello everyone,
works as expected on XP-Home, SP 3 :-)
But possibly the dialog can be made more idiot-proof?! The missing icons for not-associated types will *undoubted* arise questions here…
Oh, and just for the record: associations made by an admin cannot be changed by a normal user. But that should be known ;-)
Best regards!
This is a very good design with much flexibility, although the user needs to make some exploration to discover some of the features. I have tried it under Windows 7 32-bit, and I have these comments:
1. If the user tries to change an "All Users" association, then 7-Zip should request elevation. At present, any changes made are simply lost when the dialog closes, unless 7-Zip had been launched "As Administrator".
2. Some icons are not shown for file-types which are associated to other apps. Examples I have seen are:
a. .zip associated to CompressedFolder
b. .dmg associated to MacDrive.DMG.8
Thanks!
Igor, sorry for the delay in this. I wanted to test it as soon as you posted (since I have complained about thi several times, it's only fair that I try to help in fixing it), but I have been extremely busy. I had some time today, but only to test in 32 bits. Perhaps tomorrow I can test in 64 bits. Here is the details of my test:
Platform: Windows 7 32bit, US English. Fresh install, no software installed of any type (including no previous version of 7zip). Windows has UAC enabled (as it is on any fresh Windows install).
I created a user account without administrative privileges, although what home people will use is an administrator account that still requires UAC elevation for administrative tasks such as associating extensions with 7zip.
- There was no problem at all associating extensions for the current user. It alll worked.
- There was a problem associating extensions for all users. The behavior is the same as before: If the user did not start 7zip with "Run as Administrator", then the file associations do not take effect.
This behavior was the same with an administrative user as well. Both types of accounts require "Run as administrator" if the global file associations are to be saved.
I think what people expect on Vista or Windows 7 is a UAC prompt like other applications give you asking you "Yes/No" to authorize the global settings change. Once you click "Yes" then the setting take effect.
The traditional way to accomplish this is in the following way: Elevation is done only at processes start time (actually, right before the process is started). That means that a running application cannot "elevate itself" to perform a task that required elevation. What has to happen is that the application starts another process (another EXE file), which has the "Run As Administrator" requirement flag set on its manifest. This subordinate EXE will _always_ prompt for "Yes/No" at startup. This subordinate application runs without a user interface (usually), and it's sole task is to make the systemwide changes that the owner/parent cannot make.
In this way, you can have both things: People can start 7zFM like they always have, without elevation, and when they want to change the global file associations, you shell out to the surrogate EXE, which will start out with a UAC elevation prompt. If the user allows the application to run, then the surrogate does its job and exits. The user is happy then because it all worked teh way other application work. :-)
I hope this makes sense, I am incredibly short on time, but I wanted to let you know how it can be made to work.
Thanks for working on the fix to this! It's probably the #1 7zip issue.
Forgot to say something you can figure out anyway, but I say it: The surrogate is run with certain command-line arguments that tell it the executable the details of the file association changes to make. If you would like to prevent people from running this EXE without it being started by 7zFM, then you can put some sort of encryption/obfuscation on the parameters. There are other ways to solve this as well… Just wanted to be fairly complete in my answer :-)
I know about these things.
But I still try to work without additional exe file.
Administrators after first fail probably will guess that they need "run as Admin". I will show "Access denied" error message in next version.
But usual users has no admin rights so they don't need any UAC prompts.
So I want to check that version, and if there will be big number of complaints, I'll think about additional admin exe file.
One additional option is to run the same EXE (7zFM.EXE) with elevation required (and special command-line parameters), rather than a third specialized EXE. This means that 7zFM starts another (elevated) copy of 7zFM to do the pending task. The difference is that 7zFM will not have a manifest stating that run as admin is required, and the elevation requirement will be specified in the way the process is spawned.
The key seems tyo be a call to ShellExecuteEx() with the SHELLEXECUTEINFO.lpVerb = "runas" parameter set.
For an example see here: http://www.codeproject.com/KB/vista-security/VistaElevator.aspx
If this works,there will be no an addional EXE.
From my point of view the association tab is absolutely unclear now.
Добавлю по-русски для простоты. Я так и не смог догадаться, чем отличается 7zip от 7zip в скобочках, что конкретно делают плюсы наверху диалога, и как переключаются настройки по каждома конкретному расширению - то ли кликом, то ли дабл кликом - получалось то так, то этак.
Или это так и задумано, как отладочный вариант?
Platform: Vista 32bit, US English.
Options will not retain choices made in any of the tabs.
For example… Several file format are selected on the 'Options\System' tab, Apply is clicked, and 7-Zip is closed. Upon reopening, the Options\System tab is again blank. I have chosen NOT to integrate 7-Zip to shell, and NOT to cascaded context menu.
1. Does "integrate 7-Zip to shell context menu" have to be selected in order for selected file formats to be retained?
2. Can the 'Working folder' be located in a place other than 7-Zip program folder?