Announcement

Collapse
No announcement yet.

Create folder/file link(no Shortcut)

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

  • Create folder/file link(no Shortcut)

    How to create a link (no shortcut) to a folder en Setup Facory. The same thing is done using ´´mklink´´ from CommandLine.

  • #2
    Run mklink as part of your installer...

    Ulrich

    Comment


    • #3
      mkLink is a line command. Who can i run mkline as part of my installer

      Comment


      • #4
        The documentation is there for you to read. See File.Run() for an explanation on how you can run applications as part of your installer.

        Ulrich

        Comment


        • #5
          Thank you very much for your answers. I'm using File.run but with executable created by me. I have never used File.run for a command. I'm investigating.

          Comment


          • #6
            ´mklink´ is a line command. Can you post an example how File.Run (Shell.Execute) is used to perform commands from the command line, eg mkdir, mkline, etc. PLSSSSSSSSSSSS

            Comment


            • #7
              mklink is part of the command line interpreter, so you would typically execute cmd.exe and pass the required parameters.

              Assuming that you want to create a symbolic link on the desktop to the "My Documents" folder, you could execute this command:

              Code:
              local sCmdLine = "/D \"" .. SessionVar.Expand("%DesktopFolder%\\Demo") .. "\"  \"" .. SessionVar.Expand("%MyDocumentsFolder%") .. "\"";
              Dialog.Message("Info", "About to perform\r\n\r\nmklink " .. sCmdLine);
              File.Run(SessionVar.Expand("%SystemFolder%\\cmd.exe"), "/C mklink " .. sCmdLine, "", SW_SHOWNORMAL, true);
              error = Application.GetLastError();
              if (error ~= 0) then
                 Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
              else
                 Dialog.Message("Information", "Command completed successfully");
              end
              Ulrich

              Comment

              Working...
              X