Andromo - Start Making Apps - Free Signup

Announcement

Collapse
No announcement yet.

Restart exe after MDAC

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

  • Restart exe after MDAC

    In On Startup I place the following variables

    local sReBootPath = SessionVar.Expand("%SourceFolder%")
    local sReBootName = SessionVar.Expand("%SourceFilename%")
    msPath = String.Concat("srebootpath", "sReBootName");

    What I want to get is the full path the setup.exe that is being ran. For example: c:\Program Files\Downloads\setup.exe.

    Then in the installation sections of the dependency modules, just before needsreboot (see below) I thought I would tell the system to rerun the exe after it reboots.

    Will this work?

    File.RunOnReboot(msPath)
    _NeedsReboot = true;

  • #2
    could use: SessionVar.Expand("%SourceFilename%");
    this should return the 'current' full path to the runtime setup.exe.

    may I suggest(if you hav'nt) have a bit of a read of a previous post
    regarding Mdac ...rebooting etc etc..

    HTH

    Comment


    • #3
      Also as far as this code:

      local sReBootPath = SessionVar.Expand("%SourceFolder%")
      local sReBootName = SessionVar.Expand("%SourceFilename%")
      msPath = String.Concat("srebootpath", "sReBootName");

      Keep in mind that:

      a) Everything is case sensitive in AutoPlay Media Studio 5.0
      b) When you reference a variable you should not use quotes.

      So your script would be syntactically correct if it looked like this:

      local sReBootPath = SessionVar.Expand("%SourceFolder%")
      local sReBootName = SessionVar.Expand("%SourceFilename%")
      msPath = String.Concat(sReBootPath, sReBootName);

      Adam Kapilik

      Comment


      • #4
        Reboot

        I change the variable to

        msPath = SessionVar.Expand("%SourceFilename%")

        Now if I put File.RunOnReboot(msPath) before the _NeedsReboot = True line, in the installation area of an MDAC dependency module, will the setup re-start after the reboot?

        local nResult = File.Run(strFileToRun,"/passive","",SW_SHOWNORMAL,true);

        -- Delete the runtime installer file and remove the temp folder
        File.Delete(strFileToRun);
        Folder.Delete(strRuntimeSupportFolder);

        -- Tell Setup Factory that a reboot is needed at the end of the install.
        File.RunOnReboot(msPath)
        _NeedsReboot = true;

        Comment

        Working...
        X