I need my application to start with administrator
privilege. When I do it in app.manifest:
'<requestedExecutionLevel
level="asInvoker" uiAccess="false" />'
to
'<requestedExecutionLevel
level="RequireAdministrator"
uiAccess="false" />'
I can start my application with administrator privilege.
But it starts every time the application starts. I need to
start the application with administrator privilege only once at
the first time of application usage.
Actually, I need to make the application to start with
windows instead of starting manually. So to do that I
used:
'My.Computer.Registry.LocalMachine.OpenSubK
("SOFTWARE\Microsoft\Windows\CurrentVersio
\Run", True).SetValue
(Application.ProductName,
Application.ExecutablePath)'
But it requires administrator privilege else it fails.