Hi,
You can create a scheduled task of powershell. Add %SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe
to the "Program/script" field and –NoProfile –ExecutionPolicy Bypass –File X:\path\task.ps1
to the "Add arguments" field. The task.ps1 can be like below. I suppose you want to run notepad
$user='XXXXX'
$password='XXXXX'
$securePassword= ConvertTo-SecureString $password -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential $user, $securePassword
Start-Process -FilePath 'Notepad.exe' -ArgumentList 'C:\temp\a.txt' -Credential $credential
Best Regards,
Ian
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.