Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15804

VS 2013 Issue with registry editing

$
0
0
Hello everyone,

I am facing an issue with editing in registry. Here are the details.

When computer starts I want to run my application automatically. For this I have a code to edit registry

Code:

                regKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True)
                regKey.SetValue(GlbProjectName, Application.ExecutablePath)
                regKey.Close()

I also added app.manifest to get admin access to application file.

Code:

<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
This code works fine, but the issue is when I compile my application, the app icon gets an small yellow mark showing that the file is an admin level file. which I don't want, also when every time the application runs it ask for "Do you want to allow this app from an unknown publisher to make changes to your device?" so whenever the computer restarts my application does not run automatically every time user has to say "Yes" to run application.

On the other hand when I change app.manifest to : "asInvoker"

Code:

<requestedExecutionLevel level="asInvoker" uiAccess="false" />
now the application behave normally and works fine, but then registry editing does not work, I cannot make my application to run every time when system restarts.

I want some solution that my application runs without asking any thing and also I can edit windows registry settings with full privilege.
I am also comfortable If there is any DLL file which can be called for registry editing or any other option.

Please help me out to find the solution

Thank you
Ladak

Viewing all articles
Browse latest Browse all 15804

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>