0

I want to compile my files into 1 setup that automatically extracts files without "Choose Installation Directory" dialog box.

I have a folder named SETUP, inside the folder there is 1 BAT file and another folder named MYFILES which has 3 files inside. Here's the BAT command :

@echo off 

if not exist "%USERPROFILE%\AppData\Local\Temp\SampleFolder" mkdir 
"%USERPROFILE%\AppData\Local\Temp\SampleFolder"
xcopy myfiles "%USERPROFILE%\AppData\Local\Temp\SampleFolder"/H /E
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /V "Automatic" 
/t REG_SZ /F /D 
""""%USERPROFILE%\AppData\Local\Temp\SampleFiles\sample.exe""" -autorun"

What I want to happen is to convert the SETUP folder into a setup file that runs according to BAT file commands, and also automatically extract file to the given destination without "Choose Installation Directory" prompt, no user interactions needed, just a click of setup.

I already looked up into this thread iexpress hardcode extraction destination but answers there doesnt fit with what i want to happen. I really need help, any comment is appreciated.

  • Thanks for commenting. I know folder cant be converted into a file, what i mean there is I want my SETUP folder to be an installer package, that contains other files inside. I want the installer run according to the batch file command but i dont know how to do it. – EXE Creations Jan 31 '19 at 20:00
  • No installation will happen, just copy all files in the given directory, i want everything just to be copied including _example.exe_ – EXE Creations Jan 31 '19 at 20:02
  • Im sorry I really cant explain it clearly because Im not good in english, but I will try. – EXE Creations Jan 31 '19 at 20:04
  • all good, try as best you can, give me example input and output and I WILL try my best to help you. – Gerhard Jan 31 '19 at 20:04
  • I want to put my files inside a one installer to become neat, I want that installer to copy those files in a directory, and if that directory is not existing, it will automatically create it, and after copying the files, it will add a registry key. – EXE Creations Jan 31 '19 at 20:11
  • ok, but that is more or less what your code does already. But what is the purpose of your registry key? – Gerhard Jan 31 '19 at 20:12
  • What i literally want to happen is to attach those files in the BAT file, instead of using a container to be organized, why not combine them all in one file. – EXE Creations Jan 31 '19 at 20:12
  • ok, so to attach text to a batch file yes.. executable files, not, to rewrite and compile binary files using batch is not an idea... why not do a self extracting zip file? – Gerhard Jan 31 '19 at 20:14
  • Can i make a self extracting zip file that creates directory if not existing? And how about the registry stuff? – EXE Creations Jan 31 '19 at 20:20
  • edit your question and show me some sample files you have and show me the purpose of the reg key. – Gerhard Jan 31 '19 at 20:29
  • The purpose of the registry part is to get the included executable file to run every time the user starts their system. Of course for this to happen, because you're adding that to the HKLM root key, you'll very likely need to run the sequence as Administrator, due to security restrictions built into modern Windows Operating Systems. Then again, as you're running a file located in the users %Temp% directory, I and many security based products would assume your file to be potentially malicious. There are hundreds of programs available for creating self extracting executables, just choose one. – Compo Jan 31 '19 at 21:20

0 Answers0