If you’re dealing with muliple files in your scripts, it is best to package them all into one EXE. In this tutorial, I will show you how to package your scripts using WinRAR.
Step 1: Highlight all your files, right click one of them and select Add to Archive
Step 2: Name your Archive and replace .RAR with .EXE. Once you have done that; Make sure that Create SFX Archive is selected.
Step 3: Click on SFX Options
Step 4: Type in the directory where you want the files to be extracted to, and click on the Setup tab.
Step 5: Type in the file name that you would like to start after your package is extracted, and then click on the Modes tab.
Step 6: Choose Hide All, and click on the Update tab.
Step 7: Choose Extract and Replace Files, and Overwrite All Files. Now click OK.
Step 8: Click OK and your package will appear in the folder with all your files.
DK
This is an amazing find and great tutorial! I was racking my brains for weeks trying to figure out how to get something to run, but this literally works PERFECTLY.
I have a ps1 file, which i need to run in the currently logged-on user’s context, which i created a simple batch file for.
wrapped it all up into an EXE as per this guide and it runs perfectly.
Thanks!
Jose Espitia
I’m glad to hear it worked out for you 🙂