Skip to content

Commit 79997c5

Browse files
Tomasz JanczukTomasz Janczuk
Tomasz Janczuk
authored and
Tomasz Janczuk
committed
fix #178: simplify use of node.js x64 with iisnode
1 parent eafa808 commit 79997c5

File tree

7 files changed

+38
-18
lines changed

7 files changed

+38
-18
lines changed

Diff for: src/config/iisnode_dev_x64.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Details at http://learn.iis.net/page.aspx/241/configuration-extensibility/
3030
<attribute name="node_env" type="string" expanded="true" defaultValue="%node_env%"/>
3131
<attribute name="asyncCompletionThreadCount" type="uint" defaultValue="0"/>
3232
<attribute name="nodeProcessCountPerApplication" type="uint" defaultValue="1"/>
33-
<attribute name="nodeProcessCommandLine" type="string" expanded="true" defaultValue="&quot;%programfiles(x86)%\nodejs\node.exe&quot;"/>
33+
<attribute name="nodeProcessCommandLine" type="string" expanded="true" defaultValue="&quot;%programfiles%\nodejs\node.exe&quot;"/>
3434
<attribute name="interceptor" type="string" expanded="true" defaultValue="&quot;%programfiles(x86)%\iisnode-dev\release\x64\interceptor.js&quot;" />
3535
<attribute name="maxConcurrentRequestsPerProcess" type="uint" allowInfitnite="true" defaultValue="1024"/>
3636
<attribute name="maxNamedPipeConnectionRetry" type="uint" defaultValue="100"/>

Diff for: src/config/iisnode_dev_x86_on_x64.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Details at http://learn.iis.net/page.aspx/241/configuration-extensibility/
3030
<attribute name="node_env" type="string" expanded="true" defaultValue="%node_env%"/>
3131
<attribute name="asyncCompletionThreadCount" type="uint" defaultValue="0"/>
3232
<attribute name="nodeProcessCountPerApplication" type="uint" defaultValue="1"/>
33-
<attribute name="nodeProcessCommandLine" type="string" expanded="true" defaultValue="&quot;%programfiles(x86)%\nodejs\node.exe&quot;"/>
33+
<attribute name="nodeProcessCommandLine" type="string" expanded="true" defaultValue="&quot;%programfiles%\nodejs\node.exe&quot;"/>
3434
<attribute name="interceptor" type="string" expanded="true" defaultValue="&quot;%programfiles(x86)%\iisnode-dev\release\x86\interceptor.js&quot;" />
3535
<attribute name="maxConcurrentRequestsPerProcess" type="uint" allowInfitnite="true" defaultValue="1024"/>
3636
<attribute name="maxNamedPipeConnectionRetry" type="uint" defaultValue="100"/>

Diff for: src/config/iisnode_express_schema_x64.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Details at http://learn.iis.net/page.aspx/241/configuration-extensibility/
3030
<attribute name="node_env" type="string" expanded="true" defaultValue="%node_env%"/>
3131
<attribute name="asyncCompletionThreadCount" type="uint" defaultValue="0"/>
3232
<attribute name="nodeProcessCountPerApplication" type="uint" defaultValue="1"/>
33-
<attribute name="nodeProcessCommandLine" type="string" expanded="true" defaultValue="&quot;%programfiles(x86)%\nodejs\node.exe&quot;"/>
33+
<attribute name="nodeProcessCommandLine" type="string" expanded="true" defaultValue="&quot;%programfiles%\nodejs\node.exe&quot;"/>
3434
<attribute name="interceptor" type="string" expanded="true" defaultValue="&quot;%programfiles(x86)%\iisnode-express\interceptor.js&quot;" />
3535
<attribute name="maxConcurrentRequestsPerProcess" type="uint" allowInfitnite="true" defaultValue="1024"/>
3636
<attribute name="maxNamedPipeConnectionRetry" type="uint" defaultValue="100"/>

Diff for: src/config/iisnode_schema_x64.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Details at http://learn.iis.net/page.aspx/241/configuration-extensibility/
3030
<attribute name="node_env" type="string" expanded="true" defaultValue="%node_env%"/>
3131
<attribute name="asyncCompletionThreadCount" type="uint" defaultValue="0"/>
3232
<attribute name="nodeProcessCountPerApplication" type="uint" defaultValue="1"/>
33-
<attribute name="nodeProcessCommandLine" type="string" expanded="true" defaultValue="&quot;%programfiles(x86)%\nodejs\node.exe&quot;"/>
33+
<attribute name="nodeProcessCommandLine" type="string" expanded="true" defaultValue="&quot;%programfiles%\nodejs\node.exe&quot;"/>
3434
<attribute name="interceptor" type="string" expanded="true" defaultValue="&quot;%programfiles%\iisnode\interceptor.js&quot;" />
3535
<attribute name="maxConcurrentRequestsPerProcess" type="uint" allowInfitnite="true" defaultValue="1024"/>
3636
<attribute name="maxNamedPipeConnectionRetry" type="uint" defaultValue="100"/>

Diff for: src/setup/iisnode-express-msi/iisnode.wxs

+15-5
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,14 @@
2323

2424
<Property Id="ALLUSERS" Secure="yes"/>
2525

26-
<Property Id="NODEEXE">
27-
<DirectorySearch Id="NodeDir" Path="[ProgramFilesFolder]nodejs">
26+
<Property Id="NODEEXE32">
27+
<DirectorySearch Id="NodeDir32" Path="[ProgramFilesFolder]nodejs">
28+
<FileSearch Name="node.exe" />
29+
</DirectorySearch>
30+
</Property>
31+
32+
<Property Id="NODEEXE64">
33+
<DirectorySearch Id="NodeDir64" Path="[ProgramFiles64Folder]nodejs">
2834
<FileSearch Name="node.exe" />
2935
</DirectorySearch>
3036
</Property>
@@ -47,14 +53,18 @@
4753
<![CDATA[NOT ALLUSERS]]>
4854
</Condition>
4955

