Skip to content

Commit

Permalink
change script path to %windir%
Browse files Browse the repository at this point in the history
  • Loading branch information
itiligent committed Sep 18, 2024
1 parent 90b3422 commit e839d1f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions oem/install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -51,4 +51,4 @@ if %ERRORLEVEL% equ 0 (
echo Scheduled task "%taskname%" created successfully.
) else (
echo Failed to create scheduled task.
)
)

0 comments on commit e839d1f

Please sign in to comment.