If you don’t have a tool for packaging, like Advanced Installer for example, you can create a self-extracting .Exe that runs a command after installation with 7Zip SFX Maker. You can find 7Zip SFX Maker here.
Once you have it downloaded and installed there are a few steps to take to create your EXE.
In this example, i created an MSI and an Install.vbs that installs the MSI.
Select the MSI and VBS, right-click>7zip>Add to archive.
Note: When you create the archive, be sure to select the Compression Method to LZMA!
Right-Click the 7Zip SFX Maker shortcut and Run as Administrator.
In the files tab, add your previously created Archive.7z.
Now, there are a few more changes to be done to the SFX.
Lets start with the dialogs tab and all its sub-tabs.
In the General sub-tab be sure to set the Overwrite mode to Overwrite all files and make sure the checkbox Extract to temporary folder is checked.
In the Begin Promp sub-tab, uncheck the Begin Promp checkbox.
In the Extract Path sub-tab, uncheck the Allow users to change path checkbox.
In the Progress sub-tab, check the Hide extraction progress checkbox.
In the Finish Message sub-tab, uncheck the Finish message checkbox.
In the Cancel Promp sub-tab, uncheck the Cancel Prompt checkbox.
In the Taks tab, add the following line: RunProgram=”\”cmd.exe\” /c”
Leave the other tabs as they are.
Now click Make SFX in the bottom right.
And voila, you now have your .exe file created
Example.sfx.exe wscript.exe Install.vbs
Now the Example.sfx.exe will extract in %temp% and run the Install.vbs that is present inside it.