Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

GetSpecialFolder behaviour in silent


2 replies to this topic

mohansundar123#

mohansundar123#
  • Full Members
  • 8 posts

Posted 11 January 2010 - 06:21

Hi,
I have created a BASIS MSI pjt.
*I am making the installer to create a log file under temp path by specifying the in setup.ini file as,
commandline=/l * %temp%@log1@.log
*Log file with name log1.log is created under Temp path.
*At the end of installation i have to copy this log file from temp path to some other path.
*To make this happen i used TEMPFOLDER property to get the temp path.

ISSUE1: TEMPFOLDER property does not recognise session folders in windows server 2008
SOLUTION: I used GetSpecialFolder() in vbscript to get Session folder

ISSUE2: GetSpecialFolder() does not recognise the session folder in execute sequence.So it takes wrong path in silent installation
GetSpecialFolder returns in UI sequence -> C:\Users\MOHANV~1\AppData\Local\Temp\1

GetSpecialFolder returns in Execute sequence ->
C:\Users\MOHANV~1\AppData\Local\Temp

Why does the GetSpecialFolder behaves like this?
Is it the default behaviour of GetSpecialFolder not to recpgnise session folder in execute sequence.?

I dint find any information about its behaviour in Help file.

Please help me ASAp

regards,
Mohan S

smc0862

smc0862
  • Full Members
  • 54 posts

Posted 01 February 2010 - 16:34

Mohan,

Can't you use the MSI built-in properties for these folders? The AppDataFolder property should give you the Application Data folder for the currently user. You can then build you path from there.

But what are you actually trying to do? It looks like you are creating a log file in the user's TEMP folder. And then you want to copy it to user's AppData folder under a 'Temp' folder?

Is this correct?

-Shawn

Edited by smc0862, 01 February 2010 - 16:44.


Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 10 February 2010 - 13:17

The problem is that the silent part of the install is not executed by the program you started. It is executed by the Windows Installer service. That service is running under a different account (usually the SYSTEM account, but it can be configured different) - the idea is that the actual installation is running with elevated rights.

Every account has a different temp folder, for obvious security reasons. If an account has multiple sessions, each of those sessions get different temp folders too.