ddeerr

Settings run as administrator on a shortcut (windows 10)

7 posts in this topic

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


MsgBox(0, "Steven Seagal", "Les poches bourrées de Pesos")

Share this post


Link to post
Share on other sites



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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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.


MsgBox(0, "Steven Seagal", "Les poches bourrées de Pesos")

Share this post


Link to post
Share on other sites

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

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

the expected result :)


MsgBox(0, "Steven Seagal", "Les poches bourrées de Pesos")

Share this post


Link to post
Share on other sites

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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Ah yes sorry.

But i need to do it on a link. i search more thanks.


MsgBox(0, "Steven Seagal", "Les poches bourrées de Pesos")

Share this post


Link to post
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