PnoT Posted December 18, 2009 Posted December 18, 2009 Use Fileinstall() or try this execellent post Embed DLLs in script and call functions from memory by Ward...I've tried FileInstall with no luck. I know for a fact it is incorporating the .dll into the exe as the file size increases according to how much the .dll is. I took a look at the loading the dll into memory but i'm not sure on how to get this into the script. Do i use this method to insert into my main script or does this go into the 7zip.au3 include file. Sorry to be a pain but i'm still learning.
KaFu Posted December 18, 2009 Posted December 18, 2009 I took a look at the loading the dll into memory but i'm not sure on how to get this into the script.Thats a method for advanced users... I think I would get it to work, but don't ask my about the details being done there ...FileInstall() is the way to go for you. Start simple. Put the 7-zip32.dll file in the same directory as your source-script and then add this line somewhere at the top of the script, before you try to open the dll:FileInstall("7-zip32.dll", @ScriptDir & "\7-zip32.dll")afterwards open it withGlobal $hDLL_7ZIP = DllOpen(@Scriptdir & "\7-zip32.dll")Then compile the exe, the dll is included and will be copied to @scriptdir (same dir as the exe) if it does not exist. Note for Fileinstall, the source may NOT contain a variable, the target may (like @ScriptDir). OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
Neocortex Posted June 22, 2010 Posted June 22, 2010 (edited) Need some help I want to add files to a new archive, but place them in separate directories. ZIP/dir_inside_zip/my_file I can only add files into the root directory (ZIP/my_file) This is how i tried it: _7ZIPADD(0, "data\" & ($biggest_commit + 1) & ".zip", "..\"&$FileList[$i], 0, 9, 1) $FileList[$i] is "some_dir\another_dir\file.txt" It adds the file to the archive successfully, but drops all the folders and place it into the root of the zip Thanks Edited June 22, 2010 by Lazarushun
Neocortex Posted June 23, 2010 Posted June 23, 2010 nvm, figured out i gotta point into directories to store directories
Sup3rkirby Posted August 3, 2010 Posted August 3, 2010 Downloaded the '7zip_udf.zip' file posted here, extracted and found two internet shortcuts.Opened the '7zip_udf' shortcut only to be shown:ForbiddenYou don't have permission to access /archives/7zip_udf.zip on this server.Next, I opened the second shortcut, '7zip_udf_mirror' and was presented with:Resource not foundAny chance that someone here can either tell me what secret dance is needed to make those work or perhaps a working download of this au3 file?It would be very much appreciated.
ProgAndy Posted August 4, 2010 Posted August 4, 2010 I have the UDF in my archives Here it is:7Zip_UDF.zip *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
Sup3rkirby Posted August 4, 2010 Posted August 4, 2010 Thank you very much, ProgAndy. Double thumbs up for attaching and the rather fast response. You're a life saver
engine Posted February 26, 2011 Posted February 26, 2011 I am getting an error while using _7ZIPExtractEx to extract a tar archive. Is this normal? My contributions:Local account UDF Registry UDFs DriverSigning UDF Windows Services UDF [url="http://www.autoitscript.com/forum/index.php?showtopic=81880"][/url]
MrCreatoR Posted June 13, 2011 Posted June 13, 2011 Anyone have an idea on how to make SFX archive? Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team
guinness Posted June 13, 2011 Posted June 13, 2011 I have code to create it using 7za.exe if you want it? UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018
AdamUL Posted June 13, 2011 Posted June 13, 2011 It depends on what type of SFX archive you want to make. 7-zip has options for making a GUI SFX, a command line SFX, a software installer GUI SFX, and a software installer command line SFX. The GUI and the command line SFX modules are included with the 7-zip package, and the software installer SFX mondules are included in the 7-Zip Extra. If you want to make the GUI SFX archive, have the SFX file and the 7z archive in the same directory as the script. The command is quite simple. Run('copy /b 7z.sfx + archive.7z archive.exe', '', @SW_HIDE) For the command line: Run('copy /b 7zCon.sfx + archive.7z archive.exe', '', @SW_HIDE) Adam
MrCreatoR Posted June 13, 2011 Posted June 13, 2011 But we are talking about 7-zip32.dll here (the udf), so is there any working examples for it? I have tried like this: _7ZipAdd(0, @ScriptDir & "\Archive.exe", @ScriptFullPath, 0, 5, 0, 0, 0, 0, "C:\Program Files\7-Zip\7z.sfx") But the executable does not created . Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team
MrCreatoR Posted June 13, 2011 Posted June 13, 2011 And i am need to create quit executable, that will extract all files to the current folder without prompt, and replace any existing files. Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team
AZJIO Posted July 30, 2011 Posted July 30, 2011 Why does not specify the compression method using a file extension and compresses the archive 7z #include <7Zip.au3> ; If FileExists(@ScriptDir & '\TMP') Then DirRemove(@ScriptDir & '\TMP', 1) _7ZIPExtractEx(0, @ScriptDir&'\test.docx', @ScriptDir&'\TMP',1 , 1) _7ZipAdd(0, @ScriptDir & "\template_New.zip", @ScriptDir & "\TMP\", 1, 1) FileMove(@ScriptDir & "\template_New.zip", @ScriptDir&'\test_New.docx', 9) My other projects or all
Yashied Posted July 31, 2011 Posted July 31, 2011 I have tried like this: _7ZipAdd(0, @ScriptDir & "\Archive.exe", @ScriptFullPath, 0, 5, 0, 0, 0, 0, "C:\Program Files\7-Zip\7z.sfx") _7ZipAdd(0, @ScriptDir & "\Archive.exe", @ScriptFullPath, 0, 5, 0, 0, 0, 0, FileGetShortNAme("C:\Program Files\7-Zip\7z.sfx")) My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
Delta Posted August 10, 2011 Posted August 10, 2011 Since rasim appears to be gone and he never addressed the issue of using OnAutoItExit in his UDF I took the liberty of rewriting all the functions and adding two of my own, _7ZipStartup() and _7ZipShutdown(). If you use the edited version of the script note that it works slightly different now. The first parameter in each function is now a dll handle followed by the rest of the original parameters. So it all looks a bit like this. $7zip = _7ZipStartup() $extract = _7ZIPExtractEx($7zip,0,"archive.zip","C:\path\to\extraction\folder\",1) _7ZipShutdown($7zip) 7Zip.au3 [size="1"]Please stop confusing "how to" with "how do"[/size]
money Posted December 31, 2011 Posted December 31, 2011 (edited) Has anyone attempted to use the brand new AutoIt 3.3.8 with standard 7za.dll? If not then, would someone else mind maintaining this, rasim seesm to have lost interest... Edited December 31, 2011 by money
skavenger Posted May 13, 2012 Posted May 13, 2012 This work is really interesting. I want to try this out but the URLs in the download-archive are not really working. Can anyone give me an alternate download-url? TIA
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