WDD-scripts icon indicating copy to clipboard operation
WDD-scripts copied to clipboard

SyncVirtualDesktops Initialization Throws Exception After Latest Windows 11 Update

Open ThisFungus opened this issue 1 year ago • 5 comments

After updating to the latest version of Windows 11 (Version 22H2, OS build 22621.2215), running the PowerShell script that utilizes the SyncVirtualDesktops module throws a type initialization exception for VirtualDesktop.DesktopManager. This disrupts the functionality of managing virtual desktops through the script.

Error Message

WinDynamicDesktop 25-08-23 23-52-28

ThisFungus avatar Aug 25 '23 21:08 ThisFungus

I have the same problem after updating to 22621.2215. I am not a participant of the Insider Program. Is there a chance to solve the problem?

codemaster2837 avatar Aug 29 '23 16:08 codemaster2837

@t1m0thyj Do you have any thoughts on this? Is there an alternative approach that could be undertaken, perhaps by utilizing AutoHotkey? Thank you!

ThisFungus avatar Sep 12 '23 16:09 ThisFungus

I've discovered the workaround! Simply replace the files located in C:\Users[USER]\Documents\WindowsPowerShell\Modules\VirtualDesktop\1.5.3 with these files from this GitHub repository.

ThisFungus avatar Sep 12 '23 16:09 ThisFungus

Instead of manually replacing files you can use Update-Module -Name VirtualDesktop in elevated PowerShell

kubalobo avatar Sep 24 '23 18:09 kubalobo

Hey everybody. Did you find any other solution? It seems that the virtualsync script stopped working since the 1.5.3 version of VirtualDesktop, and we are now in the 1.5.6

Thanks in advance

SnydersGC avatar Feb 11 '24 21:02 SnydersGC