conditional - How do I create a "just for me" install for an admin user? -


when run install script admin user, puts start menu entries in "all users" profile. want start menu entries placed in current user's profile if admin user , choose install "just me".

i can selecting 1 of 2 values #define, can't figure out how create constant conditionally included. have [code] section routine returns true if "just me" install has been chosen. here's scenario:

#define startmenulocation = "{somegroup}"     ; check justformeinstall #define startmenulocation = "{anothergroup}"  ; check allusersinstall ...  [icons] name: "{#startmenulocation}\{#myappname}" ; filename: "{app}\{#exename}" ; parameters: "{#commandargs}" ; comment: "starts {#myappname} {#myappversion}" ...  [code]  function justmeinstall  : boolean ; begin result := (installationtype = itjustme) ; end ;  function allusersinstall: boolean ; begin result := (installationtype = itallusers) ; end ; 

where "check" parameters #defines not supported , of course ignored.

so 2 questions really:

  • what constants use define start menu folder location. - innosetup provides {group}, folder created under users profile unless user installing application not have administrative privileges, in case created in user's profile. want constant current user start menu folder works when user logged in admin user.

  • how implement conditional #defines shown above (of general interest outside problem anyway).

you set privilegesrequired directive lowest means inno install current user regardless of whether it's run admin or not. (this means can't install system locations.

note can not set @ run time need create 2 setups if want allow both types.

if want change location of icons, can conditionally use {userprograms}\{groupname} or {commonprograms}\{groupname}


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -