Welcome to MSFN

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.


Sign in to follow this  
Followers 0
durex

SFX- Remove file after extraction?

7 posts in this topic

Without using additional scripting (batch,vbs,etc), is it possible to add an additional command in an SFX that deletes a particular file after it runs via the setup parameter?

Basically, ive got a few sfx installers that import reg settings using "Setup=regedit /s settings.reg" and I want to have that file deleted once its been imported...

possible?

t i a

0

Share this post


Link to post
Share on other sites

In "Run after extract" put : cmd /c del /f /q <path-to\settings.reg>

Not tested.. :D

0

Share this post


Link to post
Share on other sites

Thx for the cmd... I was just trying 'del' and it wasnt working... but Im still left with a problem... how can I import the reg file now that im using the Setup cmd (run file after extraction) for this delete command? I tried placing it in the presetup (run before extraction), but it doesnt seem to work...

0

Share this post


Link to post
Share on other sites

Place the reg file like next to the sfx then in run before extract:

regedit /S %Systemdrive%\Install\bla-bla.reg

0

Share this post


Link to post
Share on other sites

that is what your cleanup.cmd does

so if u use sfx and unpack to temp folder

your cleanup should do that all at the same time.

0

Share this post


Link to post
Share on other sites

Yea.. i was hoping to have it all bundled in the sfx and not have to worry about cleaning it up with other files...

thx guys

0

Share this post


Link to post
Share on other sites

well if u want to do it that way u can but

wouldn't it be easier to just have one command do it all for u?

0

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
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.