0

I want to run my script at boot up time in windows 7

I tried

  1. Setup a scheduled task to run at startup - it doesn't run until someone logs in.

  2. Local GP to run script at startup - it doesn't run until someone logs in.

  3. Adding the scheduled task from a command prompt with admin - some time work some time not schtasks /create /tn "start" /sc onstart /delay 0000:30 /rl highest /ru system /tr "powershell.exe -file <>

any other method to this ?

Rima
  • 31
  • 2
  • 4
  • 3
    Possible duplicate of [Run Batch File On Start-up](https://stackoverflow.com/questions/21218346/run-batch-file-on-start-up) – Dwhitz Jun 16 '17 at 11:42
  • 1
    This is more likely to be a superuser related question than a StackOverflow related one. (?) – Clijsters Jun 16 '17 at 12:09

1 Answers1

0

you can make an bat file in your startup folder.

startup.bat whit this content

Powershell -command "& {c:\Temp\Test.ps1}"
Kemal K.
  • 301
  • 2
  • 7