MSI Creation Error - Could not copy x

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 4 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
rmcgre
Posts: 9
Last visit: Fri Aug 11, 2023 8:27 am

MSI Creation Error - Could not copy x

Post by rmcgre »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: PowerShell Studio 2020 5.7.172
32 or 64 bit version of product: x64
Operating system: Windows 10 1909
32 or 64 bit OS: 64

*** Please add details and screenshots as needed below. ***

Hello,

Attempting to build a MSI but I am receiving an error stating that it could not copy a folder. I confirmed that all NTFS permissions are correct so I don't think it is an access issue. The output didn't really provide too much info and I didn't see anything in Event Viewer to help give me a lead. Does PS Studio store logs anywhere in relation to the MSI creation?

Below is the output. Screenshots are attached.

Code: Select all

SAPIEN Package and Deploy Tool 4.1 (c) 2005 - 2020 SAPIEN Technologies, Inc.

Retrieving product version from C:\install\EUCMRT\EUC\MachineRemovalTool\bin\EUC-MachineRemovalTool.exe: 3.0.1.0
Error: Could not copy C:\install\EUCMRT\EUC\MachineRemovalTool\bin
MSI build aborted
Attachments
ps3.jpg
ps3.jpg (34.92 KiB) Viewed 2647 times
ps2.jpg
ps2.jpg (46.69 KiB) Viewed 2647 times
ps1.jpg
ps1.jpg (53.2 KiB) Viewed 2647 times
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: MSI Creation Error - Could not copy x

Post by Alexander Riedel »

You have a reference to the folder ...\MachineRemovalTool\bin as a folder,
but you have already included the EUC-MachineRemovalTool.exe from that folder before.
That would create a duplicate entry for that exe, hence the WiX Toolset says it cannot do that.

Remove the reference to the bin folder and add the files within individually
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
rmcgre
Posts: 9
Last visit: Fri Aug 11, 2023 8:27 am

Re: MSI Creation Error - Could not copy x

Post by rmcgre »

Appreciate the info. I did that so the individual files are listed. However, it is now giving me the same error for the DLL folder.
User avatar
rmcgre
Posts: 9
Last visit: Fri Aug 11, 2023 8:27 am

Re: MSI Creation Error - Could not copy x

Post by rmcgre »

Sorry. Meant to include a new screenshot. I did some cleanup and rearranging of the folders so the folder tree will be different from the screenshot in the original post. However, I believe it should still work based on the information you gave me.
Attachments
ps5.jpg
ps5.jpg (41.92 KiB) Viewed 2634 times
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: MSI Creation Error - Could not copy x

Post by Alexander Riedel »

It should. Are you sure nothing is running and locking files in that folder?
Kind of weird it balks on the dll folder but not on the temp folder (assuming that's not empty)
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
rmcgre
Posts: 9
Last visit: Fri Aug 11, 2023 8:27 am

Re: MSI Creation Error - Could not copy x

Post by rmcgre »

Temp folder just contains a simple text file that's used in a foreach loop.

As far as the DLL folder, there shouldn't be any locked files unless PS Studio is locking it itself from when I was testing the script/GUI. They're all DLL files used to load various functions and cmdlets for AD and SCCM. I will make sure to just open the psbuild file and try again without running anything beforehand and let you know the results.

I appreciate the continued assistance!
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: MSI Creation Error - Could not copy x

Post by Alexander Riedel »

Take all files out of the dll folder. Put them in one by one and build the MSI each time.
That way we know if it is ONE file that's the problem or just ANY file.
I tried here with a good mix of dlls, exes, and assorted other things with no problem. Of course, wouldn't be fun otherwise, would it?
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
rmcgre
Posts: 9
Last visit: Fri Aug 11, 2023 8:27 am

Re: MSI Creation Error - Could not copy x

Post by rmcgre »

I actually took out all of the files for the first round and received the same error. Just to make sure it wasn't our anti-virus locking something down, I made sure to disable that as well. :)

I also tried rebooting and making that the first thing I did. Same results.

Something else I tried was rearranging the folders in the Files and Folders list. The files directly don't produce an error but the first folder in the list, whether it's the DLL or Temp folder, produce the error.

Tried running a procmon capture as well to see if anything was interfering but that didn't produce anything useful.

The only other info I can think of to provide is that this didn't happen for me back when I was on version 5.6.167 of PowerShell Studio for whatever that's worth.
Last edited by rmcgre on Mon Feb 10, 2020 12:40 pm, edited 1 time in total.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: MSI Creation Error - Could not copy x

Post by Alexander Riedel »

I'll dig into this tomorrow and see what I can find out. Please stand by.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: MSI Creation Error - Could not copy x

Post by Alexander Riedel »

Replace psbuild.exe in your installation with the one in the attached zip file.
Try to build you installer and let us know.
Attachments
PSBuild.zip
(198.07 KiB) Downloaded 98 times
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 4 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.