Jump to content


  • 0
king13p

Add A Desktop Shortcut into a MSI

Question

Hello everyone,

 

I have decided to create a tutorial on how to add a shortcut into a MSI. Our software packager likes to rebuild MSI from ground up using Admin Studio and what ends up happening is the MSI's don't work great afterwards, Most of the time its Deleting a shortcut or Adding one. So instead of rebuilding an MSI lets use Orca to create a Transforms file to create a shortcut.

 

1. Download Windows SDK http://www.microsoft.com/en-us/download/details.aspx?id=8279

 

2. Choose the Default installation options

 

3. After install navigate to C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\

 

4. Install Orca.MSI

 

5. After its done installing lets edit the MSI for 7-Zip. We are going to add a desktop shortcut.

 

6. Download the MSI to the desktop and right click it and choose Edit with Orca. Or open Orca and choose the 7-Zip MSI

 

Edit_zps0bf1d31f.png

 

7. We need to Create a Transforms file first. Click Transform in the Menu > New Transform

 

8. In the Tables Column choose Shortcut.

 

Shortcut_zps4cc9d512.jpg

 

9. There are Two Shortcuts by Default that are placed by default when the MSI is run in this example.

The 7-Zip File Manager and the 7-Zip Help. Lets make it so File Manager is on the Desktop. The easiest way to do this is simply Copy the entire row.

 

Right click the shortcut labeled "startmenuFmShortcut" and choose Copy Row.

 

CopyRow_zps38795a28.png

 

10. Now Paste the Rows

 

PasteRows_zps2425ac4d.png

 

11. If you want to change the name of the shortcut you can Simply change the value under Name. Right now its listed as "7zipFM|7-Zip File Manager" Everything after the Pipe is what the name of the icon is. Everything before doesn't get put anywhere and far as I can see, It may just be a comment as far as I know, You also don't need it, If you replace the whole line it will show up as the name of the shortcut. I'll label mine "7-Zip"

 

EDIT: Found out that if you label Directory_ as "DesktopFolder" instead of desktop, you can skip steps 13 - 17. DesktopFolder is a variable which places it in the Public Desktop Folder.

 

12. Directory_ should be "Desktop" You should be good to go. You can go crazier with this but thats not in the scope of this tutorial Here is what it should look like:

 

NewShort_zps4bdf339a.jpg

 

13. Now we must place values as to where "Desktop" really is. Otherwise if we ran the MSI with this Transform file it wouldn't know where Desktop is. Click the Directory Table.

 

Directory_zps7ea9b50e.jpg

 

14. Here you see basically a table of where the MSI looks to install various things to. Right click the table and choose Add Row. We must add a few rows to this table. Its best to think about this whole thing backwards when you are adding to this table. We want to place a shortcut in this directory.

 

C:\Users\Public\Desktop

 

This will guarantee it will show up on everyones desktop.

 

For Directory put Desktop. For Directory_Parent put PUBLIC For DefaultDir put Desktop

 

15. Right Click and Choose Add Row

For Directory put Public. For Directory_Parent put Users For DefaultDir put Public

 

16. One more time Right Click and Choose Add Row

For Directory put Users. For Directory_Parent put TARGETDIR For DefaultDir put Users

 

17. In the end it should look like so:

DirectoryList_zpsbbeafda8.jpg

 

18. Click Transform and Choose Generate Transform > Save it as 7ZIPTRANS.MST on the desktop or in the same directory as your 7-zip msi.

 

19. Open a Command Prompt and navigate to the same directory as your 7-Zip MSI and Transforms file.

 

20. Type the following: msiexec.exe /i 7z920.msi TRANSFORMS=7ZIPTRANS.mst /qn

This line will install 7zip using the Transforms file we created and it will install silently.

 

You now see the icon on the desktop.

 

cmd_zps7d72af31.jpg

Hope you enjoyed this tutorial and hope its helpful for you.

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.