diff --git a/Win10ScriptCLI.ps1 b/Win10ScriptCLI.ps1 index 16104048..5b70a413 100644 --- a/Win10ScriptCLI.ps1 +++ b/Win10ScriptCLI.ps1 @@ -32,7 +32,7 @@ function Main() { Request-AdminPrivilege # Check admin rights Get-ChildItem -Recurse $PSScriptRoot\*.ps*1 | Unblock-File - Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"file-runner.psm1" + Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"open-file.psm1" Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"set-console-style.psm1" Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"set-script-policy.psm1" Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"show-dialog-window.psm1" diff --git a/Win10ScriptGUI.ps1 b/Win10ScriptGUI.ps1 index 18213a66..8f541f7a 100644 --- a/Win10ScriptGUI.ps1 +++ b/Win10ScriptGUI.ps1 @@ -1,4 +1,4 @@ -function Request-AdminPrivilege() { +function Request-AdminPrivilege() { # Used from https://stackoverflow.com/a/31602095 because it preserves the working directory! If (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit } } @@ -1237,7 +1237,7 @@ function Main() { Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"download-web-file.psm1" Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"get-hardware-info.psm1" Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"gui-helper.psm1" - Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"file-runner.psm1" + Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"open-file.psm1" Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"install-software.psm1" Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"set-console-style.psm1" Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"set-script-policy.psm1" diff --git a/src/lib/file-runner.psm1 b/src/lib/open-file.psm1 similarity index 100% rename from src/lib/file-runner.psm1 rename to src/lib/open-file.psm1 diff --git a/src/scripts/optimize-performance.ps1 b/src/scripts/optimize-performance.ps1 index bd5dd8a4..4e42f00c 100644 --- a/src/scripts/optimize-performance.ps1 +++ b/src/scripts/optimize-performance.ps1 @@ -1,4 +1,4 @@ -Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"file-runner.psm1" +Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"open-file.psm1" Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"title-templates.psm1" # Adapted from: https://youtu.be/hQSkPmZRCjc diff --git a/src/scripts/personal-tweaks.ps1 b/src/scripts/personal-tweaks.ps1 index 5fcd0992..ca468daf 100644 --- a/src/scripts/personal-tweaks.ps1 +++ b/src/scripts/personal-tweaks.ps1 @@ -1,4 +1,4 @@ -Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"file-runner.psm1" +Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"open-file.psm1" Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"title-templates.psm1" # Adapted from: https://github.com/ChrisTitusTech/win10script