Add "Run as Administrator" for AutoHotkey Scripts in Windows 7 or Vista Adauga "a alerga as Administrator" pentru script-uri AutoHotkey în Windows 7 sau Vista
As regular readers know well, I'ma huge fan of using AutoHotkey to automate my entire computing experience… but in Windows 7 and Vista there's a serious limitation since you can't run a script as Administrator by default. După cum cititorii regulate cunosc bine, sunt un mare fan al folosind AutoHotkey pentru a automatiza experienţa mea intreaga de calcul ... dar în Windows 7 şi Vista există o limitare serios, deoarece nu poţi rula un script as Administrator în mod implicit. This means that your hotkeys can't interact with windows running in Admin mode… so how do we get around this? Acest lucru înseamnă că Hotkeys dvs. nu poate interacţiona cu ferestre execută în modul de administrare ... asa cum ajungem în jurul asta?
There are three solutions to this problem: Există trei soluţii la această problemă:
- Completely Disable UAC – Not the best solution for security purposes, but Complet fi de acord UAC - Nu este cea mai bună soluţie pentru motive de securitate, dar it works it works . .
- Compile your script to an executable. Compilaţi script-ul de la un executabil.
- Hack the registry and add “Run as Administrator” to the context menu. Hack registru şi se adaugă "a alerga as Administrator" la meniul de context.
Compile Script as Executable Compilaţi Script ca Executable
All you have to do is right-click on the script, choose “Compile Script”… Tot ce trebuie să faceţi este să faceţi clic dreapta pe script-ul, alege "Compilare Script" ...

And now you can run the executable version as administrator: Şi acum aveţi posibilitatea să executaţi versiunea executabil in calitate de administrator:

This isn't the perfect solution, however. Acest lucru nu este soluţia perfectă, cu toate acestea. I edit my script all the time, so having to recompile each time I make an edit… would get annoying. Am edita script-ul meu tot timpul, astfel încât în vedere recompilaţi de fiecare dată când am face o edita ... s-ar obţine enervant.
Manual Registry Hack for AutoHotkey “Run as Administrator” Manual de registru hack pentru AutoHotkey "a alerga as Administrator"
Open up regedit through the start menu search or run box, and then browse down to the following key: Deschide regedit, prin intermediul de căutare meniul Start sau caseta de a alerga, apoi răsfoiţi până la următoarea cheie:
HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell HKEY_CLASSES_ROOT \ AutoHotkeyScript \ Shell

Right-click on “Shell” on the left-hand side and create a new key called “runas”, then create a key called “Command” below it. Faceţi clic dreapta pe "Shell" de pe partea stângă şi de a crea o nouă cheie numit "runas", apoi creaţi o cheie numit "Command" de sub el. Then create or set the following two values on the right-hand side, adjusting the path if necessary. Apoi, a crea sau pentru a seta următoarele două valori de pe partea dreaptă, de adaptare a calea, dacă este necesar.
| Name Nume | Value Valoarea |
| (Default) (Default) | “C:\Program Files\AutoHotkey\AutoHotkey.exe” “%1″ %* "" C: \ Program Files \ AutoHotkey \ AutoHotkey.exe ""% 1 "% * |
| IsolatedCommand IsolatedCommand | “C:\Program Files\AutoHotkey\AutoHotkey.exe” “%1″ %* "" C: \ Program Files \ AutoHotkey \ AutoHotkey.exe ""% 1 "% * |
The default key should already be there, just need to set the value. -Cheie implicit ar trebui să fie deja acolo, chiar nevoie pentru a seta valoarea.
Now when you right-click on an AutoHotkey script, you'll see the option to Run as Administrator: Acum, când faceţi clic dreapta pe un script de AutoHotkey, veţi vedea opţiunea de a alerga as Administrator:

