Menu

#1525 Getting asked for privilege rights to compress something

open
nobody
None
5
2021-07-23
2021-07-04
Tanzmusikus
No

Hello Igor,
thanks a lot for that awsome packaging tool!

I miss a little option, that ask for higher privilege rights on Windows.
P.e. I want to backup an .ini-file in C:\Program Files. If I do this I get an error message.
For me it would be better, when I get asked by 7-zip for giving that admin right.

My workaround at the moment is to open '7-zip file manager' with admin rights and navigate manually to the folder C:\Program Files. This is not comfortable.

Maybe you could add this in a future release? I would love it.
Best regards, Tm

1 Attachments

Discussion

  • Igor Pavlov

    Igor Pavlov - 2021-07-05

    I suppose that it's better to use another folder in such cases.
    "the privilege rights" is not so simple thing as it looks.

     
  • AmigoJack

    AmigoJack - 2021-07-13

    The error does not relate to compressing files - it relates to the file that you want to create inside the folder C:\Program Files\. Instead of using 7-Zip's shell context menu to create an archive without further interaction choose one of the items that end with three dots - then you have a dialog window where you can change the target file's name and path.

     
  • Tanzmusikus

    Tanzmusikus - 2021-07-13

    Hello AmigoJack!
    I can't understand how you come up with that.

    The error refers to the creation of a compressed file from an uncompressed file in the folder "C:\Program Files".

    It is not about compressing itself or the compression algorithm. That is correct. It's about 7zip not being able to create files in "folders without sufficient permissions" via the context menu.
    I don't want to save that in a different folder.

    Using "add to archive..." from the context menu results in the same error.
    This is not the first time I have had this problem, it has been going on for many years.

    It only works if I start "7zFM.exe" with administrator rights and navigate to the appropriate folder. I find this unnecessarily complicated unless there are important reasons for it.

    WinRAR can do this wonderfully though. I wish 7zip would not have to be inferior to this in anything.

    Best regards

    P.S.
    I'm using Windows 10.

     

    Last edit: Tanzmusikus 2021-07-13
  • AmigoJack

    AmigoJack - 2021-07-13

    In those "Optionen" dialog, go to the next tab ("Ordner") and select as "Arbeitsverzeichnis" the option "TEMP-Ordner des Systems". And make sure the checkbox "Nur bei Wechselmedien benutzen" is not ticked.

    Now try again if this at least shifts your problem. How WinRAR is able to gain more permissions without your interaction (is that what you imply?) is beyond my understanding. The whole idea of folders like \Program Files\ is to not allow everything (like creating files) - reconsider your workflow or give us more details, i.e. if the folder is always the same then just change its permissions for your user account instead of relying on every program to recognize/deal with missing access permissions.

     
  • Tanzmusikus

    Tanzmusikus - 2021-07-13

    Thanks for the tip, but it doesn't work. Same error.

    You misunderstand what I wrote: "For me it would be better, when I get asked by 7-zip for giving that admin right." - I wrote "when I get asked by 7-zip for giving that admin right." - So I could decide to give 7zip the admin rights through the user account control (UAC) or not. But if I'm not asked, then I can't give 7zip the right to write in the programs folder.

    7zip should not do anything that could compromise the security of my (or anyone else's) system.
    But it would be nice to ask me (the user), if I want to give it the admin rights for that single operation.

    If the user does not have the admin rights, please do not give them "without his intervention".
    That would be fatal for everyone.

    I don't want to change any permissions in the folder C:\Program Files. I just copied the tool "DesktopOK_x64.exe" to that folder and use it portable with the "DesktopOK.ini" in same folder. That's one of the possibilities of DesktopOK.

    The way to navigate to the folder C:\ -> Users\ -> <username>\ -> AppData\ -> Roaming\ -> DesktopOK with the mouse is not as fast as I could navigate to C:\ -> Program Files.

    So that's the only reason why I like to have this.
    If it's not possible ... or a security risk, then okay - let's forget it. It is not essential for survival. ;-)
    If it's possible - great!

     

    Last edit: Tanzmusikus 2021-07-13
  • AmigoJack

    AmigoJack - 2021-07-14

    I understand what you want, but I think your approaches are inappropriate, which then lead to expectations and requests that other approaches would never encounter:

    1. Clicking every folder per mouse to go to somewhere of course is not as fast as to directly enter %APPDATA%\DesktopOK\ into the path box right away. And creating a shortcut to that folder will also be a much faster alternative if you prefer working with the mouse.
    2. Do not force "portable" software into C:\Program files\ or C:\Program files (x86)\ because that just clashes with concepts and ideas of those. Instead just create your own folder, i.e. C:\Programs\ which by default will get more permissions and where you can happily place all the software you want - especially portable or old one. Bonus: it's a folder/path that comes without spaces. Alternatively tell me why you think that software must reside in one of those folders that came with the operating system.
    3. You have to admit that the UAC message is far away from what is about to happen - it nowhere mentions the file creation permission but just wants administrator permissions in general - a sane mind would not allow this and think "no, WinRAR does not need to change my device - it should not even change existing files". For you this is convenient - for me this undermines security and drills you into not asking for further details. While 7-Zip displays you an error message on point with all the details.

    But I admit that 7-Zip could be "intelligent" enough to display one more button in the message box like "continue as administrator" or "choose different location", at least in case of ERROR_ACCESS_DENIED.

     
  • Tanzmusikus

    Tanzmusikus - 2021-07-23

    But I admit that 7-Zip could be "intelligent" enough to display one more button in the message box like "continue as administrator" or "choose different location", at least in case of ERROR_ACCESS_DENIED.

    Yes, that's what I mean. DesktopOK is only an example for that. In other situations it could be smart, too.

    If you start 7zFM.exe with admin rights, you could do all the things too (except system right things).
    In linux in certain situations you would also asked for root rights or informed to use "su(do)".

     

    Last edit: Tanzmusikus 2021-07-23

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.