Archive: Vpatch / NSIS question


Vpatch / NSIS question
is it possible to include 2 .pat files(one updating, one reverting) so that when the end user clicks the exe, it locates the correct folder/file and determines which version of the file is already installed and install the other version? and does the end user need to have it saved to/run from the same folder as the file that is being updated? hope i made sense thx


To can put both pathes in one .pat file. VPatch automatically checks the file CRC and selects the right patch.

It doesn't have to be in the same folder, just use the full path in your script.


so if i have VerA.pat and VerB.pat how do i put them into 1 pat?

also when verA is installed can it run this

Function .onInit
;Displays a splash screen
SetOutPath $TEMP
File /oname=spltmp.bmp "C:\new\A.bmp"
File /oname=spltmp.wav "C:\new\A.wav"
splash::show 3000 $TEMP\spltmp
Delete $TEMP\spltmp.bmp
; Delete $TEMP\spltmp.wav
FunctionEnd

and when verB is installed have it run the same thing, only with B.bmp & B.wav instead?

i am totally new to this, thank u.


Check the Readme. Run GenPat twice.


I Did read it.
the thing i'm trying to make is like an on/off switch for a small mod for a game. so all the user has to to is run my patch to turn on the mod and run it again to turn it off, and be able to do so as much as they like.


You should include both patches in the same .pat file and VPatch will select the appropriate patch according to the file patched. If it's the original file it will patch it, if it's the patched file it will "unpatch" it.