home *** CD-ROM | disk | FTP | other *** search
/ Freelog 121 / FreelogMagazineJuilletAout2014-No121.iso / GestionFichiers / VirtualVolumesView / VirtualVolumesViewPortable_1.2_Rev_2.paf.exe / App / AppInfo / Launcher / custom.nsh next >
Text File  |  2013-09-07  |  543b  |  21 lines

  1. ${SegmentFile}
  2.  
  3. ${SegmentInit}
  4.     ExpandEnvStrings $1 "%PortableApps.comDocuments%"
  5.     ${If} $1 == ""
  6.     ${OrIfNot} ${FileExists} "$1\*.*"
  7.         ${GetParent} $EXEDIR $1
  8.         ${GetParent} $1 $1
  9.         ${If} ${FileExists} "$1\Documents\*.*"
  10.             StrCpy $2 "$1\Documents"
  11.         ${Else}
  12.             ${GetRoot} $EXEDIR $1
  13.             ${If} ${FileExists} "$1\Documents\*.*"
  14.                 StrCpy $2 "$1\Documents"
  15.             ${Else}
  16.                 StrCpy $2 "$1"
  17.             ${EndIf}
  18.         ${EndIf}
  19.         System::Call 'Kernel32::SetEnvironmentVariable(t, t) i("PortableApps.comDocuments", "$2").r0'
  20.     ${EndIf}
  21. !macroend