/build/static/layout/Breadcrumb_cap_w.png

Reinstall file on repair

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

Answers (8)

Posted by: India_Repackaging 15 years ago
Blue Belt
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
Posted by: anonymous_9363 15 years ago
Red Belt
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.
Posted by: rayz_0020 15 years ago
Senior Purple Belt
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.
Posted by: anonymous_9363 15 years ago
Red Belt
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...?
Posted by: Ram 15 years ago
Senior Purple Belt
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.
Posted by: AngelD 15 years ago
Red Belt
0
Ram,

Allthough a nice suggestion but Active Setup would trigger at each repair as it only executes once per user.
Posted by: Inabus 15 years ago
Second Degree Green Belt
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
Posted by: rayz_0020 15 years ago
Senior Purple Belt
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.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