← Backrubrapack Manual › ch. 5Contents

5 Shortcuts, icons and the Installed apps entry

Goal: a Start menu folder "Example Software" with Hello and its readme, a desktop shortcut with its own icon, and an icon and links for Hello in Installed apps.

You need an icon file, hello.ico, next to the source (any .ico will do; many image editors save one).

5.1 The source#

# tutorial 05: hello.toml
format = 1

[package]
name = "Hello"
manufacturer = "Example Software"
version = "$(VERSION)"
arch = "x64"
upgrade-code = "{3F2A6C1D-8B4E-4F7A-9C2D-5E6F7A8B9C0D}"

[define]
VERSION = "1.3.0"

[arp]
icon = "hello.ico"
help = "https://example.com/hello/help"
about = "https://example.com/hello"
no-repair = true

[dir.INSTALLDIR]
path = "$(ProgramFiles)/Hello"

[dir.MenuFolder]
path = "$(Programs)/Example Software"

[file.Hello]
dir = "INSTALLDIR"
source = "dist/hello.exe"

[file.Readme]
dir = "INSTALLDIR"
source = "dist/readme.txt"

[shortcut.StartMenu]
dir = "MenuFolder"
name = "Hello"
target = "file:Hello"
description = "Says hello"
working-dir = "INSTALLDIR"

[shortcut.ReadmeLink]
dir = "MenuFolder"
name = "Hello - read me"
target = "file:Readme"

[shortcut.Desktop]
dir = "Desktop"
name = "Hello"
target = "file:Hello"
args = "--greet \"[ProductName] user\""
icon = "hello.ico"

5.2 Shortcuts: [shortcut.ID]#

The Start menu folder rubrapack makes for shortcuts is removed again with the product, as are the shortcuts.

5.3 The Installed apps entry: [arp]#

("ARP" is the old name of the list: Add or Remove Programs.)

KeyEffect
icon = "hello.​ico"the icon in the list
logo = "hello.​png"the picture of the Windows 11 right-click menu's small package (chapter 11; else made from icon)
help = "https://...​"a support link Windows shows with the product
about = "https://...​"the product's web page
no-​repair = trueno Repair for this product
no-​modify = trueno Modify/Change (useful when the package has nothing to change: chapter 8 adds something)
no-​remove = trueno Uninstall; the product is removed through Modify, with the package's own dialogs (for an input method or a shell extension: see the reference)

5.4 A name in another script#

name may be in any language (name = "안녕"). The file properties of the .msi itself (its Details tab) can only show plain ASCII text, so for such a name give an ASCII form as well: summary-name = "Annyeong" in [package]. Without it rubrapack warns (RP1203) and the properties read "rubrapack package".

5.5 Try it#

Build, install, and open the Start menu: "Example Software" holds "Hello" and "Hello - read me", and the desktop has "Hello" with the icon you gave. Installed apps shows Hello with its icon. Remove it: the shortcuts and the Start menu folder go too.

5.6 What happened inside#

C:\work\hello> rubrapack inspect hello.msi Shortcut
Shortcut  Directory_  Name  Component_  Target  Arguments Description Hotkey
...
Desktop DesktopFolder Hello C_2ea6d5bfd9b4a9073b30  [INSTALLDIR]hello.exe --greet "[ProductName] user"
ReadmeLink  MenuFolder  HELLO-~1|Hello - read me  C_1643d000d3751c809248  [INSTALLDIR]readme.txt
StartMenu MenuFolder  Hello C_a7452f86f3da3f7d2a6c  [INSTALLDIR]hello.exe   Says hello

The icons are stored inside the package (the Icon table), and the Property table carries the Installed apps settings:

ARPHELPLINK https://example.com/hello/help
ARPNOREPAIR 1
ARPPRODUCTICON  RpIcon1.ico
ARPURLINFOABOUT https://example.com/hello