MBrink
Posts: 5
Joined: Fri Sep 29, 2017 11:31 am

Problem with temp folder

Tue Nov 14, 2017 3:58 pm

Hello,

I have a problem with the temp folder.
temp files are extracted to
MSI (c) (60:24) [15:22:36:416]: PROPERTY CHANGE: Adding TARGETDIR property. Its value is 'C:\'.
MSI (c) (60:24) [15:22:36:416]: PROPERTY CHANGE: Adding Scripts_1_Dir property. Its value is 'C:\Users\ADMINI~1\AppData\Local\Temp\2\Scripts\'.

Actie gestart 15:22:36: AI_ExtractTempFiles.
MSI (c) (60:A4) [15:22:36:556]: Invoking remote custom action. DLL: C:\Users\ADMINI~1\AppData\Local\Temp\2\MSI679C.tmp, Entrypoint: ExtractTempFiles

But after the CostFinalize the Scripts_1_Dir property changes to just \Temp\Scripts

Actie gestart 15:23:29: CostFinalize.
MSI (s) (34:74) [15:23:29:057]: PROPERTY CHANGE: Adding OutOfDiskSpace property. Its value is '0'.
MSI (s) (34:74) [15:23:29:057]: PROPERTY CHANGE: Adding OutOfNoRbDiskSpace property. Its value is '0'.
MSI (s) (34:74) [15:23:29:057]: PROPERTY CHANGE: Adding PrimaryVolumeSpaceAvailable property. Its value is '0'.
MSI (s) (34:74) [15:23:29:057]: PROPERTY CHANGE: Adding PrimaryVolumeSpaceRequired property. Its value is '0'.
MSI (s) (34:74) [15:23:29:057]: PROPERTY CHANGE: Adding PrimaryVolumeSpaceRemaining property. Its value is '0'.
MSI (s) (34:74) [15:23:29:057]: Note: 1: 2262 2: Condition 3: -2147287038
MSI (s) (34:74) [15:23:29:057]: PROPERTY CHANGE: Adding Scripts_1_Dir property. Its value is 'C:\Users\ADMINI~1\AppData\Local\Temp\Scripts\'.

Due to this a custom action which is run during the actual installation can't locate files that were extracted to the Scripts_1_Dir folder.

Any ideas what's happening here ?

Thanks in advance.

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Problem with temp folder

Wed Nov 15, 2017 4:43 pm

Hello Marcel,

This may happen if on the related machine the following policy is NOT enabled:

"Do not use temporary folders per session"

For Windows Server 2012 the full path of this policy option in the Group Policy Management Console is like so:

Code: Select all

Local Computer Policy\Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Temporary folders
Check more details on the "Build failing due to Temporary folder in Remote Desktop." thread debating a similar issue.

Can you please send us the AIP (project file) to support at advancedinstaller dot com so we can fully investigate its settings and see what possible workaround solutions you could use, other than enabling the above system policy?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

MBrink
Posts: 5
Joined: Fri Sep 29, 2017 11:31 am

Re: Problem with temp folder

Thu Nov 16, 2017 10:24 am

Since there isn't an easy way to resolve this issue, it would be possible to use a powershell script to detect if that policy is enabled.
The problem with this however is that the entire "Group Policy Management" feature could be missing on the target machine.
So i went through the available Windows features adding a Windows Features bundle for Windows Server 2012 R2 within the Prerequisites in order te install the "Group Policy Management" feature, but sadly it's nowhere to be found.

Are there any other workarounds for this issue ?

Thanks in advance.

MBrink
Posts: 5
Joined: Fri Sep 29, 2017 11:31 am

Re: Problem with temp folder

Thu Nov 16, 2017 10:36 am

On top of that, if the server isn't in a domain or isn't a domain controller itself, the workaround doesn't work.
The GPMC (Group Policy Manager Console) requires a user to be logged on with a domain user account in order to manage Group Policies.

The strange thing is that we didn't have this issue with older versions of Advanced installer.
Our customer tried to install an older version of our software, which was (obviously) build with an older version of Advanced Installer without any problems.

MBrink
Posts: 5
Joined: Fri Sep 29, 2017 11:31 am

Re: Problem with temp folder

Thu Nov 16, 2017 10:59 am

I think i found another possible solution, which would prevent having the use the temp folder at all.
Adding temp files through the Advanced Installer GUI automatically puts them in the "Windows Volume/Temporary" folder.
After they are added I'm able to move them to another folder ("Common Application Data/[ProductName]/temp" for example), where they stay marked as "Temporary File".

I ran the setup on the target machine (Windows Server 2012 R2) with full logging.

MSI (c) (30:3C) [10:47:41:673]: Doing action: AI_ExtractTempFiles
Actie 10:47:41: AI_ExtractTempFiles.
Actie gestart 10:47:41: AI_ExtractTempFiles.
MSI (c) (30:BC) [10:47:41:673]: Invoking remote custom action. DLL: C:\Users\ADMINI~1\AppData\Local\Temp\2\MSIC7A6.tmp, Entrypoint: ExtractTempFiles
MSI (c) (30!28) [10:47:42:673]: PROPERTY CHANGE: Adding AI_UPDATE3260.SQL_1 property. Its value is 'C:\ProgramData\Coach Application Services\temp\Update3260.sql'.
Actie gestopt 10:47:42: AI_ExtractTempFiles. Return value 1.

After cancelling the setup, the temp file and containing folder(s) that are empty are completely removed.

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Problem with temp folder

Fri Nov 17, 2017 3:48 pm

Hello Marcel,

Thank you for your follow up on this. I can confirm you than moving the temporary files under a different location than our default per user one should work as the way you already described.

Another solution will be to access the temporary files through their associated properties or through their associated temporary file references. More exactly, instead of building the path to them like this:

Code: Select all

[TempFolder]TempFile.ext
you should either use a reference to the temp file property:

Code: Select all

[AI_TEMPFILE.EXT]
or you should simply use the temp file reference like this:

Code: Select all

[&TempFile.ext]
Just right click on the project field where you need to add a temp file reference and choose the "Property..." or "File..." context menu option to add a property or temp file reference.

You can find the property associated of a temporary file in "Files and Folders" page. Just double click on temp file in "Files and Folders" page and check its "Properties" dialog.

Hope this helped too.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”