We can use 7zip SFX to create installers without a switch. here you can quickly go through
Requirements
7Zip: You can download the latest version of 7zip from the official website .
7Zip SFX Module: The official download page is here .
Resource Hacker or any other resource editor (optional): if you want to use a custom icon for the final executable, you must use the resource editor application and replace the icon with the desired one. here the Resource Hacker application download the link from the developer's site.
Step 1:
Create the exec.bat file in the same folder of your msi file and copy msiexec /i "path of msi file" /qn . I used Installer.msi for my example, here is my file:
@Echo off msiexec /i installer.msi /qn
Step 2:
Compressing msi and bat files into a 7z archive (you can download and install 7zip from here ) into a sample, I compressed my Installer.msi and exec.bat into an installer.7z archive.

Step 3:
Download and extract 7zSD (from the 7zSfx link) and place the file in the same archive folder, here is a direct link to it.
Step 4 (optional):
We can change the installer icon to do this, we must replace the 7zsd.sfx file 7zsd.sfx , in the resource hacker we need to open 7zsd.sfx and go to IconGroup > 101 > 1049 and replace the icon with the desired one. then save the new sfx file in the same folder of the generated 7z archive. I saved mine as 7zsdInstaller.sfx .

Step 5:
We must create a configuration file to tell the Sfx file what to do after extracting the archive, here is the configuration file for the sample:
; !@Install @!UTF-8! GUIFlags="8+32" ExtractDialogText="My Sample Installer" RunProgram="exec.bat" ; !@InstallEnd @!
We must save it in the same folder of our 7z Archive, I named my config.txt .
Step6:
Now we need to combine our file with one executable file to do this, first we must go to our command line in the folder in which our generated files are stored, and then we must execute the following command:
copy /b 7zsdInstaller.sfx + config.txt + Installer.7z "installer.exe"
Now we should have the installer.exe file in the same folder

user3473830
source share