shapeless Posted June 18, 2006 Posted June 18, 2006 (edited) I have a winrar SFX that prompts the user for a directory(this part i didn't want unattended) Is there a way to send a shortcut to an .exe to the desktop, so no matter what directory the user specifies, he/she will receive a desktop shortcut to this program on the desktop?I was hoping to have a batch file make shortcut.exe be able to recognize the directory of the executable, and create a fullpath to it, but that doesn't seem to be working. Edited June 18, 2006 by shapeless
NomiSoft Posted May 8, 2011 Posted May 8, 2011 Give a look to the images i attached with. they will help you accomplish this.Regards.Add Shortcut.rar
hessam Posted May 9, 2011 Posted May 9, 2011 (edited) please read thisShortcut=<DestType>,<SrcName>,<DestFolder>,<Description>,<ShortcutName>,<ShortcutIcon>Create a shortcut to unpacked file.DestType is one character wide field, which can have the following values: D Create a shortcut on DesktopS Create a shortcut in Start MenuP Create a shortcut in Start Menu/ProgramsT Create a shortcut in Startup folderSrcName is a name of archived file. DestFolder is a folder to create a shortcut in. If it does not exist, it will be created by SFX archive. Description is a text string describing a shortcut.ShortcutName is a name of .lnk (shortcut) file created by SFX.ShortcutIcon is a name of icon file associated with shortcut. If you omit this parameter, the default icon will be used. If icon file name does not contain the full path, SFX archive will search the icon file in folder containing unpacked files.All parameters are separated by commas. If you need to put a comma character inside of parameter, enclose the whole parameter to quotes. Repeat quotes twice if you need to insert a quote mark into string. Only DestType and SrcName are required, other parameters are optional.ExampleCreate a shortcut in folder WinRAR on Desktop to archived file winrar.exe with the description "WinRAR executable file", name "WinRAR archiver" and icon winrar.ico:Shortcut=D, winrar.exe, WinRAR, "WinRAR executable file", "WinRAR archiver", winrar.ico Edited May 9, 2011 by hessam
polas Posted October 7, 2011 Posted October 7, 2011 I have tried this method a lot of times it creates the shortcut on desktop but do not find the real place of shortcut program You have nothing showed special in this picture but thanks it won't work.
TheKiller Posted November 25, 2011 Posted November 25, 2011 (edited) Hello, i have come across this thread, and this for quite a whille.I managed to make it create Desktop Icons Successfully.There is only just a small thing that wont do.So, it is adding the target successfully, but it ads no target ! How it currently is:Target: "D:\Folder1\Folder2\Run Game.exe"Start in:How it should be:Target: "D:\Folder1\Folder2\Run Game.exe"Start in: "D:\Folder1\Folder2"This is my shortcut code:Shortcut=D, "System\Run Game.exe", "", "Run Game in Win7", "Launch Game", Please help me out to specify the shortcut "Start in". I hope someone is able to help me, and i havent registered for nothing Edited November 25, 2011 by TheKiller
Geej Posted November 26, 2011 Posted November 26, 2011 (edited) Hello, i have come across this thread, and this for quite a whille.I managed to make it create Desktop Icons Successfully.There is only just a small thing that wont do.So, it is adding the target successfully, but it ads no target ! How it currently is:Target: "D:\Folder1\Folder2\Run Game.exe"Start in:How it should be:Target: "D:\Folder1\Folder2\Run Game.exe"Start in: "D:\Folder1\Folder2"This is my shortcut code:Shortcut=D, "System\Run Game.exe", "", "Run Game in Win7", "Launch Game", Please help me out to specify the shortcut "Start in". I hope someone is able to help me, and i havent registered for nothing Hi ThekillerTry this...I copied out calc.exe and rename to Run Game.exe, then WinRAR SFX it according to your given path.Config/comment file I use works fine on my XP.;The comment below contains SFX script commandsPath=D:\Folder1\Folder2SavePathSilent=1Overwrite=1Shortcut=D, "Run Game.exe", "", "Run Game in Win7", "Launch Game", "" Edited November 26, 2011 by Geej
TheKiller Posted November 26, 2011 Posted November 26, 2011 (edited) Hi Geej, thank you for your answer.Please bear with me till i fix this issue I have done what you told me to. I Added Silent=1 after savepath in the omment box, and added the commas at the end, but it doesnt do any difference.This is my entire script :;The comment below contains SFX script commandsPath=%PROGRAMFILES%\Folder1\Folder2\SavePathSilent=1Overwrite=1Title=Unrealed Patch for Vista/7 Text{This will allow you to Run the Editor and the Game in Windows Vista/7.}Shortcut=D, "System\Run Game.exe", "", "Run Game in Win7", "Launch Game", Shortcut=D, "System\Run Editor.exe", "", "Run Editor in Win7", "Launch Editor", Shortcut=P, "System\Run Game.exe", "Unrealed Patch for Vista7", "Run Game in Win7", "Launch Game", Shortcut=P, "System\Run Editor.exe", "Unrealed Patch for Vista7", "Run Editor in Win7", "Launch Editor",Shortcut=P, "System\Uninstall Vista7 Patch.bat", "Unrealed Patch for Vista7", "Uninstall Vista7 Patch", "Uninstall Vista7 Patch", Edited November 26, 2011 by TheKiller
Geej Posted November 27, 2011 Posted November 27, 2011 I don't understand why you put System\Run Game.exe in the shortcut path. Try remove "System\"Or Run Game.exe full path is %PROGRAMFILES%\Folder1\Folder2\Run Game.exe. Correct?
own3mall Posted January 16, 2012 Posted January 16, 2012 Hello, i have come across this thread, and this for quite a whille.I managed to make it create Desktop Icons Successfully.There is only just a small thing that wont do.So, it is adding the target successfully, but it ads no target ! How it currently is:Target: "D:\Folder1\Folder2\Run Game.exe"Start in:How it should be:Target: "D:\Folder1\Folder2\Run Game.exe"Start in: "D:\Folder1\Folder2"This is my shortcut code:Shortcut=D, "System\Run Game.exe", "", "Run Game in Win7", "Launch Game", Please help me out to specify the shortcut "Start in". I hope someone is able to help me, and i havent registered for nothing This was my question as well. I was just messing around to see if I could get it to work, and here's how you set the start in to the installation path the user chooses.D, your.exe, \, "Shortcut Description", "Shortcut name",Hope this helps... this is not clear at all for SFX users.
michaelmross Posted October 17, 2012 Posted October 17, 2012 (edited) Thanks own3mall. That's an invaluable tip. Just one little "\" is all that's needed.The WinRAR documentation for the very tricky shortcut command line is completely deficient.Also, problematic, is the failure in the SFX UI to make any distinction between design-time settings and runtime settings. Edited October 17, 2012 by michaelmross
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now