All Projects → nickrod518 → Create-EXEFromPS1

nickrod518 / Create-EXEFromPS1

Licence: other
Takes one PowerShell script and any number of supplementary files or even a directory and creates an exe using Windows's built in iexpress program. The exe will run on any machine with PowerShell 2.0+.

Programming Languages

powershell
5483 projects

Projects that are alternatives of or similar to Create-EXEFromPS1

save-file-converter
Converter for retro console save files found around the Internet. All common formats for NES/SNES/GBA/N64/TG16/SMS/Genesis/Neo Geo/PS1 supported. Decrypts PSP saves. Converts to and from Retron 5 and MiSTer
Stars: ✭ 56 (-30.86%)
Mutual labels:  converter, ps1
winallenum
This powershell script has got to run in remote hacked windows host, even for pivoting
Stars: ✭ 13 (-83.95%)
Mutual labels:  ps1, powershell-script
LazyTS
PowerShell Script (GUI) to manage Terminal Sessions
Stars: ✭ 85 (+4.94%)
Mutual labels:  ps1, powershell-script
RedTeam
One line PS scripts that may come handy during your network assesment
Stars: ✭ 56 (-30.86%)
Mutual labels:  ps1, powershell-script
CTR-tools
Crash Team Racing (PS1) tools - a C# framework by DCxDemo and a set of tools to parse files found in the original kart racing game by Naughty Dog.
Stars: ✭ 93 (+14.81%)
Mutual labels:  converter, ps1
ipynb-py-convert
Convert .py files runnable in VSCode or Atom/Hydrogen to Jupyter .ipynb notebooks and vice versa
Stars: ✭ 38 (-53.09%)
Mutual labels:  converter
docker lnmp
一键部署基于docker的LAMP环境,并利用electron + vue 提供gui管理。+++ 可配置的多进程php扩展安装
Stars: ✭ 37 (-54.32%)
Mutual labels:  ps1
video2gif
A batch script for convert video to GIF files by FFmpeg.exe on Windows
Stars: ✭ 48 (-40.74%)
Mutual labels:  converter
ical2json
A simple node package to convert ical data to json
Stars: ✭ 46 (-43.21%)
Mutual labels:  converter
unicode-formatter
Convert portions of text to fancy text using unicode fonts for use on Twitter and other sites that don't support rich text
Stars: ✭ 31 (-61.73%)
Mutual labels:  converter
Backup-Scripts
PowerShell Scripts and Automation Manager Policies for N-able Backup
Stars: ✭ 26 (-67.9%)
Mutual labels:  ps1
Text to MD
Convert your docs to markdown format.
Stars: ✭ 15 (-81.48%)
Mutual labels:  converter
form-data-json
A zero dependency, cross browser library to easily get or set/manipulate form input values as/from a json object.
Stars: ✭ 37 (-54.32%)
Mutual labels:  converter
Video-to-audio-converter
A simple tool to convert video files into mp3 audio files
Stars: ✭ 40 (-50.62%)
Mutual labels:  converter
color-converter
Command line tool for converting colors from RGB to HEX and vice versa.
Stars: ✭ 17 (-79.01%)
Mutual labels:  converter
can2mqtt
Bidirectional CAN-Bus to MQTT-Bridge
Stars: ✭ 39 (-51.85%)
Mutual labels:  converter
AutomatedOutlookSignature
PowerShell script to automate the creation of Outlook signatures using Active Directory attributes.
Stars: ✭ 36 (-55.56%)
Mutual labels:  powershell-script
ubase
remove accents from utf8 strings
Stars: ✭ 14 (-82.72%)
Mutual labels:  converter
BTPS-SecPack
This repository contains a collection of PowerShell tools that can be utilized to protect and defend an environment based on the recommendations of multiple cyber security researchers at Microsoft. These tools were created with a small to medium size enterprise environment in mind as smaller organizations do not always have the type of funding a…
Stars: ✭ 33 (-59.26%)
Mutual labels:  ps1
react-in-out-textarea
A simple React.js User Interface Component that is like Google Translate with full TypeScript Support
Stars: ✭ 28 (-65.43%)
Mutual labels:  converter

Create-EXEFromPS1

Takes one PowerShell script and any number of supplementary files or even a directory and creates an exe using Windows's built in iexpress program. The exe will run on any machine with PowerShell 2.0+.

Portable Script

If you don't want to mess with the module, you can simply use the Create-EXEFrom.ps1 script. For details on advanced parameters, reference below.

Module

Copy the repo into your modules directory (C:\Users<username>\Documents\WindowsPowerShell\Modules) and then you will be able to import by typing Import-Module Create-EXEFromPS1 in PowerShell. If you wish for the module to be automatically imported you can enter Add-Content $profile 'Import-Module Create-EXEFromPS1' in PowerShell. The command can be run with New-EXEFromPS1.

Running

To simply turn one ps1 into an exe, run with no parameters and you will be prompted to select the file from a file browser. For details on advanced parameters, reference below.

By default, if your scripts reference relative paths or you use $PSScriptRoot, the temporary directory that the exe's contents were extracted to will be used. To use the directory that the exe is run from, use $(Split-Path -Parent $args[0]).

Parameters

PSScriptPath - Path string to PowerShell script that you want to use as the first thing iexpress calls when the exe is run. If blank, you will be prompted with a file browse dialog where you can select a file.

SupplementalFilePaths - Array of comma separated supplemental file paths that you want to include as resources.

SelectSupplementalFiles - Use this flag to be prompted to select the supplementary files in an Open File Dialog.

SupplementalDirectoryPath - Path to a directory that will be zipped and added as a supplementary file. When the exe is run, this script will first be unzipped and all files are available.

SelectSupplementalDirectory - Use this flag to be prompted to select a directory in an Open File Dialog that will be zipped and added as a supplementary file. When the exe is run, this script will first be unzipped and all files are available.

KeepTempDir - Keep the temp directory around after the exe is created. It is available at the root of C:.

x86 - Use the 32-bit iexpress path so that 32-bit PowerShell is consequently called. Intended for compatibility with older devices.

SigningCertificate - Sign all PowerShell scripts and subsequent executable with the defined certificate. Expected format of Cert:\CurrentUser\My\XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

OutputDirectory - Move the completed executable to the defined directory.

Examples

New-EXEFromPS1 -PSScriptPath .\test.ps1 -SupplementalFilePaths '..\test2.ps1', .\ps1toexe.ps1
# Creates an exe using the provided PowerShell script and supplemental files.

New-EXEFromPS1 -SelectSupplementalFiles
Prompts the user to select the PowerShell script and supplemental files using an Open File Dialog.

New-EXEFromPS1 -SupplementalDirectoryPath 'C:\Temp\MyTestDir' -KeepTempDir
# Zips MyTestDir and attaches it to the exe. When the exe is run, but before the user's script gets run, 
# it will be extracted to the same directory as the user's script. Temp directory used during exe creation
# will be left intact for user inspection or debugging purposes.

New-EXEFromPS1 -SelectSupplementalFiles -x86 -SigningCertificate Cert:\CurrentUser\My\XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -OutputDirectory $env:userprofile\Desktop
# Prompts the user to select the PowerShell script and supplemental files using an Open File Dialog. Creates a 32-bit application using the 32-bit iexpress binary.
# If the defined script or supplemental files are PowerShell scripts they will be signed with the defined certificate. Once the executable is generated it will also
# be signed and moved to the specified output directory.

Issues

None that I'm aware of, but please let me know if you find any!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].