format and add scripts for Windows OS
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
$keepConfigs = @('R_Wikigames_Eng','D_Wikigames_Eng')
|
||||
$keepConfigs = @('R_Wikigames_Eng', 'D_Wikigames_Eng')
|
||||
|
||||
$projects = Get-Project -All
|
||||
|
||||
foreach ($proj in $projects) {
|
||||
Write-Host "Project: $($proj.Name)"
|
||||
Write-Host "Project: $($proj.Name)"
|
||||
|
||||
# ConfigurationManager (DTE)
|
||||
$configMgr = $proj.ConfigurationManager
|
||||
$configNames = $configMgr.ConfigurationRowNames
|
||||
$configMgr = $proj.ConfigurationManager
|
||||
$configNames = $configMgr.ConfigurationRowNames
|
||||
|
||||
foreach ($cfg in $configNames) {
|
||||
# remove config if not in keepConfigs
|
||||
if ($cfg -notin $keepConfigs) {
|
||||
Write-Host "- remove config: $cfg"
|
||||
$configMgr.DeleteConfigurationRow($cfg)
|
||||
}
|
||||
}
|
||||
foreach ($cfg in $configNames) {
|
||||
# remove config if not in keepConfigs
|
||||
if ($cfg -notin $keepConfigs) {
|
||||
Write-Host "- remove config: $cfg"
|
||||
$configMgr.DeleteConfigurationRow($cfg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,17 +3,17 @@ $keepConfig = 'R_Wikigames_Eng'
|
||||
$projects = Get-Project -All
|
||||
|
||||
foreach ($proj in $projects) {
|
||||
Write-Host "Elaborazione progetto: $($proj.Name)"
|
||||
Write-Host "Elaborazione progetto: $($proj.Name)"
|
||||
|
||||
# ConfigurationManager (DTE)
|
||||
$configMgr = $proj.ConfigurationManager
|
||||
$configNames = $configMgr.ConfigurationRowNames
|
||||
# ConfigurationManager (DTE)
|
||||
$configMgr = $proj.ConfigurationManager
|
||||
$configNames = $configMgr.ConfigurationRowNames
|
||||
|
||||
foreach ($cfg in $configNames) {
|
||||
if ($cfg -ne $keepConfig) {
|
||||
# remove config
|
||||
Write-Host "- remove config: $cfg"
|
||||
$configMgr.DeleteConfigurationRow($cfg)
|
||||
}
|
||||
}
|
||||
foreach ($cfg in $configNames) {
|
||||
if ($cfg -ne $keepConfig) {
|
||||
# remove config
|
||||
Write-Host "- remove config: $cfg"
|
||||
$configMgr.DeleteConfigurationRow($cfg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
9
Windows/Create-Shortcut.ps1
Normal file
9
Windows/Create-Shortcut.ps1
Normal file
@@ -0,0 +1,9 @@
|
||||
# WIP
|
||||
|
||||
$SourceFilePath = ""
|
||||
$ShortcutPath = ".lnk"
|
||||
|
||||
$WScriptObj = New-Object -ComObject ("WScript.Shell")
|
||||
$shortcut = $WscriptObj.CreateShortcut($ShortcutPath)
|
||||
$shortcut.TargetPath = $SourceFilePath
|
||||
$shortcut.Save()
|
||||
20
Windows/Explorer/download-folder-disable-groupby.bat
Normal file
20
Windows/Explorer/download-folder-disable-groupby.bat
Normal file
@@ -0,0 +1,20 @@
|
||||
@echo off
|
||||
:: Resets folder view settings, window size and position of all folders
|
||||
Reg Delete "HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU" /F
|
||||
Reg Delete "HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags" /F
|
||||
|
||||
:: To reset "Apply to Folders" views to default for all folder types
|
||||
REG Delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults" /F
|
||||
|
||||
:: To reset size of details, navigation, preview panes to default for all folders
|
||||
Reg Delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Modules\GlobalSettings\Sizer" /F
|
||||
Reg Delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Modules\NavPane" /F
|
||||
|
||||
:: To reset size of Save as amd Open dialogs to default for all folders
|
||||
Reg Delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CIDOpen" /F
|
||||
Reg Delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CIDSave" /F
|
||||
Reg Delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32" /F
|
||||
|
||||
:: To kill and restart explorer process
|
||||
taskkill /F /IM explorer.exe
|
||||
start explorer.exe
|
||||
3
Windows/winxsx-clean-up.bat
Normal file
3
Windows/winxsx-clean-up.bat
Normal file
@@ -0,0 +1,3 @@
|
||||
:: Using the /ResetBase parameter together with the /StartComponentCleanup parameter of DISM.exe on a running version of Windows 10 or later removes all superseded versions of every component in the component store.
|
||||
|
||||
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
|
||||
Reference in New Issue
Block a user