diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-10-18 18:48:31 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-10-18 18:48:31 +0000 |
commit | 1b4a79726a5a6e9bf1c7fc5ba210cd0417e80514 (patch) | |
tree | 368b62bfcbe1120c96f8928c4bd6f8cf9fb71411 | |
parent | 1aed6a9ee48698d43ce02d4a615be25b5c4dbed6 (diff) | |
download | pandoc-1b4a79726a5a6e9bf1c7fc5ba210cd0417e80514.tar.gz |
pandoc-setup.iss: Don't require admin privileges to run installer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1465 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r-- | windows/pandoc-setup.iss | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/windows/pandoc-setup.iss b/windows/pandoc-setup.iss index 18f37ebde..b9324d14a 100644 --- a/windows/pandoc-setup.iss +++ b/windows/pandoc-setup.iss @@ -12,7 +12,7 @@ AppPublisher=John MacFarlane AppPublisherURL=http://johnmacfarlane.net/pandoc/
AppSupportURL=http://johnmacfarlane.net/pandoc/
AppUpdatesURL=http://johnmacfarlane.net/pandoc/
-DefaultDirName={pf}\Pandoc
+DefaultDirName={code:DefDirRoot}\Pandoc
DefaultGroupName=Pandoc
AllowNoIcons=yes
LicenseFile=C:\Documents and Settings\John MacFarlane\My Documents\src\pandoc\COPYING.txt
@@ -20,9 +20,10 @@ OutputBaseFilename=setup Compression=lzma
SolidCompression=yes
ChangesEnvironment=yes
+PrivilegesRequired=none
[Tasks]
-Name: modifypath; Description: Add application directory to your system path
+Name: modifypath; Description: Add application directory to your path
[Code]
function ModPathDir(): TArrayOfString;
@@ -35,6 +36,19 @@ begin end;
#include "modpath.iss"
+function IsRegularUser(): Boolean;
+begin
+ Result := not (IsAdminLoggedOn or IsPowerUserLoggedOn);
+end;
+
+function DefDirRoot(Param: String): String;
+begin
+if IsRegularUser then
+ Result := ExpandConstant('{localappdata}')
+else
+ Result := ExpandConstant('{pf}')
+end;
+
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "basque"; MessagesFile: "compiler:Languages\Basque.isl"
|