Skip to content
Browse files

windows/msi: add start menu links when installing

  • Loading branch information...
1 parent e2126e0 commit 943448772e988eba86173e9d53746137070420f4 @japj japj committed with piscisaureus
Showing with 43 additions and 5 deletions.
  1. +4 −0 tools/msvs/msi/nodemsi.wixproj
  2. +39 −5 tools/msvs/msi/product.wxs
4 tools/msvs/msi/nodemsi.wixproj
@@ -42,6 +42,10 @@
+ <WixExtension Include="WiXUtilExtension">
+ <HintPath>$(WixExtDir)\WiXUtilExtension.dll</HintPath>
+ <Name>WiXUtilExtension</Name>
+ </WixExtension>
<Import Project="$(WixTargetsPath)" />
<Target Name="BeforeBuild">
44 tools/msvs/msi/product.wxs
@@ -1,14 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Wix xmlns="">
+<Wix xmlns=""
+ xmlns:util="">
+ <?define ProductName = "node.js" ?>
+ <?define ProductDescription = "Evented I/O for V8 javascript" ?>
+ <?define ProductAuthor = "Joyent, Inc. and other Node contributors" ?>
japj added a note

@piscisaureus hmm, $(var.ProductAuthor) is also used in writing to the registry and that now includes the "and other Node contributors" part, so it will be HKCU\Software\Joyent, Inc. and other Node contributors*

Was that intentional?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
<?define repoDir="$(var.ProjectDir)..\..\..\" ?>
<?define sourcedir="$(var.repoDir)\$(var.Configuration)\" ?>
<Product Id="*"
- Name="node.js"
+ Name="$(var.ProductName)"
- Manufacturer="Joyent, Inc"
+ Manufacturer="$(var.ProductAuthor)"
<Package InstallerVersion="200" Compressed="yes" />
@@ -19,8 +24,13 @@
DowngradeErrorMessage="A later version of node.js is already installed. Setup will now exit." />
<Directory Id="TARGETDIR" Name="SourceDir">
+ <Directory Id="ProgramMenuFolder">
+ <Directory Id="ApplicationProgramsFolder" Name="Node.js"/>
+ </Directory>
<Directory Id="$(var.ProgramFilesFolderId)">
- <Directory Id="NodeRoot" Name="nodejs">
+ <Directory Id="APPLICATIONROOTDIRECTORY" Name="nodejs">
japj added a note

Oops, apparently this broke the adding [NodeRoot] to the PATH, I'll send a seperate pull request to fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
<Directory Id="NodeModulesFolder" Name="node_modules">
<Directory Id="NPMFolder" Name="npm">
<Component Id="npmrc" Guid="55B2B03F-8F32-4D62-A54A-FA428615591D">
@@ -56,6 +66,7 @@
<Directory Id="AppDataFolder">
<Directory Id="NPMAppData" Name="npm">
<Component Id="npmappdata_folder" Guid="994B1F7F-60CD-4792-A96D-63BC7FFF29BF" Permanent="yes">
@@ -69,6 +80,28 @@
+ <DirectoryRef Id="ApplicationProgramsFolder">
+ <Component Id="ApplicationShortcut" Guid="9b1ab94a-8f54-4f19-a5c4-b890de474162">
+ <Shortcut Id="ApplicationStartMenuShortcut" Name="Node.js"
+ Description="$(var.ProductDescription)" Target="[APPLICATIONROOTDIRECTORY]node.exe"
+ <util:InternetShortcut Id="OnlineWebsiteShortcut"
+ Name="Node.js website"
+ Target=""/>
+ <util:InternetShortcut Id="OnlineDocumentationShortcut"
+ Name="Node.js documentation"
+ Target="$(var.ProductVersion)/docs/api/"/>
+ <Shortcut Id="UninstallProduct"
@domenic Node.js Foundation member
domenic added a note

All of these shortcuts are recommended against in Microsoft UX guidelines. The uninstall one is especially evil.

japj added a note

Ah, I was not aware of that guideline. Looking at it I am wondering how we can 'correctly' map things described in that guideline to node.js.

We don't have a way to "access things directly from your program" (this is related to help files and websites in that guideline), since the only program we ship is node.exe. Executing it will just give a repl, there is no default way to navigate to the website or help pages from within the repl.

As for the uninstaller, both Python(2.7) and Ruby(1.9) Windows installers put an uninstall link in the start menu, so I thought it was common enough to do so. If we really don't want it then we can just remove it.

@domenic Node.js Foundation member
japj added a note

The website contains a link to the current 'stable' documentation (at the moment this is 0.6.18) and does not provide an easy way to navigate to documentation for a specific version of node (i.e. current unstable is 0.7.9). The documentation link goes directly to the documentation of the specific version you installed.

We could also include generated documentation in the installer and provide a link to that, but that is still under discussion I believe.

Btw, how do we deal with a side by side installation of 32 and 64 bit node.js? The guideline states not to include version numbers, but is x86/x64 as part of the link name acceptable? (I know VS2010 has multiple command prompt entries in the start menu for 32 and 64 bit development)

@domenic Node.js Foundation member


I agree that the uninstall and home page links are debatable. Luckily we'll have plenty of time to reconsider before windows 8 drops :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ Name="Uninstall Node.js"
+ Target="[SystemFolder]msiexec.exe"
+ Arguments="/x [ProductCode]"
+ Description="Uninstalls $(var.ProductName)" />
+ <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
+ <RegistryValue Root="HKCU" Key="Software\$(var.ProductAuthor)\$(var.ProductName)" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
+ </Component>
+ </DirectoryRef>
<ComponentGroup Id="allfiles">
<ComponentRef Id="nodeexe"/>
<ComponentRef Id="npmcmd"/>
@@ -79,9 +112,10 @@
<?if $(var.Configuration) = Debug ?>
<ComponentRef Id="nodepdb"/>
+ <ComponentRef Id="ApplicationShortcut" />
- <Feature Id="nodejs" Title="node.js engine" Level="1" Description="evented I/O for V8 javascript">
+ <Feature Id="nodejs" Title="node.js engine" Level="1" Description="$(var.ProductDescription)">
<ComponentGroupRef Id="allfiles" />
<ComponentGroupRef Id="Product.Generated" />

1 comment on commit 9434487


@japj No that wasn't intentional, I didn't realize. IMHO the registry key should just be "joyent/node.js" or even "node.js/node.js".

Please sign in to comment.
Something went wrong with that request. Please try again.