Jump to content

Settings run as administrator on a shortcut (windows 10)


ddeerr
 Share

Go to solution Solved by ddeerr,

Recommended Posts

Hello,

 I'm trying to set automatically on a shortcut, the option run as administrator.

I found this topic :

and i tried to create the registry Key

RegWrite('HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers', 'C:\Users\dsa\Desktop\autoitDSA\toto.lnk', "REG_SZ", "RUNASADMIN")
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers', 'C:\Users\dsa\Desktop\autoitDSA\toto.lnk', "REG_SZ", "RUNASADMIN"

but it doesn't work. I'm on Windows 10 maybe that's the point ?

Anyway, does someone have something to help me please ? otherwise i think i'll try to do it with some mouse actions.

Thanks

Link to comment
Share on other sites

  • Developers

Is this an x86/x64 issue and are you using AutoIt3.exe to run the  script?
Have you tried adding 64 to the registry key e.g.: HKLM64  ?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

It is a x64, i tried both x32 and x64 compilation with autoit3.exe (the default one with scite ? 3.3.14.2) but it is the same.

I even try to create manually the registry entries (in HKCU and HKLM) in windows, but it stll doesn't work.

Personnal reflexion : maybe i can try to make aregistry comparison after changin it manually, to see where the change applies, i had a software for that before i need to find it.

Link to comment
Share on other sites

  • Developers

What exactly isn't working? Is  it the creation of the registry entry or does the registry entry not have the expected result?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Reading the linked thread, it talks about the EXE not the LNK file

On 3/23/2014 at 3:56 AM, z3r0c00l12 said:

I do this via registry keys.

Although you have to use the target of the .lnk file and not the lnk file itself.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...