mmozeiko / pkg2zip

Decrypts PlayStation Vita pkg file and packages to zip archive
The Unlicense
406 stars 89 forks source link

Set directory path outside sys32 #3

Closed masterrite closed 6 years ago

masterrite commented 6 years ago

It'd be cool if we can set an output path - my copy of pkg2zip zipped the file into sys32 folder.

mmozeiko commented 6 years ago

I would like to keep arguments as simple as possible.

The current implementation simply writes to current folder. So as long as you are in correct folder, it will unpack into this folder.

Unpacking inside System32 can probably happen if you keep pkg2zip.exe inside it? I suggest to not keep custom binaries in Windows internal folders. That's a trouble waiting to happen. Create new folder where you keep your utilities/binaries (for example "c:\bin") and add it to PATH.

masterrite commented 6 years ago

uh... I kept and launched the program in my download folder. That's why I'm surprised it outputted in sys32

mmozeiko commented 6 years ago

Hmm. That's strange. Can you give me more details what exactly were you running? Do you have .bat file that calls pkg2zip.exe? Or are you running directly from cmd.exe window? If from cmd.exe what are exact arguments you are using (could you please post whole command line you are executing)?

masterrite commented 6 years ago

I'm running directly from cmd.exe window... ah, looking again at the command, I think I see what's wrong here:

C:\Windows\system32>"D:\Game tools\pkg2zip.exe" C:\users\username\downloads\package.pkg [zrif string]

snipaste_20171004_130458

mmozeiko commented 6 years ago

Right, you are running it from C:\Windows\System32. That's why it creates output there.

You can either do "cd c:\folder\where\you\want\to\output" before running command. Or open cmd.exe directly in folder where to unpack. To do that, keep Shift pressed, click right mouse button and select "Open command window here".

masterrite commented 6 years ago

Awesome - thanks! I've got a lot to learn yet