From e839d1fdcdcbbd587bfc40f393fc2b03ce5fcd28 Mon Sep 17 00:00:00 2001 From: itiligent <94789708+itiligent@users.noreply.github.com> Date: Wed, 18 Sep 2024 15:26:41 +1000 Subject: [PATCH] change script path to %windir% --- oem/install.bat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/oem/install.bat b/oem/install.bat index 9aae31d..8ff1dbe 100644 --- a/oem/install.bat +++ b/oem/install.bat @@ -34,11 +34,11 @@ echo Set-ItemProperty -Path $profilePath -Name "ProfileName" -Value "Win echo Write-Host "Renamed profile to: WinApps" echo } echo } -) > C:\Windows\NetProfileCleanup.ps1 +) > %windir%\NetProfileCleanup.ps1 :: Create network profile cleanup scheduled task set "taskname=NetworkProfileCleanup" -set "command=powershell.exe -ExecutionPolicy Bypass -File "C:\Windows\NetProfileCleanup.ps1^"" +set "command=powershell.exe -ExecutionPolicy Bypass -File "%windir%\NetProfileCleanup.ps1^"" schtasks /query /tn "%taskname%" >nul 2>&1 if %ERRORLEVEL% equ 0 ( @@ -51,4 +51,4 @@ if %ERRORLEVEL% equ 0 ( echo Scheduled task "%taskname%" created successfully. ) else ( echo Failed to create scheduled task. -) +) \ No newline at end of file