-
Aug 18th, 2017, 07:11 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] How to add App to run at startup Programmatically(Without Admin Rights)
Hi All,
I have been googling and I'm not able to find an easy way to allow users to add my app to run at startup.
Is there an easy way?
-NJ
Last edited by NJDevils28; Aug 18th, 2017 at 09:25 AM.
Lo And Behold
This is my first Microsoft App Submission
Your opinion of it would be appreciated
-
Aug 18th, 2017, 07:20 AM
#2
Re: Hoa to add App to run at startup Programmatically
There is a Registry key that you can add the path of your app to to have it run at startup.
https://www.bing.com/search?q=vb.net...&setlang=en-GB
-
Aug 18th, 2017, 08:27 AM
#3
Thread Starter
Hyperactive Member
Re: Hoa to add App to run at startup Programmatically
Originally Posted by jmcilhinney
Thank you for that, I did not find it for some reason with my searches. That's actually pretty easy and straight forward!
But...My Apologies.
My Question should have been is there a way to do this without running as Admin? I know that I could give them a pop-up with detailed instructions on how to add the app to the startup directory. But I was hoping to just have them click a button.
Thank you in advance.
-NJ
Lo And Behold
This is my first Microsoft App Submission
Your opinion of it would be appreciated
-
Aug 18th, 2017, 10:05 AM
#4
Re: How to add App to run at startup Programmatically(Without Admin Rights)
You can to the Run key under HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER but you probably need admin rights in both cases. The other option is to create a shortcut file and place it in the user's Startup folder. That's a bit of a pain because you have to use unmanaged code to create the shortcut.
-
Aug 18th, 2017, 12:31 PM
#5
Thread Starter
Hyperactive Member
Re: How to add App to run at startup Programmatically(Without Admin Rights)
You are correct on both counts it seems.
I tried the shortcut method and it's not straightforward. Using the MS tutorials messed up all my File.IO code so I scrapped it.
I may have to supply a pop-up with the run directory and instructions on how to add the shortcut.
Thanks for your attention to this JMC!
-NJ
Lo And Behold
This is my first Microsoft App Submission
Your opinion of it would be appreciated
-
Jul 21st, 2019, 08:00 AM
#6
Lively Member
Re: Hoa to add App to run at startup Programmatically
Originally Posted by jmcilhinney
I have applied this to my app, however, the application requires administrator privileges and every time at startup, the UAC is prompted for my program. How would I go about fixing this? More specifically, I am trying to keep it running as administrator, but not require a prompt.
I read your comment from "Re: Start with windows (System Tray ONLY) "
Which is exactly what I need. I am not sure if I am going about the right way of doing this, but this is the code I am using to try to make this possible, is the the most efficient?
vb.net Code:
Dim CMDsent As String = Command$() If Not CMDsent = "" Then 'Insert Command End If
Last edited by kshadow22; Jul 21st, 2019 at 08:44 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|