Browse Source

remove import-registry and rename helper script to take-own

pull/31/head
Alex Hirsch 9 years ago
parent
commit
2d30e50bfd
  1. 11
      lib/take-own.psm1
  2. 2
      scripts/fix-privacy-settings.ps1
  3. 2
      scripts/optimize-windows-explorer.ps1
  4. 2
      scripts/remove-default-apps.ps1

11
lib/reg-helper.psm1 → lib/take-own.psm1

@ -1,14 +1,3 @@
function Import-Registry($reg) {
# add reg file hander
$reg = "Windows Registry Editor Version 5.00`r`n`r`n" + $reg
# store, import and remove reg file
$regfile = "$env:windir\Temp\registry.reg"
$reg | Out-File $regfile
Start-Process "regedit.exe" -ArgumentList ("/s", "$regfile") -Wait
rm $regfile
}
function Takeown-Registry($key) {
# TODO does not work for all root keys yet
switch ($key.split('\')[0]) {

2
scripts/fix-privacy-settings.ps1

@ -2,7 +2,7 @@
# This script will try to fix many of the privacy settings for the user. This
# is work in progress!
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\reg-helper.psm1
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\take-own.psm1
echo "Elevating priviledges for this process"
do {} until (Elevate-Privileges SeTakeOwnershipPrivilege)

2
scripts/optimize-windows-explorer.ps1

@ -3,7 +3,7 @@
# Exlorer. If you do not want to remove certain user folders comment out the
# corresponding lines below.
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\reg-helper.psm1
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\take-own.psm1
echo "Elevating priviledges for this process"
do {} until (Elevate-Privileges SeTakeOwnershipPrivilege)

2
scripts/remove-default-apps.ps1

@ -2,7 +2,7 @@
# This script removes unwanted Apps that come with Windows. If you do not want
# to remove certain Apps comment out the corresponding lines below.
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\reg-helper.psm1
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\take-own.psm1
echo "Elevating priviledges for this process"
do {} until (Elevate-Privileges SeTakeOwnershipPrivilege)

Loading…
Cancel
Save