Jump to content

Batch for .reg file


Nic303

Recommended Posts


No, after SFX installation.

Paste the regedit command after all the other commands in whatever batch file you are using to automate your SFX installation. It might look something liek this.

Install.cmd

someapp.exe /S /V/QN
regedit /s myreg.reg

Link to comment
Share on other sites

We cannot help because you are unwilling to provide the information required for us to do so.

Therefore as requested, Topic Closed.

Topic has been reopened, (at least for now).

Edited by Yzöwl
Topic reopened and merged with continuation topic
Link to comment
Share on other sites

I've managed to resolve my problem, (thanks to MrJinje and Sp0iLedBrAt)

Now i want to automatically delete this file after installation.

I've tried to add path in "advanced -> files to delete in destination folder" in WinRar, but the file is not deleted.

I have to modify or add something in this?

;The comment below contains SFX script commands

Setup=regedit /s test.reg

TempMode

Silent=1

Overwrite=1

Link to comment
Share on other sites

There is nothing in that comment file which contains commands for file deletion.

Could you please fully explain the file structure and locations (with names) of what you are doing.

As stated earlier you need to provide sufficient information for us to work with in order for us to help you.

Link to comment
Share on other sites

I have a SFX archive which contain one game (installed) and one .reg file (game serial)

After SFX installation in Program Files i have a game folder --> Stars (game from Abandonia)

From this folder i want automatically delete .reg file after SFX extraction.

Link to comment
Share on other sites

After installation what is the path to the registry file you want deleted. If it is "Program Files\Stars\Test.reg" here is the command.

DEL /F "C:\Program Files\Stars\Test.reg"

Otherwise, go here and adjust as needed.

Instead of calling the TEST>REG directly from your SFX, you will need to create a .cmd file and include both commands. Be sure to put the registry command before the delete command, otherwise it won't work. Then repackage your SFX with the .cmd file and you are all set.

Link to comment
Share on other sites

After installation what is the path to the registry file you want deleted.

If it is "Program Files\Stars\Test.reg" here is the command.DEL /F "C:\Program Files\Stars\Test.reg"

This is the path.

But how to add this command?

Link to comment
Share on other sites

My mistake I assumed you already knew that a batch file (.cmd extension) is just a .txt (text file) that has been renamed to install.cmd. That will not happen again. Please use notepad.exe to create your batch file. Then call "install.cmd" from the same place while creating your SFX instead of the regedit command.

If I was you I would re-read/combine the good parts from post #18 + #27 until you figure it out. Everything you need to know has already been discussed in this thread.

If you need a step by step.

1) Open Notepad

2) Paste Regedit command

3) Hit Enter

4) Paste delete reg file command

5) Save file as "Install.cmd" (use quotes or it gets named Install.cmd.txt and you will have to manually rename the file)

6) Remake your SFX including the "Install.cmd".

Link to comment
Share on other sites

1) Open Notepad

2) Paste Regedit command

3) Hit Enter

4) Paste delete reg file command

5) Save file as "Install.cmd" (use quotes or it gets named Install.cmd.txt and you will have to manually rename the file)

6) Remake your SFX including the "Install.cmd".

Adding clarification to #5. In Notepad, you need to change the "Save As Type" option for TXT File to All Files, or else you'll have a .txt extension.

Link to comment
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...