Backup / Restore startmenu design (Layout)

If you want to backup your startmenu layout you can export using:

1
export-startlayout –path C:\layout.xml

BUT,You can import a Start Menu layout using Group Policy Editor (gpedit). After importing the layout it will be fixed, that is you will not be able to change that layout by moving the tiles around.

or better yet copy it as below.

 

backup:

Files are saved in the location of the script.

1
2
Reg export ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount") ("backup_startmenu.reg") /y
Copy-Item ("$env:LOCALAPPDATA\Microsoft\Windows\Shell\DefaultLayouts.xml") -Destination ("backup_startmenu.xml")

 

restore:

1
2
3
Reg delete ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount") /f
Reg import ("backup_startmenu.reg")
Copy-Item ("backup_startmenu.xml") -Destination ("$env:LOCALAPPDATA\Microsoft\Windows\Shell\DefaultLayouts.xml")

 

All in one menu and options (save as anything.ps1)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#------------------------------------------------------------------------------
# AUTHOR(s):
# Kyle Wadman
# 12/2019
# -----------------------------------------------------------------------------
CLS
$Loop = $true
While ($Loop)
{
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Start | PowerShell Script menu
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
CLS
write-host
write-host +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
write-host "Startmenu backup/restore | -V1.0 Windows 10"
write-host +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
write-host
write-host -ForegroundColor yellow "Your can use the export-startlayout command to complete this task but on importing back into the system,"
write-host -ForegroundColor yellow "your startmenu will be fixed to the exported design. This method doesn't restricted changes after."
write-host
write-host 'PLEASE SELECT AN OPTION '
write-host -ForegroundColor gray '------------------------------------------------'
write-host -ForegroundColor green 'B) BACKUP'
write-host -ForegroundColor gray '------------------------------------------------'
write-host -ForegroundColor cyan 'R) RESTORE'
write-host -ForegroundColor gray '------------------------------------------------'
write-host -ForegroundColor yellow 'X) Exit'
write-host

$opt = Read-Host "Select an option "
write-host $opt
switch ($opt)
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# End of | PowerShell Script menu
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

{
b { #BACKUP SCRIPT
CLS
write-host "Exporting Reg >"; Reg export ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount") ("backup_startmenu.reg") /y
write-host "Collect XML >"; try{Copy-Item ("$env:LOCALAPPDATA\Microsoft\Windows\Shell\DefaultLayouts.xml") -Destination ("backup_startmenu.xml")} #-ErrorAction SilentyContinue
catch{write-host "Failed to find XML"; pause; break}; write-host "The operation completed successfully."
write-host -BackgroundColor yellow -ForegroundColor red " All Done "
pause
}

r { #RESTORE SCRIPT
CLS
write-host "Clean reg >"; Reg delete ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount") /f
write-host "Import reg >"; Reg import ("backup_startmenu.reg")
write-host "Place XML >"; try{Copy-Item ("backup_startmenu.xml") -Destination ("$env:LOCALAPPDATA\Microsoft\Windows\Shell\DefaultLayouts.xml")}
catch{write-host "Failed to Place XML"; pause; break}; write-host "The operation completed successfully."

write-host -BackgroundColor yellow -ForegroundColor red " You now need to logout and back in to see the results. "
pause
}

x{#BYE
CLS
write-host "Goodbye, It was nice to see you today."
exit
}

}
}

 

I did find someone has built this process into an application here.  For coded requirements, you can thank me later.

Maybe for personal backups, check out the software version.

Print Friendly, PDF & Email
  1. No comments yet.

  1. No trackbacks yet.


Warning: Use of undefined constant cs_print_smilies - assumed 'cs_print_smilies' (this will throw an Error in a future version of PHP) in D:\Domains\ibuddy.info\wwwroot\blog\wp-content\themes\monochrome\comments.php on line 185