MSFN Forum: getting a winrar SFX to make an accurate shortcut to .exe in user-defi - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

getting a winrar SFX to make an accurate shortcut to .exe in user-defi Rate Topic: -----

#1 User is offline   shapeless 

  • Junior
  • Pip
  • Group: Members
  • Posts: 74
  • Joined: 11-June 04

Posted 17 June 2006 - 09:44 PM

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.

This post has been edited by shapeless: 17 June 2006 - 09:47 PM



#2 User is offline   NomiSoft 

  • Group: Members
  • Posts: 1
  • Joined: 07-May 11
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 07 May 2011 - 11:22 PM

Give a look to the images i attached with. they will help you accomplish this.
Regards.

Attached File(s)



#3 User is offline   hessam 

  • Member
  • PipPip
  • Group: Members
  • Posts: 130
  • Joined: 15-December 07

Posted 09 May 2011 - 02:09 AM

please read this
Shortcut=<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 Desktop
S	Create a shortcut in Start Menu
P	Create a shortcut in Start Menu/Programs
T	Create a shortcut in Startup folder



SrcName 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.
Example

Create 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

This post has been edited by hessam: 09 May 2011 - 02:11 AM


#4 User is offline   polas 

  • Group: Members
  • Posts: 4
  • Joined: 30-September 10
  • OS:XP Pro x86
  • Country: Country Flag

Posted 07 October 2011 - 09:42 AM

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.

#5 User is offline   TheKiller 

  • Group: Members
  • Posts: 3
  • Joined: 25-November 11
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 25 November 2011 - 01:47 AM

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:

Quote

Target: "D:\Folder1\Folder2\Run Game.exe"
Start in:

How it should be:

Quote

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 post has been edited by TheKiller: 25 November 2011 - 01:47 AM


#6 User is offline   Geej 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 634
  • Joined: 01-January 08
  • OS:XP Pro x86
  • Country: Country Flag

Posted 25 November 2011 - 10:33 PM

View PostTheKiller, on 25 November 2011 - 01:47 AM, said:

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:

Quote

Target: "D:\Folder1\Folder2\Run Game.exe"
Start in:

How it should be:

Quote

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 Thekiller
Try 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 commands

Path=D:\Folder1\Folder2
SavePath
Silent=1
Overwrite=1

Shortcut=D, "Run Game.exe", "", "Run Game in Win7", "Launch Game", ""

This post has been edited by Geej: 25 November 2011 - 10:35 PM


#7 User is offline   TheKiller 

  • Group: Members
  • Posts: 3
  • Joined: 25-November 11
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 26 November 2011 - 07:18 AM

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 commands

Path=%PROGRAMFILES%\Folder1\Folder2\
SavePath
Silent=1
Overwrite=1
Title=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",


This post has been edited by TheKiller: 26 November 2011 - 07:19 AM


#8 User is offline   Geej 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 634
  • Joined: 01-January 08
  • OS:XP Pro x86
  • Country: Country Flag

Posted 26 November 2011 - 08:34 PM

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?

#9 User is offline   own3mall 

  • Group: Members
  • Posts: 1
  • Joined: 15-January 12
  • OS:none specified
  • Country: Country Flag

Posted 15 January 2012 - 10:51 PM

View PostTheKiller, on 25 November 2011 - 01:47 AM, said:

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:

Quote

Target: "D:\Folder1\Folder2\Run Game.exe"
Start in:

How it should be:

Quote

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.

#10 User is offline   michaelmross 

  • Group: Members
  • Posts: 1
  • Joined: 08-June 11
  • OS:none specified
  • Country: Country Flag

Posted 17 October 2012 - 12:07 PM

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.

This post has been edited by michaelmross: 17 October 2012 - 12:08 PM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy