This project is read-only.

Does using the DotNetZip ( require admin privileges?

Apr 10, 2013 at 7:26 PM

First of all, please let me express my gratitude toward the development team for DotNetZip library. It is a great tool for creating ZIP archives in VB .NET 2008.

I'm running into a small problem, and would like to see if any one has experienced anything similar. Basically, everything works great in Windows XP. However, for Vista, 7 and 8, where UAC (User Account Control) is enabled, this is where I am not able to create the zip archive. I have an error saying that one of the files that I am trying to add to the archive cannot be accessed. The file resides in the Windows non-protected area of C:\ProgramData, so I assume that this would not be a problem.

Has anyone seen this before? And do you know that in order to use DotNetZip library, that the user running the app would have to be a local admin user or belonging to the local admin group of the PC?

Your help is greatly appreciated. Thank you and have a nice day.

Khoi Nguyen.
Apr 12, 2013 at 1:06 AM

What type of file are you trying to add to the .zip file?

I have successfully used DotNetZip in several projects which are run by limited (non admin) users and have never experienced any problems when creating or extracting zip files.

Can you give more information on your use-case scenario please ?

Kind Regards
Apr 12, 2013 at 3:07 PM

Here is the process I'm trying to do. I have a VB 2008 application, which connects to a SQL Server 2005 Express DB. This VB app has a feature that allows the user to backup the database. Database back up is nothing more than detaching the DB files, then make a copy of the DB files (.mdf, and .ldf), add the DB files to an archive (using DotNetZip), and lastly, re-attach the DB files again to the existing SQL Server instance.

What I have discovered is that even though the DB files (before attaching to SQL Server 2005 Express) has "Everyone" - "Full Control" in the ACL. After detaching it from SQL Server 2005 Express) the "Everyone" - "Full Control" has been removed from the ACL, thus, causing the ZIP process to crash, if I run the app as a Standard User in Windows 7 (with UAC enabled). I have discovered a way to make this work, which is after detaching the DB files, I would manually update the files' ACL to include "Everyone" - "Full Control"; then ZIP works just fine under Standard User in Windows.

Sorry for the long description. Hope it's not too confusing.

Thanks for the help.