Marc Posted October 18, 2017 Posted October 18, 2017 (edited) Hi Folks, I've been very fond of portable software. Some of the portable programs are quite large, so to make the using fancier, I started to compress the portable applications into a WinRar SFX Archive which extracts the software to the tempdir, starts the software and afterward deletes the whole temp Dir. But it got cumbersome to manually extract the icon from the exe, make all necessary settings in the WinRar GUI - so I wrote this script. Nothing spectacular, but (in my eyes) very useful. After that, I added some other options to make it a little more versatile. Features: if we have a 32Bit and a 64Bit version, it can launch the correct Version (32Bit or 64Bit) fitting to the system the SFX is started on (contains a small exe file "universal_launcher.exe" which expects two parameters for the 32Bit.exe and 64Bit.exe, checks the current system for 64Bit and then runs the correct file). Powerbasic Sourcecode of the exe file is included, of course. automatically extracts the icon from the chosen exe and uses it as icon for the SFX if the chosen exe file has a version number in it, the version is put in the resulting SFX's filename can just extract the files to a user-chosen directory OR can just extract the files to the program files directory (and, optionally, create a desktop shortcut) OR extract the files to a temp directory and run an exe Have fun with it best regards, Marc MakeSFX v1.2.zip MakeSFXv1.3.zip Edited September 27, 2018 by Marc Updated to 1.3 coffeeturtle 1 Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL)
Marc Posted November 15, 2017 Author Posted November 15, 2017 v1.1: fixed some bugs now using RunWait instead of Run (so it waits for winrar to get the archiving done) the universal_launcher.exe now waits for the started program to finish (so winrar SFX will wait with deleting the SFX dir) MakeSFX.zip Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL)
careca Posted December 19, 2017 Posted December 19, 2017 Hello, couple of questions: What does the universal_launcher do? "universal_launcher.exe" which expects two parameters for the 32Bit.exe and 64Bit.exe, checks the current system for 64Bit and then runs the correct file). Why not making the check in the script itself? So this is only for portable applications? So i select an exe and it compresses to an sfx and uses the icon of the exe i provide? What if the application is in a folder? can i compress the whole folder? Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
Marc Posted September 19, 2018 Author Posted September 19, 2018 Hi all, v1.2 is out supports long file names / spaces in the name of the exe To answer caracas questions (forgot to activate the notifications, sorry for the embarrassing late reply): Quote Why not making the check in the script itself? The AutoIt script just delivers the GUI for creating the SFX File. Of course, the 64Bit-Check could be put into a AutoIt Exe file, but this would be a file with over 800kb weight. So I decided to use a dedicated 12kb Exe file Quote So this is only for portable applications? Yes, that's the intention. Every Exe file which can be run without installation (like most AutoIt compiled files) work fine. Quote So i select an exe and it compresses to an sfx and uses the icon of the exe i provide? Ooops, should have written that... at first you should create a folder. The Name of the folder is used as the name for the created exe file. You select one exe (or, if applicabe two files - one 32 Bit and one 64 Bit file) out of this folder and the script uses Winrar to compress the Exe file and the entire content of the folder into one SFX file. Quote What if the application is in a folder? can i compress the whole folder? Yes, the content of the whole folder the selected exe(s) reside in is put into the archive. Step 1: create desired folder structure Step 2: select the exe file(s) Resulting SFX contains all files of the folder and the SFX will invoke the universal_launcher.exe with the exe file(s) as parameters. MakeSFX.zip Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL)
careca Posted September 19, 2018 Posted September 19, 2018 This is interesting, but what if i just want to pack some files that are not exe's? Why are the files inside the folder deleted and not the main folder? You could make this so that the user could select any file to open, a separate entry for optional icon. Just throwing it out there. It's not that i need those features. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
Marc Posted September 27, 2018 Author Posted September 27, 2018 (edited) Okay, new version released. Changes: now deletes the source folder if it is empty (credits to bcording for the DirIsEmpty Code) Icon can be chosen manually by clicking on the icon-placeholder the file to be launched does not need to be an exe - than the default application associated with the file type is launched via shellexecute Took me some time to update the "universal launcher" because the rotten virus scanner (McAfee) insists on deleting the powerbasic compiler. best regards, Marc Edited September 27, 2018 by Marc clarified selection of icon Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL)
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