That’s what the example change did:
if (S_OK != hr)
{
WcaLog(LOGMSG_STANDARD, "failed to create an instance of
IUniformResourceLocatorW, skipping shortcut creation");
hr = S_OK;
goto LExit;
}
and
if (S_OK != hr)
{
WcaLog(LOGMSG_STANDARD, "failed to create an instance of IShellLinkW,
skipping shortcut creation");
hr = S_OK;
goto LExit;
}
Unless you are asking for a different log level (maybe an error) to be used. I
also see I missed the CoInitialize and CoUninitialize. I’ll push a commit to
my fork if you wanted to see the changes (they compile, but I don’t have an OS
to test on).
From: Rob Mensching [mailto:r...@robmensching.com]
Sent: Monday, November 05, 2012 11:55 AM
To: Windows Installer XML toolset developer mailing list
Subject: Re: [WiX-devs] WixCreateInternetShortcuts on an OS without Explorer
I'm with Jacob and I think the downside is completely reasonable. The only
addition would be sure to log when the work is being skipped. Otherwise, we'll
have people blaming us for not installing their shortcut (and not telling them
<smile/>). Doc should also be tweaked to note this special case.
On Mon, Nov 5, 2012 at 9:43 AM, Hoover, Jacob
<jacob.hoo...@greenheck.com<mailto:jacob.hoo...@greenheck.com>> wrote:
From the sounds of it, certain Windows Server Core may not have the option to
create a shortcut or the option can be turned off.
(http://technet.microsoft.com/en-us/library/dd184075.aspx) I would envision if
there is no Explorer on the machine, any of the COM classes designed to
interact with them would not be registered or installed.
I’m betting it’s CLSID_InternetShortcut and CLSID_ShellLink are not registered
on the OS’s.
Would it be acceptable to skip the creation/removal of shortcuts if the
creation of those objects fails? If so, it should be as simple as modifying
netshortcuts.cpp in WixSchedInternetShortcuts to test the creation of the two,
and if either fails simply don’t schedule the creation (and thereby avoid the
removal).
Ie:
hr = WcaInitialize(hInstall, "WixSchedInternetShortcuts");
ExitOnFailure(hr, "failed to initialize WixSchedInternetShortcuts.");
// Check to see if we can create a shortcut
IUniformResourceLocatorW* piURL = NULL;
IShellLinkW* piShellLink = NULL;
WcaLog(LOGMSG_STANDARD, "Test creating IUniformResourceLocatorW");
hr = ::CoCreateInstance(CLSID_InternetShortcut, NULL, CLSCTX_ALL,
IID_IUniformResourceLocatorW, (void**)&piURL);
if (S_OK != hr)
{
WcaLog(LOGMSG_STANDARD, "failed to create an instance of
IUniformResourceLocatorW, skipping shortcut creation");
hr = S_OK;
goto LExit;
}
WcaLog(LOGMSG_STANDARD, "Test creating IShellLinkW shortcut");
hr = ::CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_ALL, IID_IShellLinkW,
(void**)&piShellLink);
if (S_OK != hr)
{
WcaLog(LOGMSG_STANDARD, "failed to create an instance of IShellLinkW,
skipping shortcut creation");
hr = S_OK;
goto LExit;
}
…
LExit:
…
ReleaseObject(piURL);
ReleaseObject(piShellLink);
The only down side I could see is you could end up abandoning a shortcut
removal if an install that creates a shortcut was ran and then the feature was
disabled and the uninstall was ran.
From: Scott Blomquist (MS OPEN TECH)
[mailto:sb...@microsoft.com<mailto:sb...@microsoft.com>]
Sent: Monday, November 05, 2012 11:35 AM
To: Windows Installer XML toolset developer mailing list
Subject: Re: [WiX-devs] WixCreateInternetShortcuts on an OS without Explorer
I understand a tiny bit about the root cause. It seems that any Windows
installation (usually Server Core, but possible on all recent Windows Server
SKUs) that has the GUI disabled simply doesn’t have IUniformResourceLocator
available. (Turns out when I said “Internet Explorer” previously, I now believe
I meant just “Explorer”, i.e. the Windows shell.)
In my (admittedly WiX-naïve) mind, it seems like either: 1) InternetShortcut
should be tolerant when it completely strikes out trying to find the Windows
shell, or 2) we need some capability probe that we can predicate our use of
InternetShortcut on.
If it’s case 2, I guess I can write such a probe for my project, but I’d be
happy to contribute it if there’s some place where that kind of thing lives in
WiX.
From: Rob Mensching
[mailto:r...@robmensching.com]<mailto:[mailto:r...@robmensching.com]>
Sent: Monday, November 5, 2012 8:41 AM
To: Windows Installer XML toolset developer mailing list
Subject: Re: [WiX-devs] WixCreateInternetShortcuts on an OS without Inernet
Explorer
ContinueOnError is a very rare pattern in WiX toolset. It sounds like the issue
is that InternetShortcut doesn't work on some operating systems, so I don't
think it is applicable here. Either the Component should be conditioned to not
install on those operating systems or InternetShortcut should automatically
turn itself off and log a message saying so.
I don't know enough about the root cause of the issues to vote either way. Does
someone else?
On Wed, Oct 31, 2012 at 1:52 PM, Scott Blomquist (MS OPEN TECH)
<sb...@microsoft.com<mailto:sb...@microsoft.com>> wrote:
I’m willing to contribute the required work to WiX, but what’s the right way to
fix the WixCreateInternetShortcuts failure that comes up from
time<http://www.mail-archive.com/wix-users@lists.sourceforge.net/msg51652.html>
(wix-users) to time<https://github.com/joyent/node/issues/4021> (Node.js bug
tracker)?
I especially care about the Node.js problem in the second link above. Are they
right about adding ContinueOnError to <util:InternetShortcut /> as the right
approach?
Thanks a bunch.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we. 1GB nVIDIA Quadro 600,Dual Monitor,1DP
and 1DVI,Dell Precision T3600, T5600, T7600 (320-3644)’
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
WiX-devs mailing list
WiX-devs@lists.sourceforge.net<mailto:WiX-devs@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/wix-devs
--
virtually,
Rob Mensching
http://RobMensching.com LLC
------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p..sf.net/sfu/logmein12331_d2d<http://p.sf.net/sfu/logmein12331_d2d>
_______________________________________________
WiX-devs mailing list
WiX-devs@lists.sourceforge.net<mailto:WiX-devs@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/wix-devs
--
virtually,
Rob Mensching
http://RobMensching.com LLC
------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
WiX-devs mailing list
WiX-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-devs