50-
<Condition Message="IIS Express 7.x must be installed before iisnode for IIS Express 7.x installation.">
56+
<Condition Message="IIS Express 7.x or later must be installed before iisnode for IIS Express 7.x installation.">
5157
<![CDATA[Installed or APPCMDEXE]]>
5258
</Condition>
5359

54-
<Condition Message="The node.exe is not found at [ProgramFilesFolder]nodejs. IIS cannot serve node.js applications without node.exe. Please run the latest node.js installer from https://github.com/tjanczuk/node/archives/master, then restart this installer.">
55-
<![CDATA[Installed OR NODEEXE]]>
60+
<Condition Message="Node.js x64 is not found in the [ProgramFiles64Folder]\nodejs folder. Please install node.js x64 and restart this installer.">
61+
<![CDATA[VersionNT64 and (Installed OR NODEEXE64)]]>
5662
</Condition>
5763

64+
<Condition Message="Node.js x86 is not found in the [ProgramFilesFolder]\nodejs folder. Please install node.js x86 and restart this installer.">
65+
<![CDATA[NOT(VersionNT64) and (Installed OR NODEEXE32)]]>
66+
</Condition>
67+
5868
<PropertyRef Id="WIX_DIR_COMMON_DOCUMENTS"/>
5969

6070
<Directory Id="TARGETDIR" Name="SourceDir">

Diff for: src/setup/iisnode-msi/customactions.wxi

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,14 @@
108108

109109
<?if $(var.isWin64) = "yes" ?>
110110
<CustomAction Id="AddPermissionsToNodeExeForDefaultIISUser"
111-
ExeCommand="[System64Folder]icacls.exe &quot;[NODEEXE]&quot; /grant IIS_IUSRS:rx"
111+
ExeCommand="[System64Folder]icacls.exe &quot;[NODEEXE64]&quot; /grant IIS_IUSRS:rx"
112112
Directory="TARGETDIR"
113113
Execute="deferred"
114114
Return="check"
115115
Impersonate="no"/>
116116
<?else?>
117117
<CustomAction Id="AddPermissionsToNodeExeForDefaultIISUser"
118-
ExeCommand="[SystemFolder]icacls.exe &quot;[NODEEXE]&quot; /grant IIS_IUSRS:rx"
118+
ExeCommand="[SystemFolder]icacls.exe &quot;[NODEEXE32]&quot; /grant IIS_IUSRS:rx"
119119
Directory="TARGETDIR"
120120
Execute="deferred"
121121
Return="check"

Diff for: src/setup/iisnode-msi/iisnode.wxs

+17-7
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,14 @@
4848

4949
<Property Id="ALLUSERS" Value="1" />
5050

51-
<Property Id="NODEEXE">
52-
<DirectorySearch Id="NodeDir" Path="[ProgramFilesFolder]nodejs">
51+
<Property Id="NODEEXE32">
52+
<DirectorySearch Id="NodeDir32" Path="[ProgramFilesFolder]nodejs">
53+
<FileSearch Name="node.exe" />
54+
</DirectorySearch>
55+
</Property>
56+
57+
<Property Id="NODEEXE64">
58+
<DirectorySearch Id="NodeDir64" Path="[ProgramFiles64Folder]nodejs">
5359
<FileSearch Name="node.exe" />
5460
</DirectorySearch>
5561
</Property>
@@ -66,20 +72,24 @@
6672

6773
<?if $(var.isWin64) = "yes"?>
6874
<Condition Message="Microsoft Visual C++ 2012 Redistributable Package (x64) is required but not installed. Please install it then rerun this installer.">
69-
<![CDATA[INstalled OR VCREDIST2012INSTALLED]]>
75+
<![CDATA[Installed OR VCREDIST2012INSTALLED]]>
7076
</Condition>
7177
<?else?>
7278
<Condition Message="Microsoft Visual C++ 2012 Redistributable Package (x86) is required but not installed. Please install it then rerun this installer.">
73-
<![CDATA[INstalled OR VCREDIST2012INSTALLED]]>
79+
<![CDATA[Installed OR VCREDIST2012INSTALLED]]>
7480
</Condition>
7581
<?endif?>
7682

77-
<Condition Message="IIS 7.x must be installed before iisnode installation.">
83+
<Condition Message="IIS 7.x or later must be installed before iisnode installation.">
7884
<![CDATA[IISMAJORVERSION >= "#7"]]>
7985
</Condition>
8086

81-
<Condition Message="The node.exe is not found at [ProgramFilesFolder]nodejs. IIS cannot serve node.js applications without node.exe. Please run the latest node.js installer from https://github.com/tjanczuk/node/archives/master, then restart this installer.">
82-
<![CDATA[Installed OR NODEEXE]]>
87+
<Condition Message="Node.js x64 is not found in the [ProgramFiles64Folder]\nodejs folder. Please install node.js x64 and restart this installer.">
88+
<![CDATA[Installed OR NOT(VersionNT64) OR NODEEXE64 OR WOW]]>
89+
</Condition>
90+
91+
<Condition Message="Node.js x86 is not found in the [ProgramFilesFolder]\nodejs folder. Please install node.js x86 and restart this installer.">
92+
<![CDATA[Installed OR (VersionNT64 and NOT(WOW)) OR NODEEXE32]]>
8393
</Condition>
8494

8595
<Directory Id="TARGETDIR" Name="SourceDir">

0 commit comments

Comments
 (0)