Avatar of aravind anche
aravind anche
Flag for United States of America asked on

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

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?
Windows OS

Avatar of undefined
Last Comment
aravind anche

8/22/2022 - Mon
Don

What is that the batch file does ?
aravind anche

ASKER
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

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.
Your help has saved me hundreds of hours of internet surfing.
fblack61
aravind anche

ASKER
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
ASKER CERTIFIED SOLUTION
David Johnson, CD

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
aravind anche

ASKER
Hello David,

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

Thanks