Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Compile_AHK II - for those who compile!


  • Please log in to reply
467 replies to this topic
DeWild1
  • Members
  • 369 posts
  • Last active: Feb 28 2014 08:15 PM
  • Joined: 30 Apr 2006

I have Vista Ultimate 64-bit, and am experiencing an issue with this. It doesn't seem to compile in the functions from my user lib directory which I use. They work in the uncompiled version, and if I compile with the AHK compiler, but I get errors when trying to use any lib function from an exe compiled with this script (because function doesn't exist). Any ideas?

Yes, format and go back to XP...
Or use <!-- m -->http://www.bitsum.com/shjunc.asp<!-- m --> and remove the "users" virtual folder then install XP without formating.. (without doing this, it is just a time bomb before Users and Documents and Settings gets confused by an update or program and everthing blows up.. OK, well, the user's profile gets lost.. Seen it 4 times now)
LOL,, just kidding but Vista sucks.. :twisted: Ya it's pretty, but .... :roll:
Just curious to see if it is a User Account Control issue or Permissions issue, do you know how to turn UAC off?
If so, do that, reboot, try again, post.

bmcclure
  • Members
  • 774 posts
  • Last active: Jan 04 2014 10:44 PM
  • Joined: 24 Nov 2007
Could be a UAC issue but I'd prefer not to have to change system settings to get it to work. I have UAC active right now and sometimes turn it off for certain things. I'm not going to turn it off just for compiling my script though, even if the features of this compiler do look nice.

I realize you, and many others, prefer XP over Vista, but downgrading is not a solution to why this function doesn't include the user lib in Vista. Not to mention, I rather enjoy Vista and DirectX 10, driver issues and all, thank you very much! I prefer a 64-bit platform for certain applications, and XP x64 (based on Server 2003) was even less stable than Vista 64-bit.

Plus, it states right in the topic that it's compatible with Vista, so it's kind of funny you even recommended that. But anyway...

DeWild1
  • Members
  • 369 posts
  • Last active: Feb 28 2014 08:15 PM
  • Joined: 30 Apr 2006
I was just joking.. Ramping and raving.. :lol:

I did not want you to permanently turn it off, nor everytime, just see if that fixed it. .. . So we would know..

bmcclure
  • Members
  • 774 posts
  • Last active: Jan 04 2014 10:44 PM
  • Joined: 24 Nov 2007
Oh, gotcha. I'll turn it off before my next reboot and post the results of my tests (granted my next reboot is intentional! :) )

DeWild1
  • Members
  • 369 posts
  • Last active: Feb 28 2014 08:15 PM
  • Joined: 30 Apr 2006
Bump...

Does any one know why even when I rename UPX.exe and I have no other packer... That the files are still being compressed when I use this awesome program?
Using just AHK2EXE with NO UPX being in the AHK dir, will give me a 400kb file, using this witll get me a smaller file, but I renamed my UPX.exe so I want to know how....

Does it have UPX.exe in it?
Or did you invent your own?

I know it modifies AutoHotkeySC.bin but I could not find any upx.exe on my hard drive...
I can not use any packers because of the dam malware makers.. The AV and AS software always seem to be lazy and block anything packed with any of the common "free" packers.

ladiko
  • Members
  • 290 posts
  • Last active: Jan 16 2012 11:46 PM
  • Joined: 13 Jul 2006
on first start it copies
C:\Program Files\AutoHotkey\Compiler\upx.exe
to
%ProgramData%\Upx.exe

this means
C:\Documents and Settings\All Users\AppData\AutoHotkey\Compiler\Upx.exe
on xp (?!?) or
C:\ProgramData\AutoHotKey\Compiler\Upx.exe
on vista. but i doesn't exactly know this for xp, but you can start the installer to see where it wants to install Compile_AHK.

about vista 64-bit:
cant imagine and cant test cause of absence of a 64-bit cpu. but i have a 64-bit-able notebook with a core duo, so if somebody wanna spend me a core 2 duo :p

