ReubenParsons Posted August 15, 2011 Posted August 15, 2011 (edited) My script requires a dll file that is called during function. It is currently unpacked to system32 however this is sometimes registered as malicious. Also when attempting to cleanup on close(I dont want to leave an unused file floating around) the delete from system32 is always flagged as malicious. Really what i want is for some way to call a local dll from ./ directory so i can avoid the windows folder altogether. EDIT:Corrected typo Edited August 15, 2011 by ReubenParsons
AdmiralAlkex Posted August 15, 2011 Posted August 15, 2011 Hi and Welcome to the forums! What's your question? And why are you messing with stuff in @SystemDir at all? Use @ScriptDir or @TempDir .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
ReubenParsons Posted August 15, 2011 Author Posted August 15, 2011 (edited) Sorry, I need to call a DLL using the script. It says somewhere I read that they find them in localdir but when I tried that the script did not find the dll. Quite simply I want to FileInstall a .dll somewhere that wont set off any alarms with the antivirus programs then open it with DLLOpen then delete it all in one script. I know how to do all three things but I need to know which dirctories are valid for DLLOpen. EDIT: I was using @systemdir because I know autoit will find a dll file from there. Edited August 15, 2011 by ReubenParsons
Werty Posted August 15, 2011 Posted August 15, 2011 Take a look at Ward's that way you dont need a file at all. Some guy's script + some other guy's script = my script!
AdmiralAlkex Posted August 15, 2011 Posted August 15, 2011 It says somewhere I read that they find them in localdir but when I tried that the script did not find the dll.Well, it should have, so you did something wrong. Did you use a full path? Post a reproducer (fully working example script that shows your problem). .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
ReubenParsons Posted August 15, 2011 Author Posted August 15, 2011 Take a look at Ward's that way you dont need a file at all.This does not look like it will function with my DLL. My DLL has more than 4 parameters.And the dll it isn't made by me.Also looks more complicated than I really wantedRight now I want to be able to share my script with some non techie friends without having to explain to them how to use those funky dll files and put it into that risky system32 folder - yes ignore the warning message i know what i'm doing- or say, no allow it through the antivirus it's a false positive. ETC.
ReubenParsons Posted August 15, 2011 Author Posted August 15, 2011 Well, it should have, so you did something wrong. Did you use a full path? Post a reproducer (fully working example script that shows your problem).It worked when run from the autoit program, when the .au3 was saved in the same folder, as soon as I compiled to .exe it lost that functionality. Can I use full path in DLLOpen? If i can then that would solve my problem. simply change DLLOpen("imagesearch.dll") to DLLOpen("./imagesearch.dll")?Also sorry I meant @scriptdir.
monoscout999 Posted August 15, 2011 Posted August 15, 2011 try running with administrator rights... i am not sure about this, but try it costs nothing
ProgAndy Posted August 15, 2011 Posted August 15, 2011 (edited) Never install a DLL in system32. Always use @TempDir, @AppDataDir or @ScriptDir. Only with @TempDir or @AppDataDir you can be sure to have the required rights to write to disk. FileInstall("mydll.dll", @TempDir & "\myspecialdll.dll") $hDLL = DllOpen(@TempDir & "\myspecialdll.dll") Edited August 15, 2011 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
ReubenParsons Posted August 15, 2011 Author Posted August 15, 2011 (edited) try running with administrator rights... i am not sure about this, but try it costs nothingIt already runs with administrator rights.And thanks Andy I'll see how that goes next chance I get. Edited August 15, 2011 by ReubenParsons
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now