Schtasks permission error for admin user?

I know this has been asked differently several times, but nothing helped me in my particular case.

All of this is done on a Windows 7 Home Premium desktop computer via the Windows Command Prompt. I was trying to create a simple batch program using schtasks to automatically open a bunch of programs on my login. However, when I try to create a task, it says that access is denied for my batch file.

    schtasks /create /tn Startup /tr "C:\ComputerStartup.bat" /sc onlogin
    ERROR: Access is denied.

      

So, I tried my authentication (I run it as admin user).

    schtasks /create /s Jackson-HP /u Jackson /sc onlogon /tn Startup /tr C:\ComputerStartup.bat

      

He asked for a password for my user. I don't have a password for my computer, so I just hit enter and it said:

    ERROR: User credentials are not allowed on the local machine.

      

I'm not sure how to fix this. I'm still new to creating batch files, so I might be making the beginner's mistake. I appreciate any help you can give, thanks.

+3


source to share


4 answers


Try using an elevated command prompt (admin) and use the / ru command line switch instead of / u. Use / rp if you also want to provide a password.



+8


source


This is an old question, so you probably got it or moved on, but my understanding is that schtasks won't work with an account that doesn't have a password.



0


source


I know this is an old problem here, but there are no solutions and I found that this is strictly a bug in schtasks.exe

I found a weird workaround / trick using Hosts. file (!) though.

See https://eskerahn.dk/wordpress/?p=2724

I've only tried with / Query but would be surprised if it didn't handle the others

Some * * CENSORED * * somewhere seemed to have the (wrong) idea that you will never need to access your local machine with higher credentials than when you log in interactively ....

0


source


I had this problem and solved it by recreating the scheduled task (via export and import). It seems that if the user running the program is not the "author" of the task, he will throw an "Access Denied" error.

0


source







All Articles