running batch file when user logs in or system start up windows 10

aravind anche
aravind anche used Ask the Experts™
on
Hello,

I have a batch file to run when user logs in.
location: c:\windows\custom

Methods tried: I created a shortcut and placed it in start up folder
Also created task in scheduler

Any suggestions?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
DonNetwork Administrator

Commented:
What is that the batch file does ?

Author

Commented:
it run a reg file and powershell script stored in c:\windows

Those will change the taskbar.
unpin Microsoft edge and pin IE
Top Expert 2016

Commented:
it has to be run on user login not system startup.
by default login scripts wait 5 minutes
Computer Configuration -> Administrative Templates ->  System -> Group Policy -> Configure Login Script Delay = set it to disabled.
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

Author

Commented:
Hello David,

Thanks for the response
I have set that to disabled.
Now i Have the batch file in c:\windows\taskbar.
And the batch file contains command to run reg key and power shell script.
Shall I add that batchfile in
User configuration>scripts>logon
Logon:
Add > scriptname:"path\task.bat"
Do I need to include script parameters(cmd /c)

Regards
Top Expert 2016
Commented:
task.bat / task.cmd should just work

Author

Commented:
Hello David,

Is there any way to change that batch file to run once per user?

Thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial