@@ -161,7 +161,6 @@ Start-Log -FilePath "$env:LocalAppData\AdminMenu\Logs\$(Get-Date -Format yyyyMMd
161161# # Variables: Script Name and Script Paths
162162[string ]$scriptPath = $MyInvocation.MyCommand.Definition
163163[string ]$scriptName = [IO.Path ]::GetFileNameWithoutExtension($scriptPath )
164- [string ]$scriptFileName = Split-Path - Path $scriptPath - Leaf
165164[string ]$scriptRoot = Split-Path - Path $scriptPath - Parent
166165[string ]$invokingScript = (Get-Variable - Name ' MyInvocation' ).Value.ScriptName
167166
@@ -181,17 +180,17 @@ Else {
181180[string ]$XamlPath = Join-Path - Path $scriptRoot - ChildPath ' Resources'
182181[string ]$ModulesPath = Join-Path - Path $scriptRoot - ChildPath ' Modules'
183182[string ]$UtilPath = Join-Path - Path $scriptRoot - ChildPath ' Utilities'
183+ [string ]$ConfigPath = Join-Path - Path $scriptRoot - ChildPath ' Configs'
184+ [string ]$MenuScriptsPath = Join-Path - Path $scriptRoot - ChildPath ' Scripts'
184185
185186# When Using Executable Command Line
186187If ($ConfigCommandLine ){
187188 [string ]$ConfigFile = Join-Path - Path $scriptRoot - ChildPath $ConfigCommandLine
188189}
189190Else {
190- [string ]$ConfigFile = Join-Path - Path $scriptRoot - ChildPath ' AdminMenu.ps1.config'
191+ [string ]$ConfigFile = Join-Path - Path $ConfigPath - ChildPath ' AdminMenu.ps1.config'
191192}
192- [string ]$NameFile = Join-Path - Path $scriptRoot - ChildPath ' AdminMenu.ps1.names'
193-
194- [string ]$appAuthor = ' Richard Tracy'
193+ [string ]$NameFile = Join-Path - Path $ConfigPath - ChildPath ' AdminMenu.prereqs'
195194# =======================================================
196195# PARSE CONFIG FILE
197196# =======================================================
@@ -206,6 +205,7 @@ Else{
206205[Xml.XmlElement ]$xmlMenuOptions = $xmlConfig.Menu_Options
207206[boolean ]$AppOptionRequireAdmin = [boolean ]::Parse($xmlMenuOptions.Option_RequireAdmin )
208207[boolean ]$AppOptionRSATCheck = [boolean ]::Parse($xmlMenuOptions.Option_RSATCheck )
208+ [boolean ]$AppPrereqCheck = [boolean ]::Parse($xmlMenuOptions.Option_PrereqCheck )
209209[boolean ]$AppOptionDebugeMode = [boolean ]::Parse($xmlMenuOptions.Option_DebugMode )
210210[string ]$AppOptionAccent = $xmlMenuOptions.Option_Accent
211211[string ]$AppOptionTheme = $xmlMenuOptions.Option_Theme
@@ -224,8 +224,8 @@ Else{
224224
225225# check if remote config will be used and path is accessible
226226If (($AppUseRemoteConfig ) -and (Test-Path $AppRemotePath ) -and (! $ForceLocal )){
227- [string ]$remoteConfig = Join-Path - Path $AppRemotePath - ChildPath ' AdminMenu.ps1.config' - ErrorAction SilentlyContinue
228- [string ]$remoteNames = Join-Path - Path $AppRemotePath - ChildPath ' AdminMenu.ps1.names ' - ErrorAction SilentlyContinue
227+ [string ]$remoteConfig = Join-Path - Path $AppRemotePath - ChildPath ' \Configs\ AdminMenu.ps1.config' - ErrorAction SilentlyContinue
228+ [string ]$remoteNames = Join-Path - Path $AppRemotePath - ChildPath ' \Configs\ AdminMenu.prereqs ' - ErrorAction SilentlyContinue
229229 If (-not (Test-Path $remoteConfig - ErrorAction SilentlyContinue) -and (-not (Test-Path $remoteNames - ErrorAction SilentlyContinue)) ){
230230 If ($AppOptionDebugeMode ){Write-Log - Message " Remote config files were not found at: $AppRemotePath ; local config will be processed instead" - Severity 2 - OutputHost}
231231 [boolean ]$AppUseRemoteConfig = $False
0 commit comments