-
-
Notifications
You must be signed in to change notification settings - Fork 58
Description
Hi,
First, thanks for this great utility!
It works great when manually started, but I can't get the autostart batchfile to function. It produces the following error on one of my PCs, despite the same copy working perfectly on another. Both are running updated windows 10, and I'm running the batch file as administrator, or from a dos window with admin privileges. I've tried ver 5.48 and 5.49. Any advice? Thanks!
C:\Windows\system32>powershell -ExecutionPolicy Bypass -File "C:\PersistentWindows5.48\auto_start_pw_aux.ps1"
Register-ScheduledTask : The parameter is incorrect.
(9,22):UserId:x570
At C:\PersistentWindows5.48\auto_start_pw_aux.ps1:22 char:1
- Register-ScheduledTask -TaskName $taskName -Action $action -Trigger $ ...
-
+ CategoryInfo : InvalidArgument: (PS_ScheduledTask:Root/Microsoft/...S_ScheduledTask) [Register-Schedule dTask], CimException + FullyQualifiedErrorId : HRESULT 0x80070057,Register-ScheduledTask
Get-ScheduledTask : No MSFT_ScheduledTask objects found with property 'TaskName' equal to
'StartPersistentWindowsx570'. Verify the value of the property and retry.
At C:\PersistentWindows5.48\auto_start_pw_aux.ps1:24 char:9
- $task = Get-ScheduledTask -TaskName $taskName
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : ObjectNotFound: (StartPersistentWindowsx570:String) [Get-ScheduledTask], CimJobException
- FullyQualifiedErrorId : CmdletizationQuery_NotFound_TaskName,Get-ScheduledTask
The property 'ExecutionTimeLimit' cannot be found on this object. Verify that the property exists and can be set.
At C:\PersistentWindows5.48\auto_start_pw_aux.ps1:26 char:1
- $taskSettings.ExecutionTimeLimit = "PT0S" # disable time limit
-
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound
Set-ScheduledTask : Cannot validate argument on parameter 'Settings'. The argument is null or empty. Provide an
argument that is not null or empty, and then try the command again.
At C:\PersistentWindows5.48\auto_start_pw_aux.ps1:27 char:49
- Set-ScheduledTask -TaskName $taskName -Settings $taskSettings
-
~~~~~~~~~~~~~- CategoryInfo : InvalidData: (:) [Set-ScheduledTask], ParameterBindingValidationException
- FullyQualifiedErrorId : ParameterArgumentValidationError,Set-ScheduledTask
Cannot index into a null array.
At C:\PersistentWindows5.48\auto_start_pw_aux.ps1:29 char:1
- $task.Actions[0].Arguments = $arguments
-
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray
Set-ScheduledTask : Cannot validate argument on parameter 'TaskPath'. The argument is null or empty. Provide an
argument that is not null or empty, and then try the command again.
At C:\PersistentWindows5.48\auto_start_pw_aux.ps1:30 char:49
- ... et-ScheduledTask -TaskName $taskName -TaskPath $task.TaskPath -Action ...
-
~~~~~~~~~~~~~~- CategoryInfo : InvalidData: (:) [Set-ScheduledTask], ParameterBindingValidationException
- FullyQualifiedErrorId : ParameterArgumentValidationError,Set-ScheduledTask
The property 'Principal' cannot be found on this object. Verify that the property exists and can be set.
At C:\PersistentWindows5.48\auto_start_pw_aux.ps1:34 char:1
- $task.Principal = $principal
-
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound
Set-ScheduledTask : Cannot validate argument on parameter 'TaskPath'. The argument is null or empty. Provide an
argument that is not null or empty, and then try the command again.
At C:\PersistentWindows5.48\auto_start_pw_aux.ps1:35 char:49
- ... et-ScheduledTask -TaskName $taskName -TaskPath $task.TaskPath -Princi ...
-
~~~~~~~~~~~~~~- CategoryInfo : InvalidData: (:) [Set-ScheduledTask], ParameterBindingValidationException
- FullyQualifiedErrorId : ParameterArgumentValidationError,Set-ScheduledTask
C:\Windows\system32>pause
Press any key to continue . . .