We help IT Professionals succeed at work.

Shortcut in startup folder wont run

aravind anche
on
143 Views
Last Modified: 2017-04-03
Hello experts,

I created a shortcut in %programdata%\Microsoft\Windows\Start Menu\Programs to run a registry file which is placed in c:\windows.
But when I log in with different user it wont run.
I created that shortcut on virtual machine and captured the image.
I works fine in VM. If i create a new user on VM, It runs good.
After the deployment, The shortcut is there but it wont run.
Comment
Watch Question

CERTIFIED EXPERT

Commented:
Having a *.reg file run when a user logs on can be a useful way of ensuring that users get the latest settings that you want them to have without having to go to each user and manually update their system. However, just adding the *.reg file to the users startup folder won't make the file load it's settings into the registry. You need to create a shortcut to REGEDIT with a set of parameters (which include the *.reg file) to run.

To create the shortcut, right click on your desktop or an empty space in Windows explorer and select New > Shortcut. In the "Type the location of the item" field, add the full command to run your registry file.

regedit /s "C:\My Reg Files\MyRegFile.reg"

Open in new window


Note that the path to the *.reg file is surrounded by quotes to allow the use of spaces, and that I have used the /s switch to run the file without prompting the user.

Click next and type a nice name for you shortcut. You can now move the shortcut into your "All Users" startup folder and the reg file will run silently whenver a user logs on.
aravind ancheWindows/Vmware
CERTIFIED EXPERT

Author

Commented:
Yes
I created a shortcut with regedit /s "C:\windows\File.reg" and copied that shortcut to startup folder
aravind ancheWindows/Vmware
CERTIFIED EXPERT

Author

Commented:
It run good on Image, but after deployment it wont run
CERTIFIED EXPERT

Commented:
If it requires account elevation, it will need to be run as a scheduled task under the system acvount, and triggered by logon... If you need help doing this, lemme know and I'll post a link to a "how to"
aravind ancheWindows/Vmware
CERTIFIED EXPERT

Author

Commented:
Thanks
yes I need please
i will try that too
CERTIFIED EXPERT

Commented:
The article is here:
https://www.howtogeek.com/howto/windows-vista/create-administrator-mode-shortcuts-without-uac-prompts-in-windows-vista/

Although it references Vista, I have used this to schedule tasks in WIN 7 and Win 10...

It is a clever trick and works well!  Just read carefully... It sounds more complex than it is!
aravind ancheWindows/Vmware
CERTIFIED EXPERT

Author

Commented:
that did not work
CERTIFIED EXPERT

Commented:
Another article... might be easier to follow...
https://www.sevenforums.com/tutorials/67503-task-create-run-program-startup-log.html

When you say it didn't work... Are you getting any failure indications?  Is it just not running? Or is it running and not doing what it's supposed to?
aravind ancheWindows/Vmware
CERTIFIED EXPERT

Author

Commented:
Thanks
This post show that I need to log into that account where I want to create a task.
I want to create a task in local account and once deployed it should run for all domain users
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

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