markos
Posts: 1
Joined: Sun Jun 04, 2023 2:28 pm

Hide/disable button to prevent application running on startup from being disabled

Hello,
I am new to Advanced Installer. Can I prevent a msi application running on startup from being disabled or hidden from a non admin user? In other words I do not want the non admin user to disable app from running on startup
Liviu
Posts: 1042
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Hide/disable button to prevent application running on startup from being disabled

Hello and welcome to our forums,

If a per-machine installation will be performed, then the shortcut will be installed for all users. That means at logon the application will start automatically for any user that logs in onto the machine, since the shortcut is placed in a public (shared) location:

Code: Select all

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup

There are two types of startup folders; a local and a global startup folder. There’s a local startup folder for every user. The apps that a user chooses to launch when they sign in are in this folder. The global startup folder contains apps that will launch at startup for all users. The trick about this folder is that not everyone can add and remove apps from it. Only an administrator can. In order to prevent users from disabling startup apps, you need to add those apps to the global startup folder. This means you just need to have a per-machine installation and the shortcut will be added to the global startup folder.

In order to create the shortcut, you can have a look at the create shortcut article and place it in the Start Menu -> Startup folder from Files and Folders page, in your Advanced Installer project.
startup.png
startup.png (61.01 KiB) Viewed 4414 times

When a standard user logs in and the application has been installed per-machine, he cannot delete the startup shortcut:
denied.png
denied.png (114.48 KiB) Viewed 4414 times

Hope this helps! If you have any other questions, please don’t hesitate to contact us.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”