We help IT Professionals succeed at work.

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

aravind anche
on
122 Views
Last Modified: 2018-02-22
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

DonNetwork Administrator
CERTIFIED EXPERT

Commented:
What is that the batch file does ?
aravind ancheWindows/Vmware
CERTIFIED EXPERT

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, CDSimple Geek from the '70s
CERTIFIED EXPERT
Distinguished Expert 2019

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.
aravind ancheWindows/Vmware
CERTIFIED EXPERT

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
Simple Geek from the '70s
CERTIFIED EXPERT
Distinguished Expert 2019
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
aravind ancheWindows/Vmware
CERTIFIED EXPERT

Author

Commented:
Hello David,

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

Thanks

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions