Overwriting a property file post installation

Goodmorning,

New user experimenting with PSappdeploytoolkit here, i’m making a package with a pretty straightforward .msi installer. After the MSI has installed however i need to overwrite a file in it’s programfiles directory.

My question basically is, where in the files do i put the properties file and does the post installation content simply look like this then:

Copy-Item “.\files\properties.txt” -Destination “C:\Program Files\app”

Thanks in advance,

Nick

I’d recommend you use the PSADT command Copy-File

There are good examples in the function reference for it here: See: Copy-File · PSAppDeployToolkit

Your command should probably look like this (obviously replacing ‘app’ with the actual folder name):

Copy-File -Path "$($dirfiles)\properties.txt" -Destination "$($envCommonProgramFiles)\app"
2 Likes

As above - but no need for brackets around $dirFiles / etc!

2 Likes