Announcement

Collapse
No announcement yet.

Folder Defaults AppFolder with current date

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Folder Defaults AppFolder with current date

    Hello,

    I need to manipulate the default folder AppFolder to %ProgramFilesFolder%\%ProductName%_yyyymmdd

    with yyyymmdd is the current date.

    I tried it with a custom variable but I'm not able to set it to the current date with "system.getdate(date_fmt_year) + system.getdate(date_fmt_month)+ system.getdate(date_fmt_day)".
    It seem that the variable is not "solved", so i get the string "system.getdate(date_fmt_year) ... " in my default folder.

    Any ideas?

    Thanks
    Stephan

  • #2
    Please attach your actual project. What you posted there is not valid Lua code.

    Ulrich

    Comment


    • #3
      Hi Ulrich,

      I solved it in the meantime by adding this code to the 'on next' action of the page before the 'select install folder'-page:

      sYY = System.GetDate(DATE_FMT_YEAR);
      sMM = System.GetDate(DATE_FMT_MONTH);
      sDD = System.GetDate(DATE_FMT_DAY);
      sAppFolder = SessionVar.Expand("%ProgramFilesFolder%").."\"..Se ssionVar.Expand("%ProductName%").."_"..sYY..sMM..s DD;
      SessionVar.Set("%AppFolder%",sAppFolder);
      -- advance to the next screen
      Screen.Next();

      maybe not as elegant as possible, but it seems to work.

      -Stephan

      Comment

      Working...
      X