Newbie question here - how do I run this? After extracting, when I double-click EnableUIAccess.ahk, I get the error "#Include file "<Cert>" cannot be opened." Do the files in the Lib folder need to be put somewhere in particular?
#Include in Help doesn't mention specifying a file using angle brackets, and I couldn't find reference to what they signify. Changing to "#Include Cert.ahk" yielded another error ("Line Text: class Cert
Error: This line does not contain a recognized action.")
Obviously I'm in over my head here. Can someone give me a step-by-step on running this script?
Thanks!
Enable interaction with administrative programs
Started by
Lexikos
, Aug 20 2011 08:32 AM
64 replies to this topic
#16
-
Posted 16 February 2012 - 07:00 AM
You're using the outdated AutoHotkey Basic, and this script requires AutoHotkey_L. You can find it on the top of the downloads page.
#17
-
Posted 16 February 2012 - 04:55 PM
Damn, my notes say I had _L v1.1.00.01 installed, but obviously not.
Thanks for the help.
Thanks for the help.
#18
-
Posted 16 February 2012 - 08:58 PM
Can anyone help please: I am keen to have digitally signed code - even bought a certificte! - but can't seem to get the above instructions to work: I am using Windows 7 - Loaded latest Ahk.exe dated 25 March 2012 - but I still get the Error @ line 24 problem described above when trying EnableUIAccess.AHK. Tried in IE, Firefox and Chrome - same results in all. Cheers
#20
-
Posted 06 July 2012 - 11:02 AM
Verify that the following reports "1.1.07.03":
MsgBox % A_AhkVersion
#21
-
Posted 06 July 2012 - 12:45 PM
gosh that was quick ..
Yes I can confirm that 1.1.07.03 appears when running script statement you provided.
and then re-tried loading Enable UIAccess with firefox and chrome - same results...
Yes I can confirm that 1.1.07.03 appears when running script statement you provided.
and then re-tried loading Enable UIAccess with firefox and chrome - same results...
#22
-
Posted 06 July 2012 - 01:31 PM
If you have extracted the script files from the archive correctly, there is no reason to get the error reported by redgum on v1.1.07.03. Please copy-paste the actual text of the error dialog. You can copy it by simply pressing Ctrl+C.
#23
-
Posted 06 July 2012 - 11:02 PM
as requested here is the actual text:
---------------------------
EnableUIAccess.ahk
---------------------------
Error at line 24.
Line Text: #Include <Cert>
Error: Function library not found.
The program will exit.
---------------------------
OK
---------------------------
Just to be sure I am doing it correctly : Autohotkey_L is loaded in C:\Program Files (x86)\AutoHotkey and there are no other copies of AHK in the PC that I can see. To do download this extension (in chrome) I just clicked on the download button - it came up with EnableUIAccess.zip which when opened has Lib folder and EnableUIAccess.ahk dated /modified 20/08/2011 16:52 (I am using chrome as I have redirected downloads in Firefox) - I am most grateful for you help by the way.
---------------------------
EnableUIAccess.ahk
---------------------------
Error at line 24.
Line Text: #Include <Cert>
Error: Function library not found.
The program will exit.
---------------------------
OK
---------------------------
Just to be sure I am doing it correctly : Autohotkey_L is loaded in C:\Program Files (x86)\AutoHotkey and there are no other copies of AHK in the PC that I can see. To do download this extension (in chrome) I just clicked on the download button - it came up with EnableUIAccess.zip which when opened has Lib folder and EnableUIAccess.ahk dated /modified 20/08/2011 16:52 (I am using chrome as I have redirected downloads in Firefox) - I am most grateful for you help by the way.
#24
-
Posted 07 July 2012 - 04:01 AM
Did you perhaps miss the first step?
You need to extract all of the files from the zip, including the Lib folder.After extracting, ...
#25
-
Posted 07 July 2012 - 06:13 AM
I am feeling a bit of a dumbo here: Are there a set of instructions that I am missing?
The zipped download file I received contains EnableUIAccess.ahk + Lib folder with[ Cert.ahk Crypt.ahk SignFile.ahk and SystemTime.ahk ] all of which are small files. Am I getting all the correct files?? I tried extracting all these files to the Download folder and running EnableUIAccess from there but it failed. Then tried copying this lot as files to the C:\Program Files (x86)\AutoHotkey folder and running EnableUIAccess from there - but same results. Can you help sort this dumbo out please.
The zipped download file I received contains EnableUIAccess.ahk + Lib folder with[ Cert.ahk Crypt.ahk SignFile.ahk and SystemTime.ahk ] all of which are small files. Am I getting all the correct files?? I tried extracting all these files to the Download folder and running EnableUIAccess from there but it failed. Then tried copying this lot as files to the C:\Program Files (x86)\AutoHotkey folder and running EnableUIAccess from there - but same results. Can you help sort this dumbo out please.
#26
-
Posted 08 July 2012 - 08:36 AM
When you say "it failed", does that mean it gave you exactly the same error message?
Since you already have the latest version of AutoHotkey_L installed, it should be this simple:
[*:1le26nul]Extract the contents of the zip to any folder.
Structure must be preserved. Any decent zip program (or Windows built-in functionality) will do this, unless you tell it not to. To be clear, it should be like this:
"Function library not found" at line 24 implies that
Since you already have the latest version of AutoHotkey_L installed, it should be this simple:
[*:1le26nul]Extract the contents of the zip to any folder.
Structure must be preserved. Any decent zip program (or Windows built-in functionality) will do this, unless you tell it not to. To be clear, it should be like this:
EnableUIAccess.ahk Lib\Cert.ahk Lib\Crypt.ahk Lib\SignFile.ahk Lib\SystemTime.ahk[*:1le26nul]Run the script.[/list]
"Function library not found" at line 24 implies that
%A_ScriptDir%\Lib\Cert.ahk
does not exist.
#27
-
Posted 08 July 2012 - 10:43 AM
got it to work this time - so many thanks. Now trying to sign my compiled code with my digital certificate a pfx file but quite unsure of the correct steps. I put a copy of my_cert.pfx in C:\Program Files (x86)\AutoHotkey folder then modified your AHK script line from:
ahk_cert := my.FindCertificates(0, Cert.FIND_SUBJECT_STR, "wstr", "AutoHotkey")[1]
to
ahk_cert := my.FindCertificates(0, Cert.FIND_SUBJECT_STR, "wstr", "my_cert.pfx")[1]
ran it to make updated AutoHotkey.exe and then compiled my ahk script but resulting compiled exe does not appear to have my certificate. - Sorry that I can't manage to do it on my own...
ahk_cert := my.FindCertificates(0, Cert.FIND_SUBJECT_STR, "wstr", "AutoHotkey")[1]
to
ahk_cert := my.FindCertificates(0, Cert.FIND_SUBJECT_STR, "wstr", "my_cert.pfx")[1]
ran it to make updated AutoHotkey.exe and then compiled my ahk script but resulting compiled exe does not appear to have my certificate. - Sorry that I can't manage to do it on my own...
#28
-
Posted 08 July 2012 - 03:44 PM
Install the certificate first, then refer to it by name (not filename).
You may need to restore AutoHotkey.exe to its unsigned state (e.g. by reinstalling).
You may also want to delete the certificate the script just created. Press Win+R, type certmgr.msc, press Enter, find the "my_cert.pfx" certificate listed there and delete it.
You may need to restore AutoHotkey.exe to its unsigned state (e.g. by reinstalling).
You may also want to delete the certificate the script just created. Press Win+R, type certmgr.msc, press Enter, find the "my_cert.pfx" certificate listed there and delete it.
#29
-
Posted 08 July 2012 - 09:27 PM
1) using certmgr checked personal certificates to find Autohotkey one plus my code signing one - updated friendly name of mine from 'none' to something more useful.
2) re-installed Autohotkey_L and its properies show it is not signed
3) deleted the autohotkey certificate - as I think that was created by previous run. Did not delete my certificate as I don't know how to re-install it and it looks ok to me.
4) updated your ahk script to use friendly certificate name that I created in (1) above
now when I run your script I get response as below and autohotkey.exe is not signed:
---------------------------
EnableUIAccess.ahk
---------------------------
Failed to create 'AutoHotkey' key container.
ErrorLevel: 0
A_LastError: -2146893809
---------------------------
OK
---------------------------
2) re-installed Autohotkey_L and its properies show it is not signed
3) deleted the autohotkey certificate - as I think that was created by previous run. Did not delete my certificate as I don't know how to re-install it and it looks ok to me.
4) updated your ahk script to use friendly certificate name that I created in (1) above
now when I run your script I get response as below and autohotkey.exe is not signed:
---------------------------
EnableUIAccess.ahk
---------------------------
Failed to create 'AutoHotkey' key container.
ErrorLevel: 0
A_LastError: -2146893809
---------------------------
OK
---------------------------
#30
-
Posted 09 July 2012 - 09:36 AM