Add "Run as Administrator" for AutoHotkey Scripts in Windows 7 or Vista Thêm "Run as Administrator" cho AutoHotkey Scripts trong Windows 7 hoặc Windows 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. Như độc giả thường xuyên cũng biết, tôi là một fan hâm mộ lớn của việc sử dụng AutoHotkey để tự động tính toán toàn bộ kinh nghiệm của tôi ... nhưng trong Windows 7 và Vista có một hạn chế nghiêm trọng kể từ khi bạn không thể chạy một kịch bản như quản trị theo mặc định. This means that your hotkeys can't interact with windows running in Admin mode… so how do we get around this? Điều này có nghĩa là các phím nóng của bạn không thể tương tác với các cửa sổ đang chạy ở chế độ quản trị ... để làm thế nào để chúng tôi nhận được khoảng này?
There are three solutions to this problem: Có ba giải pháp cho vấn đề này:
- Completely Disable UAC – Not the best solution for security purposes, but Vô hiệu hoá hoàn toàn UAC - Không phải là giải pháp tốt nhất cho mục đích bảo mật, nhưng it works nó hoạt động . .
- Compile your script to an executable. Biên soạn kịch bản của bạn đến một thực thi.
- Hack the registry and add “Run as Administrator” to the context menu. Hack registry và thêm "Run as Administrator" vào trình đơn ngữ cảnh.
Compile Script as Executable Biên dịch Script như Executable
All you have to do is right-click on the script, choose “Compile Script”… Tất cả bạn phải làm là click chuột phải vào kịch bản, chọn "Compile Script" ...

And now you can run the executable version as administrator: Và bây giờ bạn có thể chạy các phiên bản thực thi như quản trị:

This isn't the perfect solution, however. Đây không phải là giải pháp hoàn hảo, tuy nhiên. I edit my script all the time, so having to recompile each time I make an edit… would get annoying. Tôi chỉnh sửa kịch bản của tôi tất cả thời gian, vì vậy phải biên dịch lại mỗi lần tôi thực hiện một sửa ... sẽ nhận được gây phiền nhiễu.
Manual Registry Hack for AutoHotkey “Run as Administrator” Hướng dẫn sử dụng Registry Hack cho AutoHotkey "Run as Administrator"
Open up regedit through the start menu search or run box, and then browse down to the following key: Mở regedit thông qua việc tìm kiếm hay hộp trình đơn bắt đầu chạy, và sau đó duyệt xuống khóa dưới đây:
HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell HKEY_LOCAL_MACHINE \ 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. Nhấp chuột phải vào "Shell" ở bên trái phía tay và tạo ra một khoá mới gọi là "runas", sau đó tạo ra một phím gọi là "Command" bên dưới nó. Then create or set the following two values on the right-hand side, adjusting the path if necessary. Sau đó tạo hoặc đặt hai giá trị sau đây trên bên phải, điều chỉnh đường dẫn nếu cần thiết.
| Name Tên | Value Giá trị |
| (Default) (Mặc định) | “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. Các phím được mặc định nên đã có, chỉ cần để thiết lập giá trị.
Now when you right-click on an AutoHotkey script, you'll see the option to Run as Administrator: Bây giờ khi bạn nhấp chuột phải vào một kịch bản AutoHotkey, bạn sẽ thấy tùy chọn Run as Administrator:

Download Registry Hack Download Registry Hack
Download, extract, and double-click on the AdminAutoHotkey.reg to enter the information into the registry. Tải về, giải nén, và nhấp đúp vào AdminAutoHotkey.reg để nhập các thông tin vào registry. There's also a removal script included. Còn có một kịch bản gỡ bỏ bao gồm.
Note that this registry hack will only work if you installed AutoHotkey into the default location, otherwise you'll have to modify the paths. Lưu ý rằng registry hack này sẽ chỉ hoạt động nếu bạn cài đặt AutoHotkey vào vị trí mặc định, nếu không bạn sẽ phải sửa đổi các đường dẫn.
Download AdminAutoHotkey Registry Hack Tải về AdminAutoHotkey Registry Hack

Daily Email Updates Email cập nhật hàng ngày
You can get our how-to articles in your inbox each day for free. Bạn có thể làm thế nào chúng tôi vào các bài viết trong hộp thư của bạn mỗi ngày miễn phí. Just enter your name and email below: Chỉ cần nhập tên và email của bạn dưới đây:



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. Tôi nghĩ rằng miễn là khóa shell được đặt tên là "runas" Vista thừa nhận lệnh tại các giá trị mặc định là để chạy với các đặc quyền quản trị và "IsolatedCommand giá trị" là không cần thiết.
I based that registry structure on some existing MS keys… Tôi dựa trên cấu trúc registry rằng trên một số phím MS hiện tại ...
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. Tôi được thử nghiệm và nó không có vẻ là cần thiết nhưng nó có thể nó được sử dụng ở một nơi khác mà không ý thức của tôi là vào thời điểm này, vì vậy tôi đưa nó cho nhất quán.
Interesting. Thú vị. 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. Tôi nhận xét của tôi dựa trên những phát hiện của HKCR \ batfile \ shell \ runas \ command mà không có giá trị và rằng bằng cách sử dụng một chìa khóa như là làm việc cho những thứ khác như VBS tập tin quá.
It does appear though that other ones like HKCR\exefile\shell\runas\command do have that value. Nó không xuất hiện dù rằng những người khác như HKCR \ exefile \ shell \ runas \ lệnh nào có giá trị đó.
Yeah, it seems like there's an inconsistency. Yeah, nó có vẻ như có một không thống nhất.
If You want a free malware & spyware to Your Windows Vista Nếu bạn muốn có một phần mềm độc hại miễn phí và phần mềm gián điệp lên Windows Vista của bạn
1: Go to : Windows Live OneCare Center Beta version for Vista – allow pop-up for this section and select Complete check up 1: Go to: Windows Live OneCare Trung tâm phiên bản Beta cho Vista - cho phép pop-up cho phần này và kiểm tra đầy chọn tối
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: Tải về: Windows Defender cho Windows Vista tại Microsoft Download-Senter - lần đầu tiên Bạn có thể cài đặt Silverlight cho Vista và sử dụng các phiên bản beta mới của Downloadsenter, nó nhanh hơn nhiều!
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: Tải Norton Antibot của Symantec - Bạn có thể thử một thời gian miễn phí và quét tất cả các bạn cd và dvd's - Bạn sẽ có surpriced để tìm ra có bao nhiêu người trong số họ đã ẩn spy-ware và một số phần mềm độc hại cũng đã nhận được - Nếu Bạn muốn bằng cách này - Nab chi phí khoảng 10 $ với một năm cập nhật - đó không phải là rất tốn kém, is it?
Thank You For A Fantastic & Helpful Website Thank You For A Logo & Website Hữu Ích
I will be back – again & again Tôi sẽ trở lại - một lần nữa & lần nữa
Sincerely Yours: Martin Moltzau Trân trọng Trân: Martin Moltzau
thx, the compile soution works great for me! thx, các biên dịch soution tác phẩm tuyệt vời cho tôi!