Loading...

How to create an exe using Winrar to run a Powershell script

Reply A+ A-

In this post I will show you how to create an EXE file using Winrar to run a PS1 file or GUI.
Indeed some people asked me how have I created my EXE file in previous post.

There are many ways to do this. 
You can use PowerGUI using this how to on DexterPOSH's blog.
You can also use PowerShell Studio using this how-to.

Using Winrar is may be not the better way but as in PowerShell there are many ways to get the result you want.




In this example I will create a self-extracting exe using Winrar to run the GUI I have shared previously, MDT Application Manager.

This tool is composed of the files below

The file MDT_Application_Manager.ps1 is this one which will be launched when you run the EXE.

Now let's see how to create this exe.

1 / Open Winrar and click on the Wizard button
2 / Then select Create a new archive

 3 / Browse to your folder content and select all files and folder you need and then OK

4 / Type the name you want to give to your exe

5 /  Check Create a self-extracting (.exe) archive and then Finish

6 /  The exe should has been created on your Desktop, right-click on it and select Open with Winrar then click on the SFX button.

7 / Now go to the Comment tab and copy the part below 


See below some arguments for Winrar, or this link 


8 / If you want to set an icon to your exe file go to the Advanced SFX options button

9 / Go to the Text and Icon tab and browse to your icon in the Load SFX icon part

10 / Now if I run my exe the GUI below will be opened


As I like automation I'll soon create a Powerscript script or GUI to automate this task.


Winrar 8804166304792080577

Enregistrer un commentaire

Accueil item

Award

Learn KQL in one month

Sponsors

You want to support me ?

Mes articles en français

Books in French


Stats