CodeWalrus

Development => PC, Mac & Vintage Computers => Topic started by: Luxen on May 11, 2016, 11:23:52 PM

Title: Issues with .zip file extraction
Post by: Luxen on May 11, 2016, 11:23:52 PM
I was working on a tool for a game I've been (overly) engrossed in recently, and ran into an issue.

The software I was developing failed to unzip a .zip file; the utility used to unzip the files is from an external source, so I don't have control over it, merely I tell it what to unzip and where to unzip stuff over the command line.

Im able to get the software to work on my computer, but it didn't work on others. My guess is that security on my computer is lowered a tad, allowing the utility to unzip files to otherwise protected areas (namely C:\Program files\Vendetta\ ); is anyone familiar enough with windows to confirm? is there any good way to get around this, so the software works (even if I have to use a different method for extracting files)?

Here is a link to the program itself, though it wont run properly without the game installed:
https://www.vendetta-online.com/x/msgboard/16/31392
Title: Re: Issues with admin priviledge detection
Post by: Luxen on May 17, 2016, 11:31:34 PM
alright, so I found a number of bugs and fixed them, and now there is only one issue remaining with the utility (that I have found); If the user doesn't run the application as administrator, then it cannot extract to the required location (much the same issue as before).

Bugs fixed include allowing the tool to grab plugins from a location with spaces in its name (example: C:\T n l\.....), and some small glitches with program detection.

the application now tests if it has admin priviledges, but it cant do anything about it other than display an error message and how to fix it; I'd rather it attempt to fix the problem itself. is there a way to run a program from the command line WITH admin priviledges?
Title: Re: Issues with .zip file extraction
Post by: alexgt on May 18, 2016, 02:44:20 AM
I am glad you kinda got it solved but I am sadly no help to you really. Could it be that yo need admin rights to operate certain commands on the cmd
Title: Re: Issues with .zip file extraction
Post by: Luxen on May 18, 2016, 10:34:02 PM
you need admin rights to have write access to C:\Program files\<insert blah here>, for obvious security reasons.
Title: Re: Issues with .zip file extraction
Post by: SiphonicSugar on May 18, 2016, 11:26:31 PM
Yeah, I'm guessing that when you run cmd on other people's computers, you are not running elevated cmd.