Sudiro Posted October 13, 2016 Posted October 13, 2016 I apologize i new but already asking questions .. how to add another program exe file into autoit compiler without using fileinstall, load the file in the exe itself. I've been searching in this forum and try one by one in help file, found about resources.au3 but I don't quite understand. this is my script : #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> #RequireAdmin MBRWiz() Func MBRWiz() FileInstall ("MBRWiz.exe", @TempDir &"\") GUICreate(" Test MBRWiz", 200, 100) Local $part = GUICtrlCreateInput('', 20, 20, 160, 20) Local $idBtn = GUICtrlCreateButton("Hide Partition", 20, 60, 160, 20) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE FileDelete (@TempDir &"\MBRWiz.exe") ExitLoop Case $idBtn $RPart = GUICtrlRead($part) $iMsgBoxAnswer = MsgBox(1,"Question","Are You Sure To Hide No"& $RPart &" Partition") Select Case $iMsgBoxAnswer = 1 RunWait (@TempDir &"\MBRWiz.exe /hide /part="&$RPart&"") Case $iMsgBoxAnswer = 0 EndSelect EndSwitch WEnd EndFunc I want to Acces mbrwiz.exe without extract to TempDir, direct access in autoit exe compiler .. Without FileInstall..
Sudiro Posted October 13, 2016 Author Posted October 13, 2016 Just now, Sudiro said: I apologize i new but already asking questions .. how to add another program exe file into autoit compiler without using fileinstall, load the file in the exe itself. I've been searching in this forum and try one by one in help file, found about resources.au3 but I don't quite understand. this is my script : #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> #RequireAdmin MBRWiz() Func MBRWiz() FileInstall ("MBRWiz.exe", @TempDir &"\") GUICreate(" Test MBRWiz", 200, 100) Local $part = GUICtrlCreateInput('', 20, 20, 160, 20) Local $idBtn = GUICtrlCreateButton("Hide Partition", 20, 60, 160, 20) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE FileDelete (@TempDir &"\MBRWiz.exe") ExitLoop Case $idBtn $RPart = GUICtrlRead($part) $iMsgBoxAnswer = MsgBox(1,"Question","Are You Sure To Hide No"& $RPart &" Partition") Select Case $iMsgBoxAnswer = 1 RunWait (@TempDir &"\MBRWiz.exe /hide /part="&$RPart&"") Case $iMsgBoxAnswer = 0 EndSelect EndSwitch WEnd EndFunc I want to Acces mbrwiz.exe without extract to TempDir, direct access in autoit exe compiler .. Without FileInstall..
l3ill Posted October 13, 2016 Posted October 13, 2016 My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
Sudiro Posted October 13, 2016 Author Posted October 13, 2016 1 hour ago, l3ill said: how to add in my script..? with load mbrwiz.exe
orbs Posted October 13, 2016 Posted October 13, 2016 @Sudiro, welcome to AutoIt and to the forum. be aware that except FileInstall(), all other methods to include a file in your script - be it an executable, a graphic image, a DLL, custom font, sound, etc. - are far more complex. if there is a real need to avoid FileInstall(), then you need to put the effort into learning the technique, try the examples, and adapt to your needs. no-one can do that for you. considering you are somewhat a beginner to AutoIt - no offense - i advise you reconsider your requirement to avoid FileInstall(). Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff
Sudiro Posted October 13, 2016 Author Posted October 13, 2016 5 minutes ago, orbs said: @Sudiro, welcome to AutoIt and to the forum. be aware that except FileInstall(), all other methods to include a file in your script - be it an executable, a graphic image, a DLL, custom font, sound, etc. - are far more complex. if there is a real need to avoid FileInstall(), then you need to put the effort into learning the technique, try the examples, and adapt to your needs. no-one can do that for you. considering you are somewhat a beginner to AutoIt - no offense - i advise you reconsider your requirement to avoid FileInstall(). thanks orbs .. on your advice. I'll try to read and learn the examples in this forum .. if it's possible to run user application without fileinstal ..
Developers Jos Posted October 13, 2016 Developers Posted October 13, 2016 What is the problem using File Installation? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
AdamUL Posted October 13, 2016 Posted October 13, 2016 You can give the Inline Binary Files by willichan a try. I have used it successfully. Adam
Sudiro Posted October 20, 2016 Author Posted October 20, 2016 On 13/10/2016 at 8:55 PM, Jos said: What is the problem using File Installation? Jos Jos.. No Problem with FileInstall.. Just to know how to add file without fileinstall.. But FileInstall still better solution..
Sudiro Posted October 20, 2016 Author Posted October 20, 2016 On 13/10/2016 at 10:35 PM, AdamUL said: You can give the Inline Binary Files by willichan a try. I have used it successfully. Adam Hot To add Binary mbrwiz to my script.?. this mbrwiz.exe if drop to inlineme.exe #include-once #include <file.au3> Func _MBRWizexe_Startup() Local $Inline_Filename = _TempFile(@TempDir, "~", ".EXE") Local $InlineOutFile = FileOpen($Inline_Filename, 2) If $InlineOutFile = -1 Then Return SetError(1, 0, "") FileWrite($InlineOutFile, _MBRWizexe_Inline()) FileClose($InlineOutFile) Return $Inline_Filename EndFunc ;==>_MBRWizexe_Startup Func _MBRWizexe_Shutdown($Inline_Filename) FileDelete($Inline_Filename) EndFunc ;==>_MBRWizexe_Shutdown Func _MBRWizexe_Inline() Local $sData #region ;MBRWiz.exe $sData = "0x4D5A90000300000004000000FFFF0000B800000000000000400000000000000000000000000000000000000000000000000000000000000000000000E80000000E1FBA0E00B409CD21B8014CCD21546869732070726F6772616D2063616E6E6F742062652072756E20696E20444F53206D6F64652E0D0D0A24000000000000004C6CF527080D9B74080D9B74080D9B749FC9E5740C0D9B742FCBE6741D0D9B742FCBF674810D9B74CB02C6740F0D9B74080D9A747E0D9B742FCBF5743F0D9B742FCBE774090D9B742FCBE374090D9B7452696368080D9B7400000000000000000000000000000000504500004C01040094E653440000000000000000E00003" .................................................. $sData &= "44" #endregion ;MBRWiz.exe Return Binary($sData) EndFunc ;==>_MBRWizexe_Inline
AdamUL Posted October 20, 2016 Posted October 20, 2016 Here is a short example. The file generated above should be named "MBRWiz.exe.au3." #include "MBRWiz.exe.au3" Global $sRunFile = _MBRWizexe_Startup() RunWait($sRunFile) _MBRWizexe_Shutdown($sRunFile) Adam
Sudiro Posted October 20, 2016 Author Posted October 20, 2016 7 hours ago, AdamUL said: RunWait($sRunFile) _MBRWizexe_Shutdown($sRunFile) Thank's Adam..
Sudiro Posted October 23, 2016 Author Posted October 23, 2016 On 21/10/2016 at 10:13 PM, AdamUL said: Your welcome. Adam Dear Adam... Sorry ... If dragdrop exe file 289 kb, when execute file in autoit.. Display Commad prmpt "Program to big to fit in memory" Work fine in 141 kb exe file, Execute file not problem.. Change $blocksize = 512 to 1025 or 2049 in InlineMe.au3 still "Program to big to fit in memory"
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