Page 1 of 1

Repair/Reinstall not updating edited files

Posted: Wed Jun 10, 2020 9:49 am
by dileep.tiwari
Hi I have a project where I am running aa PowerShell script to update a property file. when I am installing it updates property file fine. now the problem is after installation I just edited, the updated property file (like changed some text and values).
Now I am going control panel and clicked on repair/ Reinstall at that time it is not updating the property file it is as what I edited last.

I added code in maintenance

Code: Select all

if variable REPAIR equals TRUE
RUN powershell
End


but it is not working. I am able to see the powershell windows appears but the functionality written in ps file is not executing properly. if you want I will share my project with you.
also I went through some posts but it didn't helped me.
viewtopic.php?t=5029

this post is describing my problem, I am facing same problem decribed in this post.

Re: Repair/Reinstall not updating edited files

Posted: Thu Jun 11, 2020 10:50 am
by FrancescoT
Honestly, I'm not sure if your problem has to do with the link you posted.

At any rate, for what concerns your case, you didn't share the most important information.
- Where is stored the ps script you are invoking?

Then:
- Are you sure that such ps script is effectively available under the expected path, when calling "Run PS" from your setup script?

Re: Repair/Reinstall not updating edited files

Posted: Fri Jun 12, 2020 5:40 am
by dileep.tiwari
FrancescoT wrote:Honestly, I'm not sure if your problem has to do with the link you posted.

At any rate, for what concerns your case, you didn't share the most important information.
- Where is stored the ps script you are invoking?

Then:
- Are you sure that such ps script is effectively available under the expected path, when calling "Run PS" from your setup script?


please find the answer of your quires-

Where is stored the ps script you are invoking?
I defined a file bag and stored powershell file to that file bag in some variable then I am using that variable to run the ps script

- Are you sure that such ps script is effectively available under the expected path, when calling "Run PS" from your setup script?
if I defined a filebag and stored PS file to a variable then it is definitely available to that path.

Re: Repair/Reinstall not updating edited files

Posted: Fri Jun 12, 2020 10:37 am
by FrancescoT
Yes I understand. However, it may be more than probable that the extracted content of the File Bag, it's then not available when you run the package in Maintenance Mode (REPAIR = TRUE).

- When do you invoke the File Bag command in your setup script?
- Are you totally sure that the File Bag command gets effectively invoked when it's TRUE the condition "REPAIR equals TRUE" (Maintenance Mode - Repair)?

Finally, in place of File Bag and if you need to have access exclusively to a single file (the PS script), SUPPORTDIR option is the best choice when dealing with single files.
https://www.installaware.com/forums/viewtopic.php?f=2&t=10676&hilit=SUPPORTDIR