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


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?
LVL 13
aravind ancheWindows/Vmware Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DonNetwork AdministratorCommented:
What is that the batch file does ?
aravind ancheWindows/Vmware 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
David Johnson, CD, MVPRetiredCommented:
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.
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

aravind ancheWindows/Vmware 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
Add > scriptname:"path\task.bat"
Do I need to include script parameters(cmd /c)

David Johnson, CD, MVPRetiredCommented:
task.bat / task.cmd should just work

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
aravind ancheWindows/Vmware Author Commented:
Hello David,

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

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.