Download Registry Hack Descărcaţi registru hack
Download, extract, and double-click on the AdminAutoHotkey.reg to enter the information into the registry. Download, extract, şi faceţi dublu-clic pe AdminAutoHotkey.reg pentru a introduce informaţii în registru. There's also a removal script included. Există, de asemenea, un script de ştergere incluse.
Note that this registry hack will only work if you installed AutoHotkey into the default location, otherwise you'll have to modify the paths. Reţineţi că acest registru hack va funcţiona numai dacă aţi instalat AutoHotkey în locaţia implicită, altfel vei avea de a modifica căi.
Download AdminAutoHotkey Registry Hack Descarca AdminAutoHotkey registru hack

Daily Email Updates Daily Actualizări de email
You can get our how-to articles in your inbox each day for free. Aveţi posibilitatea să obţineţi modul nostru de-a articole în Inbox în fiecare zi pentru drum liber. Just enter your name and email below: Doar introduceţi numele dvs. şi e-mail de mai jos:



I think as long as the shell key is named “runas” Vista assumes the command in the default value is to be run with Administrator privileges and the “IsolatedCommand” value isn't needed. Cred că atâta timp cât cheie shell este numit "runas" Vista îşi asumă comandă din valoarea implicită este de a fi rulat cu privilegii de administrator şi "IsolatedCommand" valoare nu mai este necesară.
I based that registry structure on some existing MS keys… I, pe baza ca structura de registry pe anumite chei existente MS ...
I tested and it doesn't seem to be necessary but it's possible it's used somewhere else that I'm unaware of at this point, so I included it for consistency. Am testat şi nu pare a fi necesară, dar este posibil acesta este folosit în altă parte că am cunoştinţă de la acest punct, asa ca am inclus-o pentru consecvenţă.
Interesting. Interesant. I based my comment on findings of the HKCR\batfile\shell\runas\command key not having that value and that using a key like that worked for other things like VBS files too. I, pe baza comentariul meu pe constatările HKCR \ batfile \ shell \ runas \ cheie de comanda a nu avea acea valoare şi că, utilizând o cheie de genul asta a lucrat pentru alte lucruri cum ar fi VBS fişiere de asemenea.
It does appear though that other ones like HKCR\exefile\shell\runas\command do have that value. Se pare însă că, altele cum ar fi HKCR \ exefile \ shell \ runas \ comanda nu au această valoare.
Yeah, it seems like there's an inconsistency. Da, se pare ca exista o incoerenţă.
If You want a free malware & spyware to Your Windows Vista Dacă doriţi un malware-ului liber & spyware la al tău Ferestre Vista
1: Go to : Windows Live OneCare Center Beta version for Vista – allow pop-up for this section and select Complete check up 1: Du-te la: Windows Live OneCare Centrul de versiune Beta pentru Vista - să permită pop-up pentru această secţiune şi verificaţi selectaţi complete pana
2: Download: Windows Defender for Windows Vista at Microsoft Download-senter – first You can install Silverlight for Vista and use the new beta-version of the Downloadsenter, it's much quicker! 2: Download: Windows Defender pentru Windows Vista de la Microsoft Download-Senter - în primul rând, puteţi instala Silverlight pentru Vista şi utilizarea beta-noua versiune a Downloadsenter, este mult mai repede!
3: Download Norton Antibot from Symantec – You can try it for some time for free and scan all your cd's and dvd's – You will be surpriced to find out how many of them that has hidden spy-ware and some have also got malware – If You want to by this – Nab costs about 10$ with one years of updates – that is not very expensive, is it? 3: Download Nord Antibot de la Symantec - Puteţi încerca-o pentru ceva timp liber şi pentru a scana toate CD-ul şi DVD - Veţi fi surpriced pentru a afla cum mulţi dintre ei, care a ascuns spy-ware, iar unele au luat, de asemenea, malware - În cazul în care Vrei sa prin prezenta - costurile Nab de aproximativ 10 $ cu unul de ani de actualizări - care nu este foarte scump, nu?
Thank You For A Fantastic & Helpful Website Vă mulţumesc pentru Characters & Helpful Website
I will be back – again & again I will be back - din nou si din nou
Sincerely Yours: Martin Moltzau Cu stima si profund: Martin Moltzau
thx, the compile soution works great for me! thx, compila soution works mare pentru mine!