Hi All,
I have an application wherein a file is getting installed on installation and this is overwritten/modified on launching the application. On repair I need to replace this file with the initial clean file that comes by first installation. Since this file is already available it is not gettin replaced. Can someone help me in achieving this - Replace a file even if it is available and is of same version, during repair.
NB: i want only this file to be replaced even on its existence [the rest all has to follow the default rules - reinstall only if existing file is old or not available].
Thanks in advance.
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Hi,

I think looking closely at the REINSTALLMODE property will solve your problem. You can set it in your package as per your requirements.

Cheers
Answered 09/15/2008 by: India_Repackaging
Blue Belt

Please log in to comment
0
Not really, since changing that property would result in all files and registry settings being reinstalled (or not). The OP wants one file to be replaced, irrespective of version etc.

My first thought would be to do this via a scripted Custom Action, conditioned to run only on re-install. Before that, though, I'd be finding out why the application is modifying the file.
Answered 09/15/2008 by: VBScab
Red Belt

Please log in to comment
0
Thanks for the replies guys.. Ian, i have used a scripted CA to delete the file(InstallInitialize) during repair. Hope this is wat u meant by My first thought would be to do this via a scripted Custom Action, conditioned to run only on re-install.
Please let me know if u have meant something else.
Thanks again.
Answered 09/15/2008 by: rayz_0020
Senior Purple Belt

Please log in to comment
0
Exactly so, although I'm not sure what your reference to 'InstallInitialize' is about. I presume you mean that you have the CA sequenced after that...?
Answered 09/16/2008 by: VBScab
Red Belt

Please log in to comment
0
Hi rayz,

I got a different method you could try it.
Copying preference file on per user basis
Step 1
Create a .reg file (name : activesetup.reg”)
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\{123u1231231-12313-123-123}
@="name of the app"
"StubPath"=cmd.exe /c "C:\\Program Files\\folder name\\Active Setup\\activesetup.cmd" "Version"="1,0"


Note: the guid can be any thing unique.

Step 2

Create an .cmd (ex: activesetup.cmd) that actually copies the pref files to the desired location.
xcopy.exe "%PROGRAMFILES%\path to the folder " "%USERPROFILE%\Application Data\name of the folder" /e /v /c /i /h /r /k /y /t

Step 3
In the install.cmd : add the following
regedit.exe /s activesetup.reg

COPY ".prefered file" "%PROGRAMFILES%\location\ActiveSetup\" /Y
COPY "ActiveSetup.cmd" "%PROGRAMFILES%\location\ActiveSetup\" /Y

: Here the Activesetup is a folder that must be created if you wish to place the reg file in that folder.
Thanks,
Ram.
Answered 09/16/2008 by: Ram
Senior Purple Belt

Please log in to comment
0
Ram,

Allthough a nice suggestion but Active Setup would trigger at each repair as it only executes once per user.
Answered 09/16/2008 by: AngelD
Red Belt

Please log in to comment
0
1) Install the original file into a "backup" folder in the installation folder.
2) Create custom vbscript to copy that file to correct location and overrite the file there.
3) Set custom action to only run on repair.

Voila
Answered 09/16/2008 by: Inabus
Second Degree Green Belt

Please log in to comment
0
Yes Ian u r right..
Exactly so, although I'm not sure what your reference to 'InstallInitialize' is about. I presume you mean that you have the CA sequenced after that...?

i placed it after InstallInitialize and the app works fine.

Ram, i need the file replacement on every repair (Active Setup - runs only once at the first login). So i am afraid i cannot use it. Thanks for the reply though.
Answered 09/16/2008 by: rayz_0020
Senior Purple Belt

Please log in to comment
Answer this question or Comment on this question for clarity