Quantcast
Channel: Windows Desktop Development for Accessibility and Automation forum
Viewing all articles
Browse latest Browse all 585

Powershell scripting the Windows 10 Export-StartLayout during logoff to effectively roam the StartLayout between computers

$
0
0

Originally posted here: 

https://social.technet.microsoft.com/Forums/scriptcenter/en-US/6ab0e83d-2d52-4e96-a9d3-68c9300f4e04/powershell-scripting-the-exportstartlayout-during-logoff-to-effectively-roam-the-startlayout?forum=ITCG

Can anyone tell me how to make it work during logoff? Maybe there is a way to tell my powershell script to log back in as a console only app to run export-layout and then log back out? Maybe a way to get the application that serves the .Net calss to work during logoff?

I halve already tried:

  • Using GPO to prevent the registry from detaching during initial logoff

Computer Configuration->Administrative Templates->System-> UserProfiles 

Do not forcefully unload the user registry at user logoff

https://blogs.msdn.microsoft.com/distributedservices/2009/11/06/a-com-application-may-stop-working-on-windows-server-2008-when-the-identity-user-logs-off/

  • Using regasm to make sure the .Net GAC StartLayout dll is registered

    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Windows.StartLayout.Commands\v4.0_10.0.0.0__31bf3856ad364e35\Microsoft.Windows.StartLayout.Commands.dll /tlb
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Windows.StartLayout.Commands.Resources\v4.0_10.0.0.0_en_31bf3856ad364e35\Microsoft.Windows.StartLayout.Commands.Resources.dll /tlb
    C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Windows.StartLayout.Commands\v4.0_10.0.0.0__31bf3856ad364e35\Microsoft.Windows.StartLayout.Commands.dll /tlb
    C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Windows.StartLayout.Commands.Resources\v4.0_10.0.0.0_en_31bf3856ad364e35\Microsoft.Windows.StartLayout.Commands.Resources.dll /tlb

  • Tried changing the permissions on the RuntimeBroker

https://blogs.msdn.microsoft.com/emeadaxsupport/2010/01/26/unable-to-edit-the-dcom-settings-for-iis-wamreg-admin-service-on-a-windows-server-2008-r2-when-trying-to-configure-kerberos-authentication-for-role-centers/ :
Changed owner to local admins on HKEY_CLASSES_ROOT\AppID\{9CA88EE3-ACB7-47c8-AFC4-AB702511C276} and added full control for local admins
Using Component Services\DCOM Config\RuntimeBroker added allow all for everyone and identity "the launching user".


Here is the error:

Export-StartLayout : Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
At C:\Windows\System32\GroupPolicy\RoamStartTiles.ps1:52 char:1+ Export-StartLayout -Path $RoamStartTilesXMLPath+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo          : NotSpecified: (:) [Export-StartLayout], COMException+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.Windows.StartLayout.Commands.Exp
   ortStartLayoutCommand


Viewing all articles
Browse latest Browse all 585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>