Jump to content

[Questoin] WinRAR SFX "Presetup" help!


Dillon

Recommended Posts

OK, this is driving me nuts. I've searched on the forum and have found some posts about it, but none really cover what I want.

Here's what I need to do with the SFX:

1) Before extracting, merge a REG file into the registry

2) After extracting, run the setup file.

Part 2 works fine. Part 1 is driving me mad. Here's the code for my SFX:

;The comment below contains SFX script commands

Setup=Setup.exe /NOREBOOT
Presetup=%WINDIR%\RegEdit.exe /S Regfile.reg
TempMode
Silent=1
Overwrite=1

The REG file I want to import is on the CD, located within a few dirs - %DVD%\Software\Program\regfile.reg

The WinRAR help doesn't really assist much on this, because it doesn't describe what the current directory is in a way that makes sense to me :blink:

When I call the PreSetup command in this example, where is it looking for the Regfile? Is it: the current directory OR the temporary folder for extraction OR some random default folder OR the %WINDIR% folder (as that's where the regedit program is) ???

Finally, is there some way of telling the PreSetup command to look on the CD for the regfile? (I can specify the folder, but the actual drive letter for the DVD-ROM might be different on different machines, hence a variable would be nice)... something like this:

PreSetup=%WINDIR%\RegEdit.exe /S %CDROM%\Software\Program\Regfile.reg

This is the 2nd to last problem I have on my DVD, so any help would be greatly appreciated! Thanks in advance!! :thumbup

Link to comment
Share on other sites


Why not do this, Example:

;The comment below contains SFX script commands

Setup=PDisk\run.cmd
TempMode
Silent=1
Overwrite=1
Title=PerfectDisk

and in folder PDisk you rar, run.cmd:

@echo off
cmdow @ /hid

cd PDisk/
regedit /s Licence.reg
Setup.msi Config=1 /quiet /norestart
exit

This is an easier solution than trying to predict the working directory.

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...