diff --git a/Visual Studio/Package Management Console/Remove-Config-multiple.ps1 b/Visual Studio/Package Management Console/Remove-Config-multiple.ps1 index 59fade3..c771693 100644 --- a/Visual Studio/Package Management Console/Remove-Config-multiple.ps1 +++ b/Visual Studio/Package Management Console/Remove-Config-multiple.ps1 @@ -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) + } + } } diff --git a/Visual Studio/Package Management Console/Remove-Config.ps1 b/Visual Studio/Package Management Console/Remove-Config.ps1 index 0e6eaf2..73662f1 100644 --- a/Visual Studio/Package Management Console/Remove-Config.ps1 +++ b/Visual Studio/Package Management Console/Remove-Config.ps1 @@ -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) + } + } } diff --git a/Windows/Create-Shortcut.ps1 b/Windows/Create-Shortcut.ps1 new file mode 100644 index 0000000..6566478 --- /dev/null +++ b/Windows/Create-Shortcut.ps1 @@ -0,0 +1,9 @@ +# WIP + +$SourceFilePath = "" +$ShortcutPath = ".lnk" + +$WScriptObj = New-Object -ComObject ("WScript.Shell") +$shortcut = $WscriptObj.CreateShortcut($ShortcutPath) +$shortcut.TargetPath = $SourceFilePath +$shortcut.Save() \ No newline at end of file diff --git a/Windows/Explorer/download-folder-disable-groupby.bat b/Windows/Explorer/download-folder-disable-groupby.bat new file mode 100644 index 0000000..30f6c02 --- /dev/null +++ b/Windows/Explorer/download-folder-disable-groupby.bat @@ -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 \ No newline at end of file diff --git a/Windows/winxsx-clean-up.bat b/Windows/winxsx-clean-up.bat new file mode 100644 index 0000000..defb3d7 --- /dev/null +++ b/Windows/winxsx-clean-up.bat @@ -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 \ No newline at end of file