{"id":14980300,"url":"https://github.com/nickrod518/create-exefromps1","last_synced_at":"2025-10-28T23:31:28.131Z","repository":{"id":49627830,"uuid":"55542857","full_name":"nickrod518/Create-EXEFromPS1","owner":"nickrod518","description":"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+.","archived":false,"fork":false,"pushed_at":"2021-06-11T20:16:19.000Z","size":50,"stargazers_count":95,"open_issues_count":4,"forks_count":32,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-02-01T19:39:17.861Z","etag":null,"topics":["converter","powershell","powershell-script","ps1","script"],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nickrod518.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-05T20:19:00.000Z","updated_at":"2024-10-05T17:25:39.000Z","dependencies_parsed_at":"2022-09-18T19:00:56.056Z","dependency_job_id":null,"html_url":"https://github.com/nickrod518/Create-EXEFromPS1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickrod518%2FCreate-EXEFromPS1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickrod518%2FCreate-EXEFromPS1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickrod518%2FCreate-EXEFromPS1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickrod518%2FCreate-EXEFromPS1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nickrod518","download_url":"https://codeload.github.com/nickrod518/Create-EXEFromPS1/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238738019,"owners_count":19522296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["converter","powershell","powershell-script","ps1","script"],"created_at":"2024-09-24T14:01:34.782Z","updated_at":"2025-10-28T23:31:22.844Z","avatar_url":"https://github.com/nickrod518.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Create-EXEFromPS1\nTakes 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+.\n\n## Portable Script\nIf 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. \n\n## Module\nCopy the repo into your modules directory (C:\\Users\\\u003cusername\u003e\\Documents\\WindowsPowerShell\\Modules\\) and then you will be able to import by typing \n`Import-Module Create-EXEFromPS1` in PowerShell.\nIf 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.\n\n## Running\nTo 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.\n\nBy 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])`.\n\n### Parameters\n**PSScriptPath** - Path string to PowerShell script that you want to use as the first thing iexpress calls when the exe is run.\nIf blank, you will be prompted with a file browse dialog where you can select a file.\n\n**SupplementalFilePaths** - Array of comma separated supplemental file paths that you want to include as resources.\n\n**SelectSupplementalFiles** - Use this flag to be prompted to select the supplementary files in an Open File Dialog.\n\n**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.\n\n**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.\n\n**KeepTempDir** - Keep the temp directory around after the exe is created. It is available at the root of C:.\n\n**x86** - Use the 32-bit iexpress path so that 32-bit PowerShell is consequently called. Intended for compatibility with older devices.\n\n**SigningCertificate** - Sign all PowerShell scripts and subsequent executable with the defined certificate. Expected format of Cert:\\CurrentUser\\My\\XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n\n**OutputDirectory** - Move the completed executable to the defined directory.\n\n### Examples\n```\nNew-EXEFromPS1 -PSScriptPath .\\test.ps1 -SupplementalFilePaths '..\\test2.ps1', .\\ps1toexe.ps1\n# Creates an exe using the provided PowerShell script and supplemental files.\n\nNew-EXEFromPS1 -SelectSupplementalFiles\nPrompts the user to select the PowerShell script and supplemental files using an Open File Dialog.\n\nNew-EXEFromPS1 -SupplementalDirectoryPath 'C:\\Temp\\MyTestDir' -KeepTempDir\n# Zips MyTestDir and attaches it to the exe. When the exe is run, but before the user's script gets run, \n# it will be extracted to the same directory as the user's script. Temp directory used during exe creation\n# will be left intact for user inspection or debugging purposes.\n\nNew-EXEFromPS1 -SelectSupplementalFiles -x86 -SigningCertificate Cert:\\CurrentUser\\My\\XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -OutputDirectory $env:userprofile\\Desktop\n# 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.\n# 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\n# be signed and moved to the specified output directory.\n```\n\n## Issues\nNone that I'm aware of, but please let me know if you find any!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickrod518%2Fcreate-exefromps1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickrod518%2Fcreate-exefromps1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickrod518%2Fcreate-exefromps1/lists"}