Jump to content

Unknown problem with compiled program on different machine


Recommended Posts

So I made a program and ran into two problems after the fact. The program it self worked fine on my system. however, when put on another computer I ran into a problem with a .dll...never came across this before; but I thought I fixed it by compiling the .dll in the program and then registering it on first run of the app. I checked the system folder and the .dll was dropped in successfully, and I checked the ole view, and I can see the object there as well. All should work fine now on the new computer right? But it doesn't, I get the error that the object can't be found. Is there something else I need to do besides drop the dll and register it?

The second problem I came across was in trying to resolve the first problem. I tried to decompile the app on the second computer and I get the error: "Error: The executable file is not recognized as a compiled AutoIt script." I don't understand why I would get that error, no obfuscation, or anything running in the compiling...just the straight compiling.

Link to comment
Share on other sites

First: You can't decompile since like 3.2.5.0

Second: I believe your program can only access the objects that are initialized BEFORE it is run. Did you try registering the dll from the command line before running your program?

Link to comment
Share on other sites

Really, no more decompile? That is a shame, I used to utilize that pretty often. Oh well.

Second: I believe your program can only access the objects that are initialized BEFORE it is run. Did you try registering the dll from the command line before running your program?

I don't understand what you mean by that. Can you give an example? And do you mean EVERY TIME the app is run?

Also note, I don't know if this affects what you said about registering from command before running, but I transfered the au3 version of the app to the other computer to see what would happen, and it wont even build on that computer (F5). But on the original scripting computer, I can Build and Compile. So does that mean there is something wrong with the registration of the dll period? I even registered the dll manually and got the success message box.

EDIT:

This is how I have it set up:

$iRun = RegRead("HKEY_LOCAL_MACHINE\software\ToolKit\ToolKit", "Yes")
If $iRun = "" Then

    $ToolKitMod = "C:\WINDOWS\system32\ToolKitMod.dll"
    If Not (FileExists($ToolKitMod)) Then
        FileInstall("C:\Guide\ToolKitMod.dll", $ToolKitMod, 1)
    EndIf
    RunWait('Regsvr32 /s "' & $ToolKitMod & '"')
    RegWrite("HKEY_LOCAL_MACHINE\software\ToolKit\ToolKit", "Yes", "REG_SZ", 1)
    
EndIf
Edited by Champak
Link to comment
Share on other sites

WeaponX, I don't think that an object has to be registered before the script is run. I've got a script that extracts and registers a .dll if it isn't already registered, then proceeds to use it. It works fine on every computer I've tried it on...

My $.02

"There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110
Link to comment
Share on other sites

You need to post the SciTe console log after you try running on that other machine so we can figure out the problem.

Thanks for the pointer, that didn't occur to me to look at that on the other machine. It turns out that there was another dll that I forgot to include---I didn't even remember this thing was a part of the app---, that the dll that I did include depended on. So both dlls are compiled in the app and the first dll gets registered, and everything is good now. Thanks.

Edited by Champak
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...