How do you create a desktop "shortcut" in and INF?

Title says it all…how do you create a “shortcut” on the desktop to an executable you are installing in a INF file?

xxxxx@intel.com wrote:

Title says it all…how do you create a “shortcut” on the desktop to an executable you are installing in a INF file?

That’s not an operation you can do in an INF. There are several reasons.

Device Manager runs as a special system user. It doesn’t have access to
the profile folders for the current user. You can use directory ID
16409 to put files into the “All Users” desktop, but not the “current
user” desktop. However, even that isn’t sufficient. To create a
shortcut, you have to create a .lnk file, and the contents of that file
will be different on different systems. There’s no way to construct a
file on the fly in an INF file.

The RIGHT way to do this is to have a simple installer that does the
normal work, like placing executables, creating shortcuts, and creating
and registering uninstaller. The last step of this installer is to run
something like DPInst to install your INF.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

My goodness!!

I thought OP was going to get some serious flak for asking some thing that
is usually performed so far up in user mode. Yet as always Mr. Roberts
comes up such composed and useful reply. Thanks a lot!

I had used Installshield for creating simple installers to copy executables
and create shortcuts. Pretty easy and helpful tool!!

On Wed, 6 Apr 2016 at 10:39 pm Tim Roberts wrote:

> xxxxx@intel.com wrote:
> > Title says it all…how do you create a “shortcut” on the desktop to an
> executable you are installing in a INF file?
>
> That’s not an operation you can do in an INF. There are several reasons.
>
> Device Manager runs as a special system user. It doesn’t have access to
> the profile folders for the current user. You can use directory ID
> 16409 to put files into the “All Users” desktop, but not the “current
> user” desktop. However, even that isn’t sufficient. To create a
> shortcut, you have to create a .lnk file, and the contents of that file
> will be different on different systems. There’s no way to construct a
> file on the fly in an INF file.
>
> The RIGHT way to do this is to have a simple installer that does the
> normal work, like placing executables, creating shortcuts, and creating
> and registering uninstaller. The last step of this installer is to run
> something like DPInst to install your INF.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: <
> http://www.osronline.com/showlists.cfm?list=ntdev&gt;
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
></http:>

jayanth sharma wrote:

My goodness!! I thought OP was going to get some serious flak for
asking some thing that is usually performed so far up in user mode.
Yet as always Mr. Roberts comes up such composed and useful reply.
Thanks a lot! I had used Installshield for creating simple installers
to copy executables and create shortcuts. Pretty easy and helpful tool!!

I uses NSIS for this, because it uses human-readable scripts and does
not rely on magic UIs. I am a dinosaur.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

NSIS? You mean Nullsoft?

On Wed, 6 Apr 2016 at 11:35 pm Tim Roberts wrote:

> jayanth sharma wrote:
> > My goodness!! I thought OP was going to get some serious flak for
> > asking some thing that is usually performed so far up in user mode.
> > Yet as always Mr. Roberts comes up such composed and useful reply.
> > Thanks a lot! I had used Installshield for creating simple installers
> > to copy executables and create shortcuts. Pretty easy and helpful tool!!
>
> I uses NSIS for this, because it uses human-readable scripts and does
> not rely on magic UIs. I am a dinosaur.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: <
> http://www.osronline.com/showlists.cfm?list=ntdev&gt;
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
></http:>

jayanth sharma wrote:

NSIS? You mean Nullsoft?

Yes, “Nullsoft Scriptable Installer System”. I’ve used it for 15 years
to create all of my installers. It’s lightweight and it works. Their
scripting language is a bit arcane, but they are crippled by backward
compatibility requirements.

In the early 1990s, there was a edition of Visual Basic called
“Microsoft Test” that included extensions to build installers. That was
really my favorite installer environment, so naturally it didn’t last.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

having worked with the horror show of incomprehensible layers of xml over
equally incomprehensible layers of msi known as WIX, my appreciation for
NSIS has vastly increased.

Mark Roddy

On Wed, Apr 6, 2016 at 3:16 PM, Tim Roberts wrote:

> jayanth sharma wrote:
> > NSIS? You mean Nullsoft?
>
> Yes, “Nullsoft Scriptable Installer System”. I’ve used it for 15 years
> to create all of my installers. It’s lightweight and it works. Their
> scripting language is a bit arcane, but they are crippled by backward
> compatibility requirements.
>
> In the early 1990s, there was a edition of Visual Basic called
> “Microsoft Test” that included extensions to build installers. That was
> really my favorite installer environment, so naturally it didn’t last.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: <
> http://www.osronline.com/showlists.cfm?list=ntdev&gt;
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
></http:>

MSI: the slowest overdesigned UNZIP known to humanity.

In my experience WIX has been a very effective solution that I have used for many years

I also despise Vim as a text editor as I cannot readily remember what I refer to as arcane keyboard sequences, but when I was younger I remember that I learned even more obfuse ones when I programmed using Watcom?s editor for Pascal so intellectually I suspect I have simply gone soft.

Actually, despite being quite different from normal procedural programming, programming MSI is reasonably straightforward. It is unreasonably tedious which is why I rely on toolkits instead of building them manually

Sent from Mailhttps: for Windows 10

From: Mark Roddymailto:xxxxx
Sent: April 7, 2016 2:12 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: Re: [ntdev] How do you create a desktop “shortcut” in and INF?

having worked with the horror show of incomprehensible layers of xml over equally incomprehensible layers of msi known as WIX, my appreciation for NSIS has vastly increased.

Mark Roddy

On Wed, Apr 6, 2016 at 3:16 PM, Tim Roberts > wrote:
jayanth sharma wrote:
> NSIS? You mean Nullsoft?

Yes, “Nullsoft Scriptable Installer System”. I’ve used it for 15 years
to create all of my installers. It’s lightweight and it works. Their
scripting language is a bit arcane, but they are crippled by backward
compatibility requirements.

In the early 1990s, there was a edition of Visual Basic called
“Microsoft Test” that included extensions to build installers. That was
really my favorite installer environment, so naturally it didn’t last.


Tim Roberts, xxxxx@probo.commailto:xxxxx
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

Visit the list online at: http:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at http:

— NTDEV is sponsored by OSR Visit the list online at: MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at To unsubscribe, visit the List Server section of OSR Online at</http:></http:></http:></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></https:>

As we all fail to express our inferential opinions of the hardware and software produced by various vendor including your employer, it might be more helpful to express technical opinions only.

The various list slaves may correct me but I am sure that unsubstantiated conjectures are discouraged when posting.

Sent from Mailhttps: for Windows 10

From: xxxxx@broadcom.commailto:xxxxx
Sent: April 7, 2016 3:26 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE:[ntdev] How do you create a desktop “shortcut” in and INF?

MSI: the slowest overdesigned UNZIP known to humanity.


NTDEV is sponsored by OSR

Visit the list online at: http:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:></mailto:xxxxx></mailto:xxxxx></https:>

xxxxx@intel.com wrote:

Title says it all…how do you create a “shortcut” on the
desktop to an executable you are installing in a INF file?

I’m not aware of an .INF method to perform exactly what was requested,
either. (Placing a file on the user’s desktop.) But the driver
installation .INF can actually create a .LNK for you and place it in
the interactive user’s profile area – but it only offers to do this
for the Start menu items, not “on the desktop.”

Check out the “INF ProfileItems Directive” on MSDN Hardware Dev Center
if that sounds like it might be close enough. We only used it back on
Windows 5.x, so no first-hand experience with MSDN’s statement that
it’s still supported.

Alan Adams
Client for Open Enterprise Server
Micro Focus
xxxxx@microfocus.com