diff --git a/Build/Common.Build.targets b/Build/Common.Build.targets
index bb5c8a01d..2b18cd261 100644
--- a/Build/Common.Build.targets
+++ b/Build/Common.Build.targets
@@ -133,7 +133,7 @@
Condition="'$(CopyOutputsToPath)' != '' and $(MSBuildProjectExtension) != '.wixproj' and Exists($(TargetPath))">
$(CopyOutputsToPath)\
-
+
@@ -144,7 +144,6 @@
-
diff --git a/Nodejs/Prerequisites/DisableSkipVerification.reg b/Nodejs/Prerequisites/DisableSkipVerification.reg
index e675360b6..ad1b09a64 100644
--- a/Nodejs/Prerequisites/DisableSkipVerification.reg
+++ b/Nodejs/Prerequisites/DisableSkipVerification.reg
@@ -7,6 +7,8 @@ Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.AjaxMin,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Analysis,B03F5F7F11D50A3A]
+[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction,B03F5F7F11D50A3A]
+[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction.CA,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InteractiveWindow,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.NodeLogConverter,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Npm,B03F5F7F11D50A3A]
@@ -42,6 +44,8 @@ Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.AjaxMin,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Analysis,B03F5F7F11D50A3A]
+[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction,B03F5F7F11D50A3A]
+[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction.CA,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InteractiveWindow,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.NodeLogConverter,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Npm,B03F5F7F11D50A3A]
diff --git a/Nodejs/Prerequisites/DisableSkipVerificationX86.reg b/Nodejs/Prerequisites/DisableSkipVerificationX86.reg
index f02e3e5fb..bb15e711c 100644
--- a/Nodejs/Prerequisites/DisableSkipVerificationX86.reg
+++ b/Nodejs/Prerequisites/DisableSkipVerificationX86.reg
@@ -7,6 +7,8 @@ Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.AjaxMin,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Analysis,B03F5F7F11D50A3A]
+[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction,B03F5F7F11D50A3A]
+[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction.CA,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InteractiveWindow,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.NodeLogConverter,B03F5F7F11D50A3A]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Npm,B03F5F7F11D50A3A]
diff --git a/Nodejs/Prerequisites/EnableSkipVerification.reg b/Nodejs/Prerequisites/EnableSkipVerification.reg
index 12e6a3409..154793904 100644
--- a/Nodejs/Prerequisites/EnableSkipVerification.reg
+++ b/Nodejs/Prerequisites/EnableSkipVerification.reg
@@ -7,6 +7,8 @@ Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.AjaxMin,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Analysis,B03F5F7F11D50A3A]
+[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction,B03F5F7F11D50A3A]
+[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction.CA,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InteractiveWindow,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.NodeLogConverter,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Npm,B03F5F7F11D50A3A]
@@ -42,6 +44,8 @@ Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.AjaxMin,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Analysis,B03F5F7F11D50A3A]
+[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction,B03F5F7F11D50A3A]
+[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction.CA,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InteractiveWindow,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.NodeLogConverter,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Npm,B03F5F7F11D50A3A]
diff --git a/Nodejs/Prerequisites/EnableSkipVerificationX86.reg b/Nodejs/Prerequisites/EnableSkipVerificationX86.reg
index addfe82eb..d7ec752f4 100644
--- a/Nodejs/Prerequisites/EnableSkipVerificationX86.reg
+++ b/Nodejs/Prerequisites/EnableSkipVerificationX86.reg
@@ -7,6 +7,8 @@ Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.AjaxMin,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Analysis,B03F5F7F11D50A3A]
+[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction,B03F5F7F11D50A3A]
+[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction.CA,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InteractiveWindow,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.NodeLogConverter,B03F5F7F11D50A3A]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Npm,B03F5F7F11D50A3A]
diff --git a/Nodejs/Prerequisites/generate.js b/Nodejs/Prerequisites/generate.js
index a795051cc..5cc7edb40 100644
--- a/Nodejs/Prerequisites/generate.js
+++ b/Nodejs/Prerequisites/generate.js
@@ -41,7 +41,9 @@ var assemblies = [
'Microsoft.NodejsTools.PressAnyKey',
'Microsoft.NodejsTools.Telemetry.11.0',
'Microsoft.NodejsTools.Telemetry.12.0',
- 'Microsoft.NodejsTools.Telemetry.14.0'
+ 'Microsoft.NodejsTools.Telemetry.14.0',
+ 'Microsoft.NodejsTools.InstallerTelemetryAction.CA',
+ 'Microsoft.NodejsTools.InstallerTelemetryAction'
].sort();
var files = [
diff --git a/Nodejs/Setup/BuildRelease.ps1 b/Nodejs/Setup/BuildRelease.ps1
index c48b72037..5843780cf 100644
--- a/Nodejs/Setup/BuildRelease.ps1
+++ b/Nodejs/Setup/BuildRelease.ps1
@@ -241,7 +241,9 @@ $managed_files = (
"Microsoft.NodejsTools.PressAnyKey.exe",
"Microsoft.NodejsTools.Telemetry.11.0.dll",
"Microsoft.NodejsTools.Telemetry.12.0.dll",
- "Microsoft.NodejsTools.Telemetry.14.0.dll"
+ "Microsoft.NodejsTools.Telemetry.14.0.dll",
+ "Microsoft.NodejsTools.InstallerTelemetryAction.CA.dll",
+ "Microsoft.NodejsTools.InstallerTelemetryAction.dll"
)
$native_files = @()
diff --git a/Nodejs/Setup/InstallerTelemetryAction/CustomAction.config b/Nodejs/Setup/InstallerTelemetryAction/CustomAction.config
new file mode 100644
index 000000000..5a3884082
--- /dev/null
+++ b/Nodejs/Setup/InstallerTelemetryAction/CustomAction.config
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs
new file mode 100644
index 000000000..953ff5a79
--- /dev/null
+++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs
@@ -0,0 +1,129 @@
+//*********************************************************//
+// Copyright (c) Microsoft. All rights reserved.
+//
+// Apache 2.0 License
+//
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+// implied. See the License for the specific language governing
+// permissions and limitations under the License.
+//
+//*********************************************************//
+
+using System;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.Diagnostics;
+using System.Net;
+using System.Text;
+using System.Web.Script.Serialization;
+using System.Globalization;
+using Microsoft.Deployment.WindowsInstaller;
+
+namespace Microsoft.NodejsTools.Telemetry
+{
+ public class InstallerTelemetryActions {
+
+ [CustomAction]
+ public static ActionResult RecordInstallStartTime(Session session) {
+ session["InstallStartTime"] = DateTime.Now.ToString(CultureInfo.InvariantCulture);
+ return ActionResult.Success;
+ }
+
+ [CustomAction]
+ public static ActionResult LogInstallSuccessResult(Session session) {
+ session.Log("Begin Telemetry Log");
+ LogInstallStatus("Success", session);
+ session.Log("End Telemetry Log");
+ return ActionResult.Success;
+ }
+
+ [CustomAction]
+ public static ActionResult LogInstallErrorResult(Session session) {
+ session.Log("Begin Telemetry Log");
+ LogInstallStatus("Error", session);
+ session.Log("End Telemetry Log");
+ return ActionResult.Success;
+ }
+
+ [CustomAction]
+ public static ActionResult LogInstallCancelResult(Session session) {
+ session.Log("Begin Telemetry Log");
+ LogInstallStatus("Cancel", session);
+ session.Log("End Telemetry Log");
+ return ActionResult.Success;
+ }
+
+ private static void LogInstallStatus(string InstallStatus, Session session)
+ {
+ TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]);
+ bool isInstalled = session.EvaluateCondition("Installed");
+ string currentState = null;
+ string requestState = null;
+
+ FeatureInfoCollection featureInfoCollection = session.Features;
+ foreach (FeatureInfo featureInfo in featureInfoCollection)
+ {
+ currentState = featureInfo.CurrentState.ToString("F");
+ requestState = featureInfo.RequestState.ToString("F");
+ // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove.
+ break;
+ }
+ session.Log("Starting POST");
+ Dictionary data = new Dictionary() {
+ {
+ "iKey", "377a3718-78a7-49df-abcc-1001317db729"
+ }, {
+ "name", "Microsoft.ApplicationInsights.Event"
+ }, {
+ "time", DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture)
+ }, {
+ "data", new Dictionary () {
+ {
+ "baseType", "EventData"
+ }, {
+ "baseData", new Dictionary () {
+ {
+ "ver", "2"
+ }, {
+ "name", "NtvsInstallerTelemetry"
+ }, {
+ "properties", new Dictionary () {
+ {
+ "InstallStatus", InstallStatus
+ }, {
+ "IsNtvsInstalled", isInstalled.ToString(CultureInfo.InvariantCulture)
+ }, {
+ "CurrentState", currentState
+ }, {
+ "RequestState", requestState
+ }, {
+ "NtvsVersion", session["NtvsVersion"]
+ }, {
+ "VSVersion", session["VSVersion"]
+ }, {
+ "MsiVersion", session["MsiVersion"]
+ }, {
+ "TimeTakenInSeconds", installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture)
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ string jsonString = (new JavaScriptSerializer()).Serialize(data);
+ using (WebClient client = new WebClient())
+ {
+ string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString);
+ session.Log(response);
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj
new file mode 100644
index 000000000..d7254662b
--- /dev/null
+++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj
@@ -0,0 +1,69 @@
+
+
+
+
+
+ 14.0
+
+
+
+
+ 4.0
+
+
+
+
+ 12.0
+
+
+
+
+ 4.0
+
+
+
+
+ 11.0
+
+
+
+
+ 4.0
+
+
+
+
+
+ Debug
+ AnyCPU
+ 8.0.30703
+ 2.0
+ {775E686D-C646-4DAB-9DCF-D2C37FF8EA78}
+ Library
+ Properties
+ Microsoft.NodejsTools.Telemetry
+ Microsoft.NodejsTools.InstallerTelemetryAction
+ $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.CA.targets
+
+
+ AnyCPU
+
+
+
+
+
+
+
+
+
+ True
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj
index ebc9e50d0..bc0f69cce 100644
--- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj
+++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj
@@ -12,6 +12,10 @@
SAK
SAK
SAK
+
+ $(DefineConstants);
+ ReleaseBuild=$(ReleaseBuild)
+
$(DefineConstants);
IncludeVWDExpress=12.0.30219.0;
@@ -52,6 +56,10 @@
+
+ InstallerTelemetryAction
+ {775e686d-c646-4dab-9dcf-d2c37ff8ea78}
+
InteractiveWindow
{C0D64130-C0E9-4CAB-99BC-68F62357F010}
diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs
index 8ba800483..397075419 100644
--- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs
+++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs
@@ -133,6 +133,10 @@
+
+
+
+
@@ -140,11 +144,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
NOT SKIP_DEVENV_SETUP AND DEVENV_PATH
NOT SKIP_DEVENV_SETUP AND DEVENV_PATH
NOT SKIP_DEVENV_SETUP AND VWDEXPRESS_PATH
NOT SKIP_DEVENV_SETUP AND VWDEXPRESS_PATH
+
+
+
+
+
+
+
NOT Installed
diff --git a/Nodejs/Setup/setup.proj b/Nodejs/Setup/setup.proj
index 867ebe1bb..204fcc0aa 100644
--- a/Nodejs/Setup/setup.proj
+++ b/Nodejs/Setup/setup.proj
@@ -18,9 +18,9 @@
+
-
+
-