diff --git a/build/nuke_build/Build.cs b/build/nuke_build/Build.cs
index 116ddc07..d2a5f14c 100644
--- a/build/nuke_build/Build.cs
+++ b/build/nuke_build/Build.cs
@@ -1641,14 +1641,29 @@ void UpdatePackagesConfigForCPPProject(string configFilePath)
var arm64 = (zipRoot / "arm64").CreateOrCleanDirectory();
var x64 = (zipRoot / "x64").CreateOrCleanDirectory();
+ var regHelpersLocation = RootDirectory / "src" / "dev-tools" / "reg-helpers";
+
+ var regHelperCmdFileName = "dev-replace-wdmaud2.cmd";
+ var regHelperPs1FileName = "midi-replace-wdmaud2-drv.ps1";
+
+
+ var regHelperCmdFileFullPath = regHelpersLocation / regHelperCmdFileName;
+ var regHelperPs1FileFullPath = regHelpersLocation / regHelperPs1FileName;
+
string driverFile = "wdmaud2.drv";
CopyFile(ApiStagingFolder / "arm64" / driverFile, arm64 / driverFile, FileExistsPolicy.Fail, false);
+ CopyFile(regHelperCmdFileFullPath, arm64 / regHelperCmdFileName, FileExistsPolicy.Fail, false);
+ CopyFile(regHelperPs1FileFullPath, arm64 / regHelperPs1FileName, FileExistsPolicy.Fail, false);
+
+
CopyFile(ApiStagingFolder / "x64" / driverFile, x64 / driverFile, FileExistsPolicy.Fail, false);
+ CopyFile(regHelperCmdFileFullPath, x64 / regHelperCmdFileName, FileExistsPolicy.Fail, false);
+ CopyFile(regHelperPs1FileFullPath, x64 / regHelperPs1FileName, FileExistsPolicy.Fail, false);
- // todo: add takeown / copy scripts
- zipRoot.ZipTo(ThisReleaseFolder / $"wdmaud2-winmm-shim-driver.zip");
+ x64.ZipTo(ThisReleaseFolder / $"wdmaud2-winmm-x64.zip");
+ arm64.ZipTo(ThisReleaseFolder / $"wdmaud2-winmm-arm64.zip");
});
diff --git a/build/staging/version/BundleInfo.wxi b/build/staging/version/BundleInfo.wxi
index b98b29c3..8affee87 100644
--- a/build/staging/version/BundleInfo.wxi
+++ b/build/staging/version/BundleInfo.wxi
@@ -1,4 +1,4 @@
-
+
diff --git a/build/staging/version/WindowsMidiServicesVersion.cs b/build/staging/version/WindowsMidiServicesVersion.cs
index 561f5f67..fc334d04 100644
--- a/build/staging/version/WindowsMidiServicesVersion.cs
+++ b/build/staging/version/WindowsMidiServicesVersion.cs
@@ -6,12 +6,12 @@ public static class MidiBuildInformation
{
public const string Source = "GitHub Preview";
public const string Name = "Customer Preview 2";
- public const string BuildFullVersion = "1.0.3-preview-11.250226-2321";
+ public const string BuildFullVersion = "1.0.3-preview-11.250228-139";
public const string VersionMajor = "1";
public const string VersionMinor = "0";
public const string VersionRevision = "3";
- public const string VersionDateNumber = "250226";
- public const string VersionTimeNumber = "2321";
+ public const string VersionDateNumber = "250228";
+ public const string VersionTimeNumber = "139";
}
}
diff --git a/build/staging/version/WindowsMidiServicesVersion.h b/build/staging/version/WindowsMidiServicesVersion.h
index 848ba9bc..df598710 100644
--- a/build/staging/version/WindowsMidiServicesVersion.h
+++ b/build/staging/version/WindowsMidiServicesVersion.h
@@ -5,12 +5,12 @@
#define WINDOWS_MIDI_SERVICES_BUILD_SOURCE L"GitHub Preview"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_NAME L"Customer Preview 2"
-#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_FULL L"1.0.3-preview-11.250226-2321"
+#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_FULL L"1.0.3-preview-11.250228-139"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_MAJOR L"1"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_MINOR L"0"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_REVISION L"3"
-#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_DATE_NUMBER L"250226"
-#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_TIME_NUMBER L"2321"
+#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_DATE_NUMBER L"250228"
+#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_TIME_NUMBER L"139"
#endif
diff --git a/docs/developer-how-to/developer-prep-settings.png b/docs/developer-how-to/developer-prep-settings.png
new file mode 100644
index 00000000..d800cbdb
Binary files /dev/null and b/docs/developer-how-to/developer-prep-settings.png differ
diff --git a/docs/developer-how-to/how-to-install-development-builds.md b/docs/developer-how-to/how-to-install-development-builds.md
index 06983bab..0765bf89 100644
--- a/docs/developer-how-to/how-to-install-development-builds.md
+++ b/docs/developer-how-to/how-to-install-development-builds.md
@@ -13,43 +13,81 @@ Windows MIDI Services has been designed from the start to be expandible with new
If you are a regular musician, we generally recommend you stick with what is installed in-box in Windows. If, however, you are technically astute, and safe in your computer practices, you can unlock Windows MIDI Services to enable in-development service plugins to be installed, and service settings to be changed.
-> Note: The steps in this file will eventually be replaced by developer-mode settings in the MIDI Settings app.
+## Required: Uninstall any previous developer packages
-## Enable developer mode
+In Settings > Apps > Installed Apps uninstall any previously installed developer packages for Windows MIDI Services.
-In Windows Settings, you must enable developer mode. System > For Developers >
+## Required: Turn on Developer Mode in Windows
-## Install PowerShell 7
+Normally, the service will checked for signed binaries before loading them. If you install the service and then run an application, you will not see any endpoints because no transports have been loaded.
-The scripts require PowerShell 7 or newer. You can install PowerShell [following these instructions](https://learn.microsoft.com/powershell/scripting/install/installing-powershell-on-windows).
+If Developer Mode is turned on in settings, the service skips the check for signing and loads the binaries.
-After installing PowerShell, you need to enable script execution in the Windows Settings app: Settings > System > For Developers > PowerShell.
+Settings > System > For developers > Developer Mode
-
+
+
+# Easiest Way: Use the MIDI Settings App
+
+The easiest way to set up your PC to use developer builds is to use the MIDI Settings app. This is a new feature added on February 28, 2025 and is in testing.
+
+## Install the SDK Runtime and Tools
+
+First, install the SDK and Tools installer, without installing the service installer. This will install the MIDI Settings app.
+
+## Run the MIDI Settings app as Administrator
+
+Next, run the MIDI Settings app **as Administrator**. Depending upon what is already on your system, it may tell you there's no service present. That is fine.
+
+Because you previously enabled developer mode, you will see a **For Developers** page in the app. You will also see "Developer Mode Enabled".
+
+Because you have run this as Administrator, you will see "Administrator" in the title bar, and the buttons under "Install Developer Preview Releases" will be enabled.
+
+
+
+## Prepare for Developer install
+
+Click the button that says "Prepare for Developer Install"
+
+## Run the Service and components installer
-## Take Ownership of the Registry Keys
+When that succeeds, you may run the installer for the Service and components.
-When Windows MIDI Services is included with the in-box install of Windows, the registry keys for the transport plugins and other MIDI Services settings are all protected, and owned by Trusted Installer. This helps prevent malicious apps from adding entries and loading any arbitrary code into the service.
+## Replace wdmaud2
-Developers and those using preview versions of plugins, however, need to be able to write to those keys to add new transports, or change developer settings.
+After the Service and components installer completes, unzip the `wdmaud2` zip file for your processor architecture (Arm64 or x64) to a known location on your PC.
-Each developer release comes with a zip file with two PowerShell scripts and two .cmd files which launch them. The first lists the registry entries for for all the COM components used by the service, as well as the service itself. The second, when run as administrator, will take ownership of the relevant keys allowing the values to be replaced with development versions of components. We recommend this be done only by developers and other more technical users.
+Then click the "Replace wdmaud2.drv ... " button on the developer page.
-Run the two .cmd files from a normal developer command prompt (cmd, not PowerShell), as Administator as follows.
+## Reboot
-### List Registry State
+After the wdmaud2.drv replacement has completed, reboot your PC.
+
+
+# Command-line Way: Use PowerShell Scripts
+
+## Required: Install PowerShell 7+
+
+The scripts require PowerShell 7 or newer. You can install PowerShell [following these instructions](https://learn.microsoft.com/powershell/scripting/install/installing-powershell-on-windows).
+
+After installing PowerShell, you need to enable script execution in the Windows Settings app: Settings > System > For Developers > PowerShell.
+
+
+
+
+## Optional: List Registry State
First, run `list-reg.cmd` to see the current registry values. In-box services and components are all installed in `\Windows\System32`. The pre-release versions of those components are installed in `\Program Files\Windows MIDI Services`
```
-c:\foo\bar> list-reg.cmd
+c:\path\to\utilities\in\zip> list-reg.cmd
```

You can see in this that we have the stock plugins listed as running from `System32`, and no entry for the Network MIDI 2.0 plugin. This is expected for the time when I wrote this article, as Network MIDI 2.0 is/was an in-development preview plugin, not an in-box plugin.
-### Prepare for a Developer Install
+## Required: Prepare for a Developer Install
After validating your current state is the in-box state (this is reverted to this state with each Windows Upgrade, including Insider Builds, as well as with any Windows MIDI Services update), you'll next want to take ownership of the keys.
@@ -59,11 +97,11 @@ Run the `dev-prep.cmd` file from an Administrator command prompt (again, a regul
If you see any errors in the output, stop at this point and investigate. Otherwise, the installers will appear to run fine, but if they do not have permissions to write to the correct registry keys, you won't be using the components you just installed.
-## Install the Developer Packages
+## Required: Install the Developer Packages
-Now you may install all of the developer packages via their installers.
+Now you may install all of the developer packages from the release via their installers.
-## Verify the Installation
+## Recommended: Verify the Installation
Finally, run the `list-reg.cmd` file again to verify that everything is installed in the new locations.
@@ -77,6 +115,14 @@ In some cases, you may want to leave the existing service, but install only a pr
## wdmaud2.drv the WinMM bridge to Windows MIDI Services
-The WinMM compatibility component, `wdmaud2.drv`, is a system-protected file under Windows 11 Resource Protection (WRP). It is possible to take ownership of it using the `takeown` command, but if you replace it, WRP will kick in and put the official version back in place. The mechanisms used to bypass Windows File Protection (WFP) with older versions of Windows do not necessarily apply here.
+Current releases include separate Arm64 and x64 wdmaudi2.drv zip files, with the driver itself as well as a PowerShell script to replace the existing in-box version.
+
+Installing this requires that you are running a Windows Insider Canary build that includes wdmaud2.drv already, and that you are a local Administrator on the PC. You can go through this process at any point, but it's typically run *after* you have already installed the rest of the packages for the release.
+
+1. Unzip the wdmaud2 zip file for your architecture. Then open an Administrator command prompt in the directory which includes the `wdmaud2.drv` file from the zip.
+2. Run `dev-replace-wdmaud2.cmd` from that command prompt
+3. Reboot, and then WinMM support will be in place
+
+## When to do these steps
-[Learn more about Windows Resource Protection](https://learn.microsoft.com/windows/win32/wfp/about-windows-file-protection)
+Each time you have an OS upgrade (not update, but upgrade) from one version of Canary to another, you will need to repeat the above steps.
\ No newline at end of file
diff --git a/docs/developer-how-to/settings-developer-mode.png b/docs/developer-how-to/settings-developer-mode.png
new file mode 100644
index 00000000..32b36990
Binary files /dev/null and b/docs/developer-how-to/settings-developer-mode.png differ
diff --git a/samples/cpp-winrt/basics/client-basics-cpp.vcxproj b/samples/cpp-winrt/basics/client-basics-cpp.vcxproj
index 58288024..095269e7 100644
--- a/samples/cpp-winrt/basics/client-basics-cpp.vcxproj
+++ b/samples/cpp-winrt/basics/client-basics-cpp.vcxproj
@@ -2,7 +2,7 @@
- Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250226-2321
+ Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250228-139
true
true
false
diff --git a/samples/cpp-winrt/basics/packages.config b/samples/cpp-winrt/basics/packages.config
index 471dae37..e48c1a8b 100644
--- a/samples/cpp-winrt/basics/packages.config
+++ b/samples/cpp-winrt/basics/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/samples/cpp-winrt/loopback-endpoints/loopback-endpoints-cpp.vcxproj b/samples/cpp-winrt/loopback-endpoints/loopback-endpoints-cpp.vcxproj
index fce9b470..3a055982 100644
--- a/samples/cpp-winrt/loopback-endpoints/loopback-endpoints-cpp.vcxproj
+++ b/samples/cpp-winrt/loopback-endpoints/loopback-endpoints-cpp.vcxproj
@@ -2,7 +2,7 @@
- Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250226-2321
+ Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250228-139
true
true
true
diff --git a/samples/cpp-winrt/loopback-endpoints/packages.config b/samples/cpp-winrt/loopback-endpoints/packages.config
index 471dae37..e48c1a8b 100644
--- a/samples/cpp-winrt/loopback-endpoints/packages.config
+++ b/samples/cpp-winrt/loopback-endpoints/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/samples/cpp-winrt/send-speed/packages.config b/samples/cpp-winrt/send-speed/packages.config
index 471dae37..e48c1a8b 100644
--- a/samples/cpp-winrt/send-speed/packages.config
+++ b/samples/cpp-winrt/send-speed/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/samples/cpp-winrt/send-speed/send-speed-cpp.vcxproj b/samples/cpp-winrt/send-speed/send-speed-cpp.vcxproj
index 05aaaa49..a24ae671 100644
--- a/samples/cpp-winrt/send-speed/send-speed-cpp.vcxproj
+++ b/samples/cpp-winrt/send-speed/send-speed-cpp.vcxproj
@@ -2,7 +2,7 @@
- Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250226-2321
+ Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250228-139
true
true
true
diff --git a/samples/cpp-winrt/simple-app-to-app-midi/packages.config b/samples/cpp-winrt/simple-app-to-app-midi/packages.config
index 471dae37..e48c1a8b 100644
--- a/samples/cpp-winrt/simple-app-to-app-midi/packages.config
+++ b/samples/cpp-winrt/simple-app-to-app-midi/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/samples/cpp-winrt/simple-app-to-app-midi/simple-app-to-app-cpp.vcxproj b/samples/cpp-winrt/simple-app-to-app-midi/simple-app-to-app-cpp.vcxproj
index 70b87ccd..95cb39ad 100644
--- a/samples/cpp-winrt/simple-app-to-app-midi/simple-app-to-app-cpp.vcxproj
+++ b/samples/cpp-winrt/simple-app-to-app-midi/simple-app-to-app-cpp.vcxproj
@@ -2,7 +2,7 @@
- Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250226-2321
+ Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250228-139
true
true
true
diff --git a/samples/cpp-winrt/static-enum-endpoints/packages.config b/samples/cpp-winrt/static-enum-endpoints/packages.config
index 471dae37..e48c1a8b 100644
--- a/samples/cpp-winrt/static-enum-endpoints/packages.config
+++ b/samples/cpp-winrt/static-enum-endpoints/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/samples/cpp-winrt/static-enum-endpoints/static-enum-endpoints-cpp.vcxproj b/samples/cpp-winrt/static-enum-endpoints/static-enum-endpoints-cpp.vcxproj
index 6e0010df..9ef972b6 100644
--- a/samples/cpp-winrt/static-enum-endpoints/static-enum-endpoints-cpp.vcxproj
+++ b/samples/cpp-winrt/static-enum-endpoints/static-enum-endpoints-cpp.vcxproj
@@ -2,7 +2,7 @@
- Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250226-2321
+ Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250228-139
true
true
true
diff --git a/samples/cpp-winrt/watch-endpoints/packages.config b/samples/cpp-winrt/watch-endpoints/packages.config
index 471dae37..e48c1a8b 100644
--- a/samples/cpp-winrt/watch-endpoints/packages.config
+++ b/samples/cpp-winrt/watch-endpoints/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/samples/cpp-winrt/watch-endpoints/watch-endpoints-cpp.vcxproj b/samples/cpp-winrt/watch-endpoints/watch-endpoints-cpp.vcxproj
index 1bf6b301..31255caa 100644
--- a/samples/cpp-winrt/watch-endpoints/watch-endpoints-cpp.vcxproj
+++ b/samples/cpp-winrt/watch-endpoints/watch-endpoints-cpp.vcxproj
@@ -2,7 +2,7 @@
- Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250226-2321
+ Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250228-139
true
true
true
diff --git a/src/app-sdk/mididiag/mididiag.vcxproj b/src/app-sdk/mididiag/mididiag.vcxproj
index 271a3721..a4875238 100644
--- a/src/app-sdk/mididiag/mididiag.vcxproj
+++ b/src/app-sdk/mididiag/mididiag.vcxproj
@@ -2,7 +2,7 @@
- Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250226-2321
+ Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250228-139
true
true
true
diff --git a/src/app-sdk/mididiag/packages.config b/src/app-sdk/mididiag/packages.config
index b6db04bd..55af489f 100644
--- a/src/app-sdk/mididiag/packages.config
+++ b/src/app-sdk/mididiag/packages.config
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/src/app-sdk/midimdnsinfo/midimdnsinfo.vcxproj b/src/app-sdk/midimdnsinfo/midimdnsinfo.vcxproj
index aefe59e0..d49220f3 100644
--- a/src/app-sdk/midimdnsinfo/midimdnsinfo.vcxproj
+++ b/src/app-sdk/midimdnsinfo/midimdnsinfo.vcxproj
@@ -2,7 +2,7 @@
- Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250226-2321
+ Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250228-139
true
true
true
diff --git a/src/app-sdk/midimdnsinfo/packages.config b/src/app-sdk/midimdnsinfo/packages.config
index b6db04bd..55af489f 100644
--- a/src/app-sdk/midimdnsinfo/packages.config
+++ b/src/app-sdk/midimdnsinfo/packages.config
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/src/app-sdk/midiusbinfo/midiusbinfo.vcxproj b/src/app-sdk/midiusbinfo/midiusbinfo.vcxproj
index 4c74cb72..6123dfad 100644
--- a/src/app-sdk/midiusbinfo/midiusbinfo.vcxproj
+++ b/src/app-sdk/midiusbinfo/midiusbinfo.vcxproj
@@ -2,7 +2,7 @@
- Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250226-2321
+ Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250228-139
true
true
true
diff --git a/src/app-sdk/midiusbinfo/packages.config b/src/app-sdk/midiusbinfo/packages.config
index b6db04bd..55af489f 100644
--- a/src/app-sdk/midiusbinfo/packages.config
+++ b/src/app-sdk/midiusbinfo/packages.config
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/src/app-sdk/tests/Benchmarks/Benchmarks.vcxproj b/src/app-sdk/tests/Benchmarks/Benchmarks.vcxproj
index dcbb100f..9c4ffe32 100644
--- a/src/app-sdk/tests/Benchmarks/Benchmarks.vcxproj
+++ b/src/app-sdk/tests/Benchmarks/Benchmarks.vcxproj
@@ -20,7 +20,7 @@
- Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250226-2321
+ Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250228-139
17.0
{4DABE157-7DD5-422A-8C77-B83EAC9987D0}
Win32Proj
diff --git a/src/app-sdk/tests/Benchmarks/packages.config b/src/app-sdk/tests/Benchmarks/packages.config
index b6db04bd..55af489f 100644
--- a/src/app-sdk/tests/Benchmarks/packages.config
+++ b/src/app-sdk/tests/Benchmarks/packages.config
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/src/app-sdk/tests/InitializationExe/packages.config b/src/app-sdk/tests/InitializationExe/packages.config
index b6db04bd..55af489f 100644
--- a/src/app-sdk/tests/InitializationExe/packages.config
+++ b/src/app-sdk/tests/InitializationExe/packages.config
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/src/app-sdk/tests/InitializationExe/sdkinittest.vcxproj b/src/app-sdk/tests/InitializationExe/sdkinittest.vcxproj
index 8c930f60..cd2b1404 100644
--- a/src/app-sdk/tests/InitializationExe/sdkinittest.vcxproj
+++ b/src/app-sdk/tests/InitializationExe/sdkinittest.vcxproj
@@ -2,7 +2,7 @@
- Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250226-2321
+ Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250228-139
true
true
true
diff --git a/src/app-sdk/tests/Offline.unittests/Offline.unittests.vcxproj b/src/app-sdk/tests/Offline.unittests/Offline.unittests.vcxproj
index c7d2a812..af73a93f 100644
--- a/src/app-sdk/tests/Offline.unittests/Offline.unittests.vcxproj
+++ b/src/app-sdk/tests/Offline.unittests/Offline.unittests.vcxproj
@@ -20,7 +20,7 @@
- Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250226-2321
+ Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250228-139
17.0
{BCAE6353-5F32-4AE8-9949-039A2BC2C8C6}
Win32Proj
diff --git a/src/app-sdk/tests/Offline.unittests/packages.config b/src/app-sdk/tests/Offline.unittests/packages.config
index b6db04bd..55af489f 100644
--- a/src/app-sdk/tests/Offline.unittests/packages.config
+++ b/src/app-sdk/tests/Offline.unittests/packages.config
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/src/app-sdk/tests/SdkInitialization.unittests/SdkInitialization.unittests.vcxproj b/src/app-sdk/tests/SdkInitialization.unittests/SdkInitialization.unittests.vcxproj
index 0ad08629..ef9cf0d9 100644
--- a/src/app-sdk/tests/SdkInitialization.unittests/SdkInitialization.unittests.vcxproj
+++ b/src/app-sdk/tests/SdkInitialization.unittests/SdkInitialization.unittests.vcxproj
@@ -20,7 +20,7 @@
- Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250226-2321
+ Microsoft.Windows.Devices.Midi2.1.0.3-preview-11.250228-139
17.0
{9803D8E6-5CA5-420C-A02B-5E3327355041}
Win32Proj
diff --git a/src/app-sdk/tests/SdkInitialization.unittests/packages.config b/src/app-sdk/tests/SdkInitialization.unittests/packages.config
index b6db04bd..55af489f 100644
--- a/src/app-sdk/tests/SdkInitialization.unittests/packages.config
+++ b/src/app-sdk/tests/SdkInitialization.unittests/packages.config
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/src/app-sdk/winrt/Initialization/MidiClientInitializer.cpp b/src/app-sdk/winrt/Initialization/MidiClientInitializer.cpp
index 17effd13..58f11d90 100644
--- a/src/app-sdk/winrt/Initialization/MidiClientInitializer.cpp
+++ b/src/app-sdk/winrt/Initialization/MidiClientInitializer.cpp
@@ -49,10 +49,6 @@ MidiClientInitializer::Initialize(
});
- // midisrv client initialization. Doesn't actually connect to service here
-
- RETURN_IF_FAILED(CoCreateInstance(__uuidof(Midi2MidiSrvTransport), nullptr, CLSCTX_ALL, IID_PPV_ARGS(&m_serviceTransport)));
-
// SDK initialization
g_runtimeComponentCatalog = std::make_shared();
@@ -292,6 +288,10 @@ MidiClientInitializer::EnsureServiceAvailable() noexcept
);
RETURN_HR_IF(E_UNEXPECTED, !m_initialized);
+
+ // midisrv client initialization. Doesn't actually connect to service here
+ RETURN_IF_FAILED(CoCreateInstance(__uuidof(Midi2MidiSrvTransport), nullptr, CLSCTX_ALL, IID_PPV_ARGS(&m_serviceTransport)));
+
RETURN_HR_IF_NULL(E_UNEXPECTED, m_serviceTransport);
wil::com_ptr_nothrow sessionTracker;
diff --git a/src/dev-tools/reg-helpers/dev-replace-wdmaud2.cmd b/src/dev-tools/reg-helpers/dev-replace-wdmaud2.cmd
new file mode 100644
index 00000000..7f336d9e
--- /dev/null
+++ b/src/dev-tools/reg-helpers/dev-replace-wdmaud2.cmd
@@ -0,0 +1,17 @@
+@echo off
+echo[
+echo ==================================================================================
+echo To run this script, you must have the ability to run local scripts turned on. You
+echo can find this in Settings - System - For Developers - Powershell
+echo[
+echo You also need to run this from an elevated command prompt. Do not just double
+echo click this cmd file.
+echo[
+echo This must be run from a normal Windows command shell. If you are running
+echo PowerShell as your shell, please run the individual commands:
+echo Unblock-File .\midi-replace-wdmaud2-drv.ps1
+echo .\midi-replace-wdmaud2-drv.ps1
+echo ==================================================================================
+echo[
+pwsh -Command Unblock-File .\midi-replace-wdmaud2-drv.ps1
+pwsh .\midi-replace-wdmaud2-drv.ps1
\ No newline at end of file
diff --git a/src/dev-tools/reg-helpers/midi-pre-install-reg-steps.ps1 b/src/dev-tools/reg-helpers/midi-pre-install-reg-steps.ps1
index bfcdd259..e213852b 100644
--- a/src/dev-tools/reg-helpers/midi-pre-install-reg-steps.ps1
+++ b/src/dev-tools/reg-helpers/midi-pre-install-reg-steps.ps1
@@ -106,6 +106,28 @@ if (!([Environment]::Is64BitProcess))
Exit
}
+# Running developer builds requires developer mode be set in Windows, otherwise the service plugins will not load
+$developerMode = 0
+
+$devModeRegPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock"
+$devModePathExists = Test-Path -Path $devModeRegPath
+
+if ($devModePathExists)
+{
+ $regEntry = Get-ItemProperty -Path $devModeRegPath -Name AllowDevelopmentWithoutDevLicense -ErrorAction SilentlyContinue
+ if (regEntry)
+ {
+ $developerMode = $regEntry.AllowDevelopmentWithoutDevLicense
+ }
+}
+
+if ($developerMode -eq 0)
+{
+ Write-Host
+ Write-Host "You must have developer mode turned on in Settings > System > For developers > Developer Mode." -ForegroundColor Red
+ Write-Host
+ Exit
+}
$confirmation = Read-Host "Do you want to continue? (y/n)"
@@ -165,13 +187,6 @@ if ($confirmation -eq 'y' -or $confirmation -eq 'Y')
Write-Host "Midisrv service was not present. No service action taken." -ForegroundColor DarkGray
}
- Write-Host "Taking ownership of wdmaud2.drv..." -ForegroundColor DarkCyan
- cmd.exe /c "takeown /F %windir%\System32\wdmaud2.drv"
- #cmd.exe /c "icacls %windir%\System32\wdmaud2.drv /grant administrators:F"
- Write-Host "wdmaud2.drv is protected by Windows Resource Protection (WRP) and cannot be replaced in public builds without first disabling WRP." -ForegroundColor DarkCyan
-
- Write-Host
- Write-Host "You may now install the development version of the service and plugins." -ForegroundColor Green
}
else
diff --git a/src/dev-tools/reg-helpers/midi-replace-wdmaud2-drv.ps1 b/src/dev-tools/reg-helpers/midi-replace-wdmaud2-drv.ps1
new file mode 100644
index 00000000..9632c802
--- /dev/null
+++ b/src/dev-tools/reg-helpers/midi-replace-wdmaud2-drv.ps1
@@ -0,0 +1,81 @@
+# Modified by Pete Brown from
+# Developed for PowerShell v4.0
+# ** Required Admin privileges **
+# Links:
+# http://shrekpoint.blogspot.ru/2012/08/taking-ownership-of-dcom-registry.html
+# http://www.remkoweijnen.nl/blog/2012/01/16/take-ownership-of-a-registry-key-in-powershell/
+# https://powertoe.wordpress.com/2010/08/28/controlling-registry-acl-permissions-with-powershell/
+
+
+#Requires -RunAsAdministrator
+#Requires -Version 7.0
+
+Write-Host
+Write-Host "Windows MIDI Services wdmaud2.drv replacement script" -ForegroundColor DarkCyan
+Write-Host "=========================================================================" -ForegroundColor DarkGray
+Write-Host "This script is for developers and power users who need to run the latest" -ForegroundColor DarkCyan
+Write-Host "MIDI 1.0 / WinMM backwards compatibility code on a PC which has Windows" -ForegroundColor DarkCyan
+Write-Host "Insider Canary release installed." -ForegroundColor DarkCyan
+Write-Host
+Write-Host "These actions are not easily reversible without reinstalling Windows." -ForegroundColor DarkCyan
+Write-Host
+
+if (!([Environment]::Is64BitProcess))
+{
+ Write-Host
+ Write-Host "This appears to be a 32-bit host. This script must be run from a 64-bit elevated PowerShell 7+ shell." -ForegroundColor Red
+ Write-Host
+ Exit
+}
+
+$confirmation = Read-Host "Do you want to continue? (y/n)"
+
+if ($confirmation -eq 'y' -or $confirmation -eq 'Y')
+{
+ $wdmaud2SourcePath = ".\wdmaud2.drv"
+ $wdmaud2SystemPath = $env:systemroot + "\System32\wdmaud2.drv"
+ $wdmaud2SystemBakPath = $env:systemroot + "\System32\wdmaud2.bak"
+
+ if (!Test-Path -Path wdmaud2SourcePath)
+ {
+ Write-Host "Expected to find the new wdmaud2.drv in this directory, but it was missing. Cannot proceed." -ForegroundColor Red
+ Exit
+ }
+
+ if (Test-Path -Path wdmaud2SystemPath)
+ {
+ Write-Host "Taking ownership of wdmaud2.drv..." -ForegroundColor DarkCyan
+ cmd.exe /c "takeown /F " + $wdmaud2Path
+ cmd.exe /c "icacls " + $wdmaud2Path + " /grant administrators:F"
+
+ Write-Host "Removing any previous backup file..." -ForegroundColor DarkCyan
+
+ if (Test-Path -Path wdmaud2SystemBakPath)
+ {
+ cmd.exe /c "del /F /Q " + $wdmaud2SystemBakPath
+ }
+
+ Write-Host "Renaming existing wdmaud2.drv to wdmaud2.drv.bak..." -ForegroundColor DarkCyan
+ cmd.exe /c "rename " + $wdmaud2SystemPath + " " + $wdmaud2SystemBakPath
+
+ # now copy wdmaud2.drv into System32
+ Write-Host "Copying over the new wdmaud2.drv..." -ForegroundColor DarkCyan
+ cmd.exe /c "xcopy /-I " + $wdmaud2SourcePath + " " + $wdmaud2SystemPath
+
+ Write-Host
+ Write-Host "WinMM backwards compatibility support will be in place after you reboot." -ForegroundColor Yellow
+ }
+ else
+ {
+ # no existing wdmaud2.drv That shouldn't happen
+ Write-Host "No existing wdmaud2.drv found in System32. Is this a Canary Windows Insider release? WinMM will not use Windows MIDI Services." -ForegroundColor Red
+ }
+
+}
+else
+{
+ Write-Host
+ Write-Host "No actions taken" -ForegroundColor Red
+}
+
+
diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/App.xaml.cs b/src/user-tools/midi-settings/Microsoft.Midi.Settings/App.xaml.cs
index 16b01e75..b4f89867 100644
--- a/src/user-tools/midi-settings/Microsoft.Midi.Settings/App.xaml.cs
+++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/App.xaml.cs
@@ -193,10 +193,12 @@ protected async override void OnLaunched(LaunchActivatedEventArgs args)
base.OnLaunched(args);
// initialize the SDK
- if (AppState.Current.Initialize())
+ if (AppState.Current.InitializeSdk())
{
- await App.GetService().ActivateAsync(args);
+ // this is not required for app startup
+ AppState.Current.InitializeService();
+ await App.GetService().ActivateAsync(args);
}
else
{
diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Controls/MidiEndpointDeviceListItemControl.xaml b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Controls/MidiEndpointDeviceListItemControl.xaml
index 86418471..7231ea0a 100644
--- a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Controls/MidiEndpointDeviceListItemControl.xaml
+++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Controls/MidiEndpointDeviceListItemControl.xaml
@@ -24,6 +24,7 @@
diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Microsoft.Midi.Settings.csproj b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Microsoft.Midi.Settings.csproj
index e3591afe..5d594a51 100644
--- a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Microsoft.Midi.Settings.csproj
+++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Microsoft.Midi.Settings.csproj
@@ -109,6 +109,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Models/AppState.cs b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Models/AppState.cs
index 22c82022..5747e117 100644
--- a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Models/AppState.cs
+++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Models/AppState.cs
@@ -20,13 +20,19 @@ public class AppState
private static AppState? _current;
private MidiDesktopAppSdkInitializer? _initializer;
+ private bool _serviceInitialized = false;
private AppState()
{
}
- public bool Initialize()
+ public bool IsServiceInitialized()
+ {
+ return _serviceInitialized;
+ }
+
+ public bool InitializeSdk()
{
_initializer = Microsoft.Windows.Devices.Midi2.Initialization.MidiDesktopAppSdkInitializer.Create();
@@ -40,21 +46,35 @@ public bool Initialize()
if (!_initializer!.InitializeSdkRuntime())
{
// TODO: Localize these messages
- var dialog = new MessageDialog("Unable to initialize the Windows MIDI Services SDK runtime. Is it installed? Exiting.");
- dialog.ShowAsync().Wait();
+ //var dialog = new MessageDialog("Unable to initialize the Windows MIDI Services SDK runtime. Is it installed? Exiting.");
+ //dialog.ShowAsync().Wait();
return false;
}
+ return true;
+ }
+
+ public bool InitializeService()
+ {
+ if (_initializer == null)
+ {
+ // TODO: Failed
+ return false;
+
+ }
+
if (!_initializer!.EnsureServiceAvailable())
{
// TODO: Localize these messages
- var dialog = new MessageDialog("The Windows MIDI Services SDK is installed, but we failed to start the service. Exiting.");
- dialog.ShowAsync().Wait();
+ //var dialog = new MessageDialog("The Windows MIDI Services SDK is installed, but we failed to start the service.");
+ //dialog.ShowAsync().Wait();
return false;
}
+ _serviceInitialized = true;
+
StartDeviceWatcher(true);
return true;
diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/NativeMethods.txt b/src/user-tools/midi-settings/Microsoft.Midi.Settings/NativeMethods.txt
new file mode 100644
index 00000000..93f18795
--- /dev/null
+++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/NativeMethods.txt
@@ -0,0 +1,4 @@
+FileOpenDialog
+IFileOpenDialog
+CoCreateInstance
+RtlAdjustPrivilege
\ No newline at end of file
diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/DeviceDetailPage.xaml b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/DeviceDetailPage.xaml
index 6cd409a9..896ec1cc 100644
--- a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/DeviceDetailPage.xaml
+++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/DeviceDetailPage.xaml
@@ -102,6 +102,7 @@
@@ -143,6 +144,7 @@
@@ -190,6 +192,7 @@
@@ -237,6 +240,7 @@
@@ -361,6 +365,7 @@
@@ -469,6 +474,7 @@
diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/LOOP/EndpointsLoopPage.xaml b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/LOOP/EndpointsLoopPage.xaml
index 5433b147..5b97f876 100644
--- a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/LOOP/EndpointsLoopPage.xaml
+++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/LOOP/EndpointsLoopPage.xaml
@@ -43,7 +43,7 @@
-
+
diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Strings/en-us/Resources.resw b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Strings/en-us/Resources.resw
index 2a7944e3..39d623ed 100644
--- a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Strings/en-us/Resources.resw
+++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Strings/en-us/Resources.resw
@@ -471,4 +471,35 @@
Save to Registry
+
+ Enable Installation of Developer Releases
+
+
+ In order to install developer previews of the service or service components/plugins, you must first take ownership of the registry entries which are used for component registration. If you do not do this first, the install will appear to work, but the components used will not be the ones you expect.
+
+This step requires Administrator rights, and must be repeated after any new Windows upgrade (not update, but full OS upgrade).
+
+THIS FEATURE IS CURRENTLY IN PREVIEW/TESTING
+
+
+ Prepare for Developer Install
+
+
+ Replace wdmaud2.drv with Developer Version
+
+
+ Changes made require that you restart your PC before they can take effect.
+
+
+ Restart Now
+
+
+ Administrator
+
+
+ Developer Mode Enabled
+
+
+ No MIDI Service
+
\ No newline at end of file
diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Styles/TextBlock.xaml b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Styles/TextBlock.xaml
index 729590fc..8496142f 100644
--- a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Styles/TextBlock.xaml
+++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Styles/TextBlock.xaml
@@ -63,6 +63,7 @@