Could not create temporary folder - MSI

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.
User avatar
daniel kusnir
Posts: 48
Joined: Thu May 25, 2017 8:22 am

Could not create temporary folder - MSI

Post by daniel kusnir »

hello

i recently updated PS Studio to 5.7.181. When i try to build an MSI package, i got a following error :

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

Error: Could not create temporary folder
C:\Users\Daniel\OneDrive\SAPIEN\PowerShell Studio\Files\Set Skype Status\MSI\MSI_BuildFolder

Up until now , there was no issue with the MSI, as i dont restrict any permissions to that folder.
do you know how can i resolve this issue ?

User avatar
brittneyr
Site Admin
Posts: 580
Joined: Thu Jun 01, 2017 7:20 am
Answers: 3
Been upvoted: 1 time

Re: Could not create temporary folder - MSI

Post by brittneyr »

I see you are using OneDrive. Do you have the same issues trying to build an MSI not on OneDrive?
Brittney Ryn
SAPIEN Technologies, Inc.

User avatar
brittneyr
Site Admin
Posts: 580
Joined: Thu Jun 01, 2017 7:20 am
Answers: 3
Been upvoted: 1 time

Re: Could not create temporary folder - MSI

Post by brittneyr »

Does the following folder exist:
C:\Users\Daniel\OneDrive\SAPIEN\PowerShell Studio\Files\Set Skype Status\MSI
Brittney Ryn
SAPIEN Technologies, Inc.

User avatar
daniel kusnir
Posts: 48
Joined: Thu May 25, 2017 8:22 am

Re: Could not create temporary folder - MSI

Post by daniel kusnir »

Hello Brittney

i changed my defaults and copied folder to the default Sapien folder. I can build the exe however MSI has same issue as well - when trying to build to offline folder.

also yes - C:\Users\Daniel\OneDrive\SAPIEN\PowerShell Studio\Files\Set Skype Status\MSI exists in the OneDrive. i also manually created MSI_BuildFolder, but it did not help

User avatar
Alexander Riedel
Posts: 7501
Joined: Tue May 29, 2007 4:43 pm

Re: Could not create temporary folder - MSI

Post by Alexander Riedel »

Please change the output folder to a folder that is NOT on OneDrive and see if the problem persists.
You should never have to create the "MSI_BuildFolder" manually. It is created in the build folder as a temporary folder and deleted when the build is
finished. Please make sure this temporary folder does not exist.

Please make a screenshot of the complete output and attach the .psbuild file.
(If you specify any digital signatures, please remove them before posting the file)
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
daniel kusnir
Posts: 48
Joined: Thu May 25, 2017 8:22 am

Re: Could not create temporary folder - MSI

Post by daniel kusnir »

Hello Alexander

see attached pictures. I can only build MSI when temp points to the Sapien folder > Files. Even if i create another folder inside Sapien and add there full permissions, i still get an error. i will attach psbuild in next post
Attachments
03_ok.PNG
03_ok.PNG (16.9 KiB) Viewed 629 times
02_error.PNG
02_error.PNG (20.96 KiB) Viewed 629 times
01_error.PNG
01_error.PNG (20.02 KiB) Viewed 629 times

User avatar
daniel kusnir
Posts: 48
Joined: Thu May 25, 2017 8:22 am

Re: Could not create temporary folder - MSI

Post by daniel kusnir »

Attaching psbuilds from Onedrive and from c:\Program Files\SAPIEN Technologies, Inc\PowerShell Studio 2020\Files\Set Skype Status\
Attachments
Set Skype Status.psf.psbuild
Sapien Folder PSbuild
(5.03 KiB) Downloaded 10 times
Set Skype Status.psf.psbuild
OneDrive PSbuild
(5.26 KiB) Downloaded 14 times

User avatar
Alexander Riedel
Posts: 7501
Joined: Tue May 29, 2007 4:43 pm

Re: Could not create temporary folder - MSI

Post by Alexander Riedel »

Ever since Windows Vista "C:\Program Files" and any folder below are protected folders. You cannot just simply write and create folders there as you please anymore.
That is a security feature that prevents malicious software from modifying/injecting code in installed applications. You may have noticed the security prompt when you created the 'Temp' folder there.
So the behavior you are seeing when specifying a folder there is absolutely normal. You should never, ever use an application install folder for that type of thing.
Use a folder like C:\Users\<you>\Documents\SAPIEN\PowerShell Studio\Scripts for example.
That is a user modifiable folder without requiring elevated privileges and is not mapped by OneDrive.
Alexander Riedel
SAPIEN Technologies, Inc.