i have a simple problem including xp,powershell and scheduled tasks.I have a working script that uses powershell 2.0 and scheduled tasks on win7,all i want is to do the same on windows xp.I installed required frameworks and the script is ready on winxp,but i just couldnt make the scheduled task work.I am giving you the installion bat i used on win7 to automativly add the required scheduled task,and expecting to learn how to schedule it same on winxp.
schtasks /delete /tn "PowerIdle" /F
schtasks /delete /tn "PowerIdleKill" /F
schtasks /delete /tn "PowerIdleSleep" /F
schtasks /create /tn "PowerIdle" /tr "powershell -NonInteractive -WindowStyle Hidden -ExecutionPolicy Bypass -File \"%~dp0power_script.ps1\"" /sc minute /mo 30 /st 00:00
schtasks /run /tn "PowerIdle"
Basically i need the same install above (win7) in win xp scheduled tasks.Powershell script is located in the directory below in my computer.
C:\Documents and Settings\Administrator\Desktop\PowerIdleV3\power_script.ps1
Thanks in advance!
Edit: I found a solution:
1) Add a custom program, select C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe
2) then change the program line to below C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -WindowStyle Hidden -ExecutionPolicy Bypass -File C:\PowerIdleV3\power_script.ps1