Jump to content

help shortcut


1st

Recommended Posts

The trick to making shortcuts to files that dont have icons is to use IconPath and IconIndex to tell the shortcut what icon to use, if you dont the shortcut will not be created

Here is an example

Name=Shortcut Name
CmdLine=11,,"rundll32 advpack.dll,LaunchINFSection FileName.inf,InfSectionName"
WorkingDir=-1
IconPath=11,,shell32.dll
IconIndex=69; INF icon number
InfoTip=Registry tweaks

You can change the icon to whatever one you like, in my example I am using the number 69 which will add a shortcut with the icon for a INF file

shortjo2.png

Since this is a regtweak, here is another example using the icons from regedit.exe

Name=Shortcut Name
CmdLine=10,,"regedit.exe /s ""%11%\RegFileName.reg"""
WorkingDir=-1
IconPath=10,,regedit.exe
IconIndex=1; REG_FILE icon number
InfoTip=Registry tweaks

short2zi8.png

Link to comment
Share on other sites

[Version]

signature="$Windows NT$"

[Optional Components]

WinKey

[DefaultInstall]

OptionDesc="Enable/Disable WinKey"

Tip ="Enable/Disable WinKey"

Modes =0,1,2,3

CopyFiles =win_on.files,win_off.files

ProfileItems=enable.addshortcut,disablee.addshortcut

[WinKey]

OptionDesc="Enable/Disable WinKey"

Tip ="Enable/Disable WinKey"

Modes =0,1,2,3

CopyFiles =win_on.files,win_off.files

ProfileItems=enable.addshortcut,disablee.addshortcut

[sourceDisksNames.x86]

1="WinKeys","win.cab",,"i386"

[DestinationDirs]

win_on.files =11

win_off.files=11

[sourceDisksFiles]

win_on.inf=1

win_off.inf=1

[win_on.files]

win_on.inf

[win_off.files]

win_off.inf

[enable.addshortcut]

Name= WinKey on

CmdLine=11,,"rundll32 advpack.dll,LaunchINFSection win_on.inf,DefaultInstall"

WorkingDir=11

subdir=WinKey

InfoTip=Enable WinKey

[disablee.addshortcut]

Name= WinKey off

CmdLine=11,,"rundll32 advpack.dll,LaunchINFSection win_off.inf,DefaultInstall"

WorkingDir=11

subdir=WinKey

InfoTip=Disable WinKey

probem Cmdline were the inf file in Program Files

Edited by 1st
Link to comment
Share on other sites

If you are launching the DefaultInstall section you dont have to add it to the advpack.dll switch, also you are forgetting the IconPath/Index

[Version]
signature="$Windows NT$"

[Optional Components]
WinKey

[DefaultInstall]
OptionDesc="Enable/Disable WinKey"
Tip ="Enable/Disable WinKey"
Modes =0,1,2,3
CopyFiles =win_on.files,win_off.files
ProfileItems=enable.addshortcut,disablee.addshortcut

[WinKey]
OptionDesc="Enable/Disable WinKey"
Tip ="Enable/Disable WinKey"
Modes =0,1,2,3
CopyFiles =win_on.files,win_off.files
ProfileItems=enable.addshortcut,disablee.addshortcut

[SourceDisksNames.x86]
1="WinKeys","win.cab",,"i386"

[DestinationDirs]
win_on.files =11
win_off.files=11


[SourceDisksFiles]
win_on.inf=1
win_off.inf=1

[win_on.files]
win_on.inf

[win_off.files]
win_off.inf

[enable.addshortcut]
Name= WinKey on
CmdLine=11,,"rundll32 advpack.dll,LaunchINFSection %11%\win_on.inf"
WorkingDir=11
subdir=WinKey
InfoTip=Enable WinKey
IconPath=??
IconIndex=??

[disablee.addshortcut]
Name= WinKey off
CmdLine=11,,"rundll32 advpack.dll,LaunchINFSection %11%\win_off.inf"
WorkingDir=11
subdir=WinKey
InfoTip=Disable WinKey
IconPath=??
IconIndex=??

Link to comment
Share on other sites

Join the conversation

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

Guest
Reply to this topic...

×   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.

×
×
  • Create New...