DeWild1
  • Members
  • 369 posts
  • Last active: Feb 28 2014 08:15 PM
  • Joined: 30 Apr 2006

on first start it copies
C:\Program Files\AutoHotkey\Compiler\upx.exe


But mine are all renamed... But it still comes out smaller.. :?:
Please don't be offended, I am so confused, but even today, my tech spent 7 hours trying to figure out why dam Avast was blocking my old version of CPULOCK, (it detected it as some virus that started with a t)

Posted Image

DeWild1
  • Members
  • 369 posts
  • Last active: Feb 28 2014 08:15 PM
  • Joined: 30 Apr 2006
unce again, I am dumb....

C:\Documents and Settings\All Users\AppData\AutoHotkey\Compiler\Upx.exe

:roll:
I only searched all Program Files Dir.. I never suspected any other place..

BTW, have not tested the C:\ProgramData\ nor C:\Documents and Settings\All Users\ on Vista to much but if I remember correctly, when I made a program - script - Task that turns off UAC with no prompts, I had trouble finding a Dir that Vista-UAC would let me write to and read from... Maybe A_Temp or the A_Desktop or A_MyDocuments might be safer... Maybe that is why the problems compiling on Vista.

ladiko
  • Members
  • 290 posts
  • Last active: Jan 16 2012 11:46 PM
  • Joined: 13 Jul 2006
the correct path should be something like
C:\Documents and Settings\All Users\Application Data\AutoHotkey\Compiler\
try [Start] --> [Run...] --> %ProgramData%\AutoHotkey\Compiler\ --> [OK] and you will see the correct folder.

if you use [right click] --> [compile] it uses the original files in ProgramFiles folder.

if you use [right click] --> [compile with options] it uses the files in ProgramData / AllUsers\AppData

so know you should know which files to delete.

what problems with vista do you mean? what programs do you write that turns of uac and then cant write to some directories. it's a mystery to me what you want to tell oO

And One Big Wish:
please dont post pictures bigger than VGA or if you want to do this, use clickable thumbnails like from imageshack.us or imagebanana.com :-)
and the 256 colours offered by the GIF file format are not up to date. png is better and jpg is also better than gif for such purposes.

ryebread
  • Members
  • 4 posts
  • Last active: Nov 14 2011 05:27 AM
  • Joined: 11 Dec 2006
very nice ,but you use the AbsolutePath, mybe change to RelativePath.

DeWild1
  • Members
  • 369 posts
  • Last active: Feb 28 2014 08:15 PM
  • Joined: 30 Apr 2006

what problems with vista do you mean? what programs do you write that turns of uac and then cant write to some directories. it's a mystery to me what you want to tell oO




if A_OSVersion in WIN_VISTA
{


RegWrite, REG_DWORD, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System, ConsentPromptBehaviorAdmin, 0

SendMessage, HWND_BROADCAST, WM_SETTINGCHANGE, 0, LongInt(Pchar, (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\ConsentPromptBehaviorAdmin));

RegWrite, REG_DWORD, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System, ConsentPromptBehaviorUser, 0

SendMessage, HWND_BROADCAST, WM_SETTINGCHANGE, 0, LongInt(Pchar, (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\ConsentPromptBehaviorUser));



RegWrite, REG_DWORD, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System, PromptOnSecureDesktop, 0

SendMessage, HWND_BROADCAST, WM_SETTINGCHANGE, 0, LongInt(Pchar, (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\PromptOnSecureDesktop));


RegWrite, REG_DWORD, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System, EnableLUA, 0

SendMessage, HWND_BROADCAST, WM_SETTINGCHANGE, 0, LongInt(Pchar, (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA));

run, net stop "Security Center",,Hide
RegWrite, REG_DWORD, HKEY_LOCAL_MACHINE, SYSTEM\CurrentControlSet\Services\wscsvc, Start, 4

}
Combine that with <!-- m -->http://www.tweak-uac...ista-elevator2/<!-- m -->
and you will get it.. :evil: :p :shock: :D :lol: 8) 8)
You basically need to piggy back - start a task from, an elevated process, it will run your program, like the one above, with elevated privileges..

