I am trying to created a program that will check for updates then restart the computer and recheck for more updates. I want to know how to restart the application with elevated permission but only ask for permission when the program was first launched.

I am not looking for someone to write the code for me but to help point me in the correct direction so I can learn how to do this and hopefully without a http://lmgtfy.com/?q=b<keyword search>.

There are the simple things you need to follow here.
1st of all, you must know how to check for updates.?
Secondly, you should also know about how you can run your program with windows.
Third, restarting your windows.
As you told you won't need any codes just steps of instruction. i gave you.

Else if you also want code for that then Follow this Steps:
1st.) Updater for your program.
you will need to create a form with progressbar orr anything which will check for update. (Please code it manually, as i don't know for what you want to create updater)

2nd.) Start up with windows.
Here you have to add two things.
i.e. If updater has checked for updates and then you want to restart the app then (please also add program setting (boolean)) by this follow the instruction.
as to start with windows:

Dim startwhenwindowsstarts As Microsoft.Win32.RegistryKey
startwhenwindowsstarts = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True)
startwhenwindowsstarts.SetValue("application name", Application.ExecutablePath)
startwhenwindowsstarts.Close()     

As to remove your program to start with windows:

Dim removefromstartup As Microsoft.Win32.RegistryKey
removefromstartup = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True)
removefromstartup.DeleteValue("application name")
removefromstartup.Close()

3rd.) Restart PC.

shell("shutdown -r -t 10 -c pc,will,restart,after,10,seconds")



s: stands for shutdown
r: stands for restart
l: stands for log off
t: stands for time interval
c: comment/msg

and as to cancel this shell("shutdown -a")

If you are facing problem still then you can say me, I will try to create a tutorial program and show off to you, I will explain you with the comment in the source code

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.