Sign in to follow this  
Followers 0
theguy0000

user's include directory

11 posts in this topic

im trying to learn more about the registry, and in regedit, i just happened to see something in there called "AutoItv3Script", i looked, and there was my install directory!

now, some of you might remember me wondering how to find a user's include directory.

$installDir = RegRead ( "HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "InstallDir" )
$includeDir = $installDir & "\include\"

MsgBox ( 0, "test", "Install Directory found at " & $installDir )
MsgBox ( 0, "test", "Include directory found at " & $includeDir )

this is more of a scrap than a script, i dont expect anyone to find it useful, but i just thought i would post it here.


The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites



_RunDOS("dir /b /s | find "AutoIt\Include\")

way better dont ya think?


[right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]

Share this post


Link to post
Share on other sites

wouldnt that search for it?


The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

_RunDOS("dir /b /s | find "AutoIt\Include\")

way better dont ya think?

No, stupid idea. Why do a full recursive hard drive search when you can read the registry and lookup the location(s) exactly how AutoIt does it?

Share this post


Link to post
Share on other sites

i agree with valik, chevking the registry is a lot faster.


The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

i agree with valik, chevking the registry is a lot faster.

DOS is way funner

duhhh


[right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]

Share this post


Link to post
Share on other sites

DOS is way funner

duhhh

...and if you have multiple versions scattered on your drive, how would you validate which is the correct one?

Share this post


Link to post
Share on other sites

...and if you have multiple versions scattered on your drive, how would you validate which is the correct one?

Or what if your directory isn't named AutoIt\include? Maybe it's AutoIt3\include.

Or what if your directory isn't even on the same drive "dir /b /s" searches on.

Share this post


Link to post
Share on other sites

what if they installed a zip that didnt write to the registry ?

Then AutoIt changes how it searches for an Include directory if it can't find the registry keys it wants:

For the include library syntax (#include <file>) to work AutoIt must have been installed using the supplied installer otherwise the installation directory will not be known and the current script directory (@ScriptDir\Include) will be used instead.

Share this post


Link to post
Share on other sites

damn thats like 4 burns in a row


[right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]

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
Sign in to follow this  
Followers 0