0

I have been trying to convert a powershell script to exe, So I came across this tool PS2EXE by this thread. Now the exe is successfully created but the issue is, the converting powershell script on top imports another powershell scripts and use it. So on running the exe, it throws erorrs.

my powershell script:

`source.ps1

. "$PSScriptRoot\Start_Common.ps1" #importing the other ps script

set_start_default_values "n" "y" # Set both 
use_args($args)
print_parameters`

Now exe converted with ps2exe with command ps2exe .\source.ps1 .\target.exe

on executing throws the below error

ERROR: The term '\Start_Common.ps1' is not recognized as the name of a cmdlet, function, 
script file, or operable program. Check the spelling of the name, or if a path was 
included, verify that the path is correct and try again.
Hack Try
  • 471
  • 4
  • 17

0 Answers0