From 28b2834126d0b4871eb6a643e98e5fd956533637 Mon Sep 17 00:00:00 2001 From: joostverburg Date: Fri, 15 Nov 2002 13:34:59 +0000 Subject: [PATCH] temp file, new html file git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1721 212acab6-be3b-0410-9dea-997c60f758d6 --- Examples/viewhtml.nsi | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Examples/viewhtml.nsi b/Examples/viewhtml.nsi index 9bea08ec..4c3d520e 100644 --- a/Examples/viewhtml.nsi +++ b/Examples/viewhtml.nsi @@ -14,27 +14,23 @@ SilentInstall silent ; The file to write OutFile "viewhtml.exe" -; The installation directory (the user never gets to change this) -InstallDir "$TEMP\ViewHTML" - ; The stuff to install Section "" ; Set output path to the installation directory. - SetOutPath $INSTDIR + GetTempFileName $R0 ; Extract file - File "..\makensis.htm" + File /oname=$R0 "..\Docs\Chapter1.html" ; View file - ExecWait '"$PROGRAMFILES\Internet Explorer\iexplore.exe" "$INSTDIR\makensis.htm"' + ExecWait '"$PROGRAMFILES\Internet Explorer\iexplore.exe" "$R0"' ; Delete the files - Delete $INSTDIR\Makensis.htm - RMDir $INSTDIR + Delete $R0 SectionEnd ; Note: another way of doing this would be to use ExecShell, but then you ; really couldn't get away with deleting the files. Here is the ExecShell ; line that you would want to use: ; -; ExecShell "open" '"$INSTDIR\makensis.htm"' +; ExecShell "open" '"$R0"' ; ; The advantage of this way is that it would use the default browser to ; open the HTML.