prevent %TEMP% replacement

Got a problem you cannot solve? Try here.
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: prevent %TEMP% replacement

Postby FrancescoT » Mon Sep 02, 2013 10:04 am

Dear Jeroen,

... please excuse me, but seems that I forgot to test your package.

Let me see.
Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: prevent %TEMP% replacement

Postby FrancescoT » Tue Sep 03, 2013 3:06 am

Dear Jeroen,

I have just tested your project ... but it doen't contain any %TEMP% definition with the uninstall shortcut.

Anyway, I have added two additional shortcuts to your original project as follow;

1# ShortCut1 - uses %TEMP%.
2# ShortCut2 - uses a custom variable ENV_SYSTEM_TMP that holds the value of the "TMP" System Environment variable from; "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment".

These are my results!
shortcuts.png
shortcuts.png (27.48 KiB) Viewed 6242 times


You find attached a copy of your edited project.

Regards
Attachments
InputTest.zip
(1.79 MiB) Downloaded 389 times
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

oti
Posts: 11
Joined: Tue Jun 11, 2013 2:30 am
Contact:

Re: prevent %TEMP% replacement

Postby oti » Wed Sep 04, 2013 1:30 am

Dear Francesco,

You're correct when you enter %TEMP% into the "shortcut to File" in IA (see IA_shortcut_1.png), but when you put the same value in the "Startup In Folder" the value gets replaced (see shortcut1.png).

Best regards,

Jeroen
Attachments
shortcut1.png
shortcut1.png (13.48 KiB) Viewed 6233 times
IA_Shortcut_1.png
IA_Shortcut_1.png (16.09 KiB) Viewed 6233 times

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: prevent %TEMP% replacement

Postby FrancescoT » Wed Sep 04, 2013 7:57 am

Dear Jerome,

... at this point I am not sure to follow you anymore.

Undisputed that putting the same value in the "Startup In Folder" this gets replaced ... if I am not wrong, your target is to have this pointing to the SYSTEM TMP variable, why don't you use "%SystemRoot%\TEMP" instead?

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

oti
Posts: 11
Joined: Tue Jun 11, 2013 2:30 am
Contact:

Re: prevent %TEMP% replacement

Postby oti » Thu Sep 05, 2013 12:28 am

My target is to prevent %TEMP% being replaced in the "Start in Folder" section.

Using %SystemRoot%\TEMP is not an option for us.

Jeroen

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: prevent %TEMP% replacement

Postby FrancescoT » Thu Sep 05, 2013 8:25 am

Dear Jeroen,

Unfortunately, the MSI engine replaces that value and using the MSI engine, it is not possible to change this behavior ( ...just tested).

However, if you use the InstallAware Native Engine this seems to not occur ( ...just tested even in this case).

Hope this helps you.

Regards.
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

oti
Posts: 11
Joined: Tue Jun 11, 2013 2:30 am
Contact:

Re: prevent %TEMP% replacement

Postby oti » Mon Sep 09, 2013 2:01 am

So there is no way to prevent the replacement as described in: http://msdn.microsoft.com/en-us/library ... 85%29.aspx ?

if not, is there an option to do a post file modify (modify the shortcut), or does this mess up the uninstall?

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: prevent %TEMP% replacement

Postby FrancescoT » Mon Sep 09, 2013 8:32 am

Dear Jeroen,

So there is no way to prevent the replacement as described in: http://msdn.microsoft.com/en-us/library ... 85%29.aspx ?

As I told you previously, it seems not possible via Windows Installer Engine.

if not, is there an option to do a post file modify (modify the shortcut), or does this mess up the uninstall?

You should use the Shell Links API ... I never tried, but I believe that it is possible to modify an existing shortcut using those API.
http://msdn.microsoft.com/en-us/library/aa969393.aspx

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: Google [Bot], JohnGaver and 69 guests