cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
etmarx
Level 2

Is there ga temp directory variable in InstallShield

I am trying to change the location of the log file from SUPPORTDIR to SUPPORTDIR\..\.. or up two levels. InstallShield doesn't like SUPPORTDIR ^ "..\\.." so I'm trying to find another way to do this.

The easy solution would be if there was something like TEMPDIR that I can use but I cannot find anything like this.

Does anyone know a simple way to put the log file in the temp directory?

Thanks.
Labels (1)
0 Kudos
(4) Replies
Christoph
Level 8

Are you using basic msi or installscript project?
0 Kudos
Christoph
Level 8

%TEMP% contains the temp-folder location of the user who is currently logged on.
0 Kudos
Japster24
Level 6

how do you get the temporary directory using the %TEMP% though? (I'm using a Basic MSI and need the TEMP directory)
0 Kudos
Japster24
Level 6

Found my own answer again courtesy of Robert M. Dickau from this post: http://community.acresso.com/archive/index.php?t-90999.html


I think the MSI property TempFolder is resolved using GetTempPath, so you
could just call MsiGetProperty with TempFolder...

If you want to call GetTempPath directly, you'd use code similar to this:

prototype NUMBER Kernel32.GetTempPathA(NUMBER, BYREF STRING);

STRING svTemp[MAX_PATH + 1];

// ...

nReturn = GetTempPathA(MAX_PATH + 1, svTemp);
0 Kudos