As for me, no, I have no programs that I need to compile nor run on Vista, (well, none I have a problem with), I was just trying help the people here who were having trouble compiling on Vista..


And One Big Wish:
please dont post pictures bigger than VGA or if you want to do this, use clickable thumbnails like from imageshack.us or imagebanana.com :-)
and the 256 colours offered by the GIF file format are not up to date. png is better and jpg is also better than gif for such purposes.

You bet! No problem.

ladiko
  • Members
  • 290 posts
  • Last active: Jan 16 2012 11:46 PM
  • Joined: 13 Jul 2006

very nice ,but you use the AbsolutePath, mybe change to RelativePath.

there are a lot of pathes - which do you mean? the output file? maybe somebody want the output file to be somewhere else.

i will do the following:
by default it is a relative path, but if you change it to something else, it will be an absolute one.

@DeWild1:
i dont know why you need this and i'm a little bit confused:
if u use this what u explained, you cant write to %programdata% ?
my plan is, that when i have time and i feel like to do it, i will change the installer, to install to c:\program files and all others things will happen in %temp% and the install dir will be again changeable but this will not happen before the next year.

DeWild1
  • Members
  • 369 posts
  • Last active: Feb 28 2014 08:15 PM
  • Joined: 30 Apr 2006

@DeWild1:
i dont know why you need this and i'm a little bit confused:
if u use this what u explained, you cant write to %programdata% ?
my plan is, that when i have time and i feel like to do it, i will change the installer, to install to c:\program files and all others things will happen in %temp% and the install dir will be again changeable but this will not happen before the next year.


Those few lines of code that I worked out above, turns off UAC. If you combine them the methods here, <!-- m -->http://www.tweak-uac...ista-elevator2/<!-- m --> , then you can turn off UAC with no warning.. Something MS boasted could not be done.

I am sorry for the confusion. When you said,

what programs do you write that turns of uac and then cant write to some directories. it's a mystery to me what you want to tell oO

I thought you wanted to know how to turn off UAC with no prompts.. Given my line of work, <!-- w -->www.cpulock.com<!-- w --> I think it is funny.. :p :lol:
Sorry, guess it is an "inside" joke.

Only thing I have ever been trying to say is, with Vista and UAC, it is so restrictive, that the people that are having trouble compiling on Vista, may be solved if you use one of these to do all your stuff from... A_Temp or the A_Desktop or A_MyDocuments might be safer...
I have not tested this lately, and maybe I am misunderstanding their problem, but I could not extract a file on a program I made a long time ago because I did not do it into one of those less restrictive areas. That is why I wanted someone to see if they still had problems after turning off UAC temporally..
Also, I do remember that I was able to make a dir on C and even c:\program files but then I could not do much after that... No fileinstall then extract to it, etc.. In A_Temp or the A_Desktop or A_MyDocuments I did not have trouble. (Not sure if I tried A_Temp, but I think that would work best)

bmcclure
  • Members
  • 774 posts
  • Last active: Jan 04 2014 10:44 PM
  • Joined: 24 Nov 2007
Just a note that I'm compiling entirely from A_MyDocuments. That's where my script and lib directories are located, though AutoHotKey itself is installed in my program files, and I still experience a lack of my lib files being included in Vista.

DeWild1
  • Members
  • 369 posts
  • Last active: Feb 28 2014 08:15 PM
  • Joined: 30 Apr 2006

Just a note that I'm compiling entirely from A_MyDocuments. That's where my script and lib directories are located, though AutoHotKey itself is installed in my program files, and I still experience a lack of my lib files being included in Vista.


Did you try temporarally turning off UAC then trying it yet?

Vista, (besides the fancy skin), has two main things different in the area of security.
1. Permissions on files and folders.. Program files, windows, even new directories on the root or in program files are limited.
2. UAC.. Well, that does a lot.... :roll:

So, if you could please try turning off UAC, compile, turn back on UAC, that would help narrow things down.