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
I also added app.manifest to get admin access to application file.
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"
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
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()
Code:
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
On the other hand when I change app.manifest to : "asInvoker"
Code:
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
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