User Access Control problem with background thread process

335
0
04-12-2013 03:57 AM
AmyRamsdell
New Contributor III
I have a custom toolbar written in C# that was migrated to ArcGIS Desktop 10x using VS 2010. The tool will only run when ArcMap is run as an Administrator. The tool does some validation checks on a file geodatabase then asks the user to save a zip file to a folder location using the Save As Dialog. If that is successful a background process is started on another thread that opens the zip and writes an xml file to the zip file. On a Win7 and UAC not disabled, somewhere after the save file dialog ArcMap crashes with the Dialog asking the user if they want to send the problem to ESRI. I can't catch the error but I believe it might either be the act of starting a background process or trying to write to the zip file in the background process. An empty zip does get saved.

If the user can use standard privileges to write the zip file (no admin writes needed) why would there be a security problem with writing to the zip from another thread. Is that thread being run as another user? system? How can I prevent ArcMap from having to be run as admin? Should I try to assign r/w for all users on the zip? Should I specifically try to set in the code to run the background process as the standard user. I saw documentation where I can set a process to run as admin but I would rather not do that because I feel it is unnecessary to be an admin to write to a zip.

This zip file is not being written to the sacred directories - ex Program Files or C: root.

Any help appreciated.

Thank you!
Amy
0 Kudos
0 Replies