I am doing an upgrade to a package. Simple upgrade with the upgrade table. I need to back up a file from the older application and restore after new one is installed. I can do this with CA vbscript. However my question is when the deployment is done with SCCM or any other tools to a system account how do i handle it then? Do i somehow get it done with active setup and wait for a reboot?

Thanks for the help.

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

0

Major or Minor Upgrade?

Answered 01/28/2013 by: jaybee96
Red Belt

  • I think major. However i am not sure what is the difference from the upgrade table?
  • If you do a Major , you need to know that there will be either a complete uninstall of previous ( or specified feature uninstall) or first an install and then a removal of what's left. The last option is suitable for you, but needs specific components rules in order to work efficient. Suitable because here you can add the CA for backup file action or move file action ( standard action)
  • you do not need to place the action outside the installation... just be sure you place the CA after installfiles.
  • I am using vendor msi and it does a full uninstall. So yes, it is major. I am thinking of CA that will copy a file to a temp location "need to run before uninstall" and copy to a new location after new version is installed "run at the very end"
    I am sorry but i do not see logic in your answer.
Please log in to comment
0

If you do it through ActiveSetup, it will try to copy the files when each user's first login after installation..

Just write two custom actions using VBScript

1. BackUpFiles - Backup the files in Temp folder and the custom action should be placed in between InstallValidate and InstallInitialize standard actions
at the same time it should not be after "RemoveExistingProducts" standard action in ExecuteImmidiate

2. RestoreFiles - Restore the files to your app's folder and the custom action should be placed after "RemoveExistingProducts" and "InstallFinalize" standard actions in ExecuteImmidiate

In the same custom action, delete the files from Temp folder..

This should work..

Answered 01/28/2013 by: jagadeish
Red Belt

  • jagadeish thanks for taking your time. I understand all that, however my question was. If the install is done under a system account "SMS for example" How do i find that file in a user context? What if there is more then one user "which i dint think is the case"
Please log in to comment
0

Do we assume, from your last question, that the file in question resides somewhere in the logged-in user's profile?

Answered 01/29/2013 by: VBScab
Red Belt

  • Correct. Sorry if that wasn't clear.
Please log in to comment
Answer this question or Comment on this question for clarity