Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

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

- - - - -

  • Please log in to reply
9 replies to this topic

#1
shapeless

shapeless

    Junior

  • Member
  • Pip
  • 74 posts
  • Joined 11-June 04
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 by shapeless, 17 June 2006 - 09:47 PM.



How to remove advertisement from MSFN

#2
NomiSoft

NomiSoft
  • Member
  • 1 posts
  • Joined 07-May 11
  • OS:Windows 7 x86
  • Country: Country Flag
Give a look to the images i attached with. they will help you accomplish this.
Regards.

Attached Files



#3
hessam

hessam

    Member

  • Member
  • PipPip
  • 134 posts
  • Joined 15-December 07
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

Edited by hessam, 09 May 2011 - 02:11 AM.


#4
polas

polas
  • Member
  • 4 posts
  • Joined 30-September 10
  • OS:XP Pro x86
  • Country: Country Flag
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
TheKiller

TheKiller
  • Member
  • 3 posts
  • Joined 25-November 11
  • OS:Windows 7 x64
  • Country: Country Flag
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 by TheKiller, 25 November 2011 - 01:47 AM.


#6
Geej

Geej

    Senior Member

  • Member
  • PipPipPipPip
  • 635 posts
  • Joined 01-January 08
  • OS:XP Pro x86
  • Country: Country Flag

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 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", ""

Edited by Geej, 25 November 2011 - 10:35 PM.


#7
TheKiller

TheKiller
  • Member
  • 3 posts
  • Joined 25-November 11
  • OS:Windows 7 x64
  • Country: Country Flag
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",

Edited by TheKiller, 26 November 2011 - 07:19 AM.


#8
Geej

Geej

    Senior Member

  • Member
  • PipPipPipPip
  • 635 posts
  • Joined 01-January 08
  • OS:XP Pro x86
  • Country: Country Flag
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
own3mall

own3mall
  • Member
  • 1 posts
  • Joined 15-January 12
  • OS:none specified
  • Country: Country Flag

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.

#10
michaelmross

michaelmross
  • Member
  • 1 posts
  • Joined 08-June 11
  • OS:none specified
  • Country: Country Flag
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 by michaelmross, 17 October 2012 - 12:08 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN