How to create a link (no shortcut) to a folder en Setup Facory. The same thing is done using ´´mklink´´ from CommandLine.
Announcement
Collapse
No announcement yet.
Create folder/file link(no Shortcut)
Collapse
X
-
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
Comment
Comment