Creating a installer which will run a specific batch file - windows

I need a help from you. Here is my total scenario:
I have created a batch file which will install some digital certificate. Now I need to make a one click installer(.exe) which will extract all the files (my provided digital certificates and bat file in the .exe file) to the temp folder and run the bat file to install them. After finishing, it delete the extracted files from temp folder. I made the bat file and it is working well but can't make the one click installer.
Can anyone suggest me how to create that one click installer (.exe)?

Windows comes with an integrated installer creator. IExpress.

I prefer 7z for mine. See link in MikeG's comment for additional details.
https://superuser.com/questions/42788/is-it-possible-to-execute-a-file-after-extraction-from-a-7-zip-self-extracting-a

Related

I can't create self-extract file with WINRAR because Defender says it's a trojan named Wacatac

I'm trying to create a self-extract EXE to run my installer program, which is conformed by 3 files so I need to pack it for distribution.
The problem is that once the file is created using WinRAR, it's automatically deleted by Windows Defender because it thinks it's a trojan named Wacatac.
What can I do about it?? I can't find any info on this trojan to know what to do to avoid this.
Fixed - I had to switch compression format to ZIP instead of RAR, this way Windows Defender no longer identifies the file as a virus/trojan.

Package nwjs app into a single exe

I have created an installer program for my application using NWJS. I need to package the NWJS app into a single exe. I was going to use windows iexpress becasue that would provide exactly the function I need, however I can't use that because it does not support directorys inside the archive and even with the app html files packaged into package.nw NWJS still requires the locales directory to run and also iexpress has some security flaws.
Basically I need something like this:
1: it is a single portable executable file which contains some sort of archive with the nwjs files in it.
2: when the exe is run it extracts the archive to a temporary directory and runs nwjs.
3: when nwjs exits it deletes the temp directory.
So far I have not found any way of doing this.
I did some more research and solved it myself by using Enigma Virtual Box.
http://enigmaprotector.com/en/downloads.html

Alter Windows install program

I have a setupOriginal.exe file, and I would need to update it to had some features.
I can unzip it with 7Zip and it contains a hierarchy like that:
Autorun.inf
setup.exe
setup.exe.manifest
Directory\main.msi
As far as I know, the file setupOriginal.exe is some kind of auto extractable file since I can unzip it.
Once unzipped, I can modify the main.msi file.
But, I am not able to rebuild the packed setup.exe into one file setupAltered.exe which would run the same way as before, and contain the hierarchy:
Autorun.inf
setup.exe
setup.exe.manifest
Directory\mainAltered.msi
I tried:
to build self extractable with 7Zip and WinZip but there is an intermediate unzip step
to update setupOriginal.exe inline and save directly without unzipping in WinZip (a new exe is generated, but it is broken) and 7Zip (error message when adding mainAltered.msi "function not implemented")
I guess files are packed with a tool that forward the setup to the inner setup.exe, but I don't know it.
Do I need to use some kind of installer tools (InnoSetup etc.) to wrap the files ? In this case, how could I do it if I just want to pack the files, and run the setup.exe from inside the packed archive (I mean without introducing a intermediate window added by the installer tool itself) ?
Is there any simple way to do that please ?
Thanks,
To anymore interested, the best approach I found is to use WinZip Self-Extractor program (part of binaries created by WinZip, but different from the main WinZip program I tried to use for SFX, and that will not allow to tune options as far as I know).
You can request for automatic unzipping, set icon and run the inner setup.exe afterwards.
And, finally, it can be called from command line:
"C:\Program Files (x86)\WinZip Self-Extractor\WZIPSE32.EXE" test.zip -setup -t dialog.txt -auto -i icon.ico -c .\setup.exe

How to autolaunch installer from dmg

I want to deploy my program on Macintosh and I have a working installer but the installer and the files are packed into a zip file. I would like to make a DMG file and place them into it. This is easy to do but I would like the installer to start automatically when the user opens the DMG file. Is there any way to do that?
No, you cannot do this. What you need to do is convert your installer package to a flat package (these are now the default anyway). A flat package installer is a single file, so there's no need to bundle it into a zip or DMG.

Advanced Installer: Installed .exe won't launch from installation directory

Using Advanced Installer, I have created and run a simple installer that contains a single .exe.
This .exe started as an executable jar (w/ splashscreen) and was built into a Windows .exe using Launch4j.
Once the application is installed (in C:\Program Files (x86)...), I can't execute it from the installation directory. However, if I copy the .exe to anywhere else, Desktop, or any other directories created by other installers, the .exe will start perfectly.
This appears to be a folder or application permissions issue. Comparing the permissions between this folder and the one created by Advanced Installer, the permissions and settings are identical.
The ONLY difference I see, between the installed .exe and the same .exe copied to another folder, is that the "Edit Permissions" button has an admin shield on it (one originally installed by AI).
Is there a setting in Advanced Installer that will allow my .exe to run once installed, or is this just trickery employed by AI to get you to pay for a more robust version? I am unable to make any changes in the OS that enable this file to run in the directory created by AI.
If the executable fails to run from Program Files but does works from another folder it most probably happens that your EXE needs write access to that folder. If you launch it with the option "Run as administrator" it should work. This is not caused by a limitation from Advanced Installer.
Starting with Vista onward you can embed a manifest file into an executable file, that specifies for the OS the execution level, so you can set the level to "RequireAdministrator", thus your will EXE will always behave as you launch it with the option "Run as administrator" when launched from a shortcut or double-clicked.
The cause of this error was that the target directory included an exclamation mark. "!".
I had switched to using InnoInstaller and it was working in an initial version, until I later switched the target dir to include the exclamation mark, and it was broken in the same way. (Removing it fixed.)
Have no idea why this was causing the problem, just an fyi.

Resources