Jump to content
Ketarin forum
Knightmare

Running Self Extracting EXE from Ketarin

Recommended Posts

I'm trying to add Display Driver Uninstaller to a collection of tools that I'm putting together but the file that is downloaded is a self extracting 7zip exe file. I know how to start the file automatically once it is downloaded but then it pops up with a screen asking me where I want to unpack the files. I would like for the whole process to be automated, since it is just for my recovery usb and I'm in any need for it at the moment.

Share this post


Link to post
Share on other sites

IF it was distributed with a "root folder" then you might be able to use the "-spe" feature of 7zip to ignore it. Give it a try and see if that works. Sometimes renaming the downloaded file to what would be the root folder will allow -spe to work even in situations where it otherwise fails. More about that issue here.

Share this post


Link to post
Share on other sites

Another option where root folders are using version numbers (as is the case with DDU) in the root folder is to rename the destination folder before unzipping and then rename it back to the generic version when finished. 

move "\Ketarin\Drivers\DDU" "DDU v{version}"
7z -spe ...
move "\Ketarin\Drivers\DDU v{version}" "DDU"

 

Share this post


Link to post
Share on other sites

What is -spe?

 

For some reason, the post commands aren't running automatically:

7z x "{file}" -o"{root}SyMenu\ProgramFiles\" -y
move "{root}SyMenu\ProgramFiles\DDU v{ver}" "{root}SyMenu\ProgramFiles\Display Driver Uninstaller"
del /q "{root}SyMenu\ProgramFiles\DDU*.exe"

Other than it, it's doing what I want it to do.

 

EDIT: I think the issue was that there was a Display Driver Uninstaller folder in SyMenu root folder. Issue seems to be resolved.

Share this post


Link to post
Share on other sites

"-spe" is a 7-zip switch that means "ignore root folder" or, more specifically "eliminate duplication of root folder for extract command." More about "-spe" here. Note the case MUST BE EQUIVALENT.

"post commands" only run if the download actually happened. you may need to "force download" to cause them to run.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.