Quantcast
Channel: PS2EXE
Viewing all 87 articles
Browse latest View live

New Post: Version 4.0

$
0
0
Hi Team,

PS2exe is not working on Version 4.0.

Regards
Taqui

New Post: PowerShell 4.0 Support

$
0
0
Hello !

Since few day i use Windows 8.1 and powershell 4.0. So i have this problem too. I try to add line in ps2exe.ps1 but after compile, my exe don't work :/

So i modify "callPS2EXE.bat" :
last line = powershell.exe -command "&'.\ps2exe.ps1' %cmd%"
Add -version 2.0 = powershell.exe -version 2.0 -command "&'.\ps2exe.ps1' %cmd%"

I hope this can help.

Released: PS2EXE v0.5 (Nov 14, 2014)

$
0
0
!v0.5.0.0

Support for PowerShell 4.0

Created Release: PS2EXE v0.5 (Nov 14, 2014)

$
0
0
!v0.5.0.0

Support for PowerShell 4.0

Updated Wiki: Home

$
0
0

In the last days I created the tool “PS2EXE”. It is able to “convert” PowerShell scripts to “standalone” EXE files.

It’s BETA in the current version 0.5.0.0. 

 

New in v0.4.0.0 (14/11/2013):

 

  • support for PowerShell 4.0
  • VS project updated to VS2013 and .NET 4.0

 

New in v0.4.0.0 (03/09/2013):

  • parameter -sta for running PowerShell in Single Thread Apartment mode
  • parameter -mta for running PowerShell in Multi Thread Apartment mode
  • parameter -noconsole to compile the resulting exe file als "Windows Application". the only implemented GUI interaction is for "get-credential"!!
  • Blog article coming soon...

New in v0.3.0.0 (03/08/2013):

Here are the previous articles on my blog:

Original description of v0.1.0.0

But: It does not convert the PowerShell script to an other language! It encapsulates the script with a lightweight PowerShell host written in C# and compiles the dynamically generated C# source code in memory to an EXE file. The resulting EXE is an .NET assembly that contains the source script encoded in Base64. The EXE includes all stuff that is needed to execute an PowerShell through the .NET object model. It is based on classes in the namespace System.Management.Automation that reperents the PowerShell engine. – Therefore the EXE file is not a real “standalone” EXE file. It needs PowerShell to be installed!!! And – of course – it needs .NET Framework v2.0. Furthermore “script execution” have to be allowed (see cmdlet: set-execultionpolicy). – The resulting EXE is “MSIL” and is able to execute as x64 or x86.

The tool “PS2EXE” itself is a PowerShell script! – It does the in-memory compilation and generates the EXE file. It uses the CSharpCodeProvider class of namespace Microsoft.CSharp.

The script is really simple. I contains a multiline string that represents the PowerShell host I’ve written. This is much more interesting than the PS2EXE.ps1 script itself. – Have a look into it!

Usage:

Call  the script with this parameters:

-inputFilePowerShell script file
-outputFilefile name (with path) for the destination EXE file
-debug(switch) generate debug info in the destination EXE file. The dynamically generated .CS file will stored beside the output EXE file. Furthermore a .PDB file will be generated for the EXE file
-verbose(switch) shows also verbose informations – if any.
-x86(switch) compile EXE to run as 32 bit application
-x64(switch) compile EXE to run as 64 bit application
-runtime20(switch) force running the EXE in PowerShell 2.0 using .NET 2.0
-runtime30(switch) force running the EXE in PowerShell 3.0 using .NET 4.0
-lcidspecify language ID for threads
-starun PowerShell environment in Single Thread Apartment mode
-mtarun PowerShell environment in Multithread Apartment mode
-noconsolecompile PS script as Windows application

Sample:

image_thumb[2]

This creates “test.exe” out of the PowerShell source file “test.ps1”

Limitations: It’s not easy to create a fully functional PowerShell host such as “Console host” (powershell.exe) or “ISE” (powershell_ise.exe). So there may be functionality that does not work properly.

 

The generated EXE can also be calls using command line options. There are 4 options that are used by the PowerShell host:

-debugForces the EXE to be debugged. It calls “System.Diagnostics.Debugger.Break()”.
-extract:”Filename”Extracts the PowerShell script inside the EXE and saves it as “Filename”. The script will not be executed.
-waitAt the end of the script execution it writes “Press a key…” and waits for a key to be pressed.
-endAll following options will be passed to the script inside the EXE. All preceding options are used by the EXE and will not be passed to the script.

Sample:

I create a script file containing this line of code:

$args | Write-Host

 

I save it as “c:\test2.ps1” and convert it as EXE by using PS2EXE:

image_thumb[5]

Sample 1.: “-wait” forces the “Hit any key…” message. All options following “-end” will be passed to the script.

Sample 2., 3. : The script will not get options preceding to “-end”.

Sample 4: “-wait” follows to “-end” and so it’s passed to the script. No message “Hit any key…”.

So. That’s it for the moment. Please feel free to modify the script and let me know.

Possible tasks:

  • Sign the script inside the EXE with code signature
  • Sign the EXE with code signature
  • Compress the script inside the EXE
  • Improve the PSHost implementation inside the EXE.

Have fun!

Updated Wiki: Home

$
0
0

In the last days I created the tool “PS2EXE”. It is able to “convert” PowerShell scripts to “standalone” EXE files.

It’s BETA in the current version 0.5.0.0.  

New in v0.4.0.0 (14/11/2013): 

  • support for PowerShell 4.0
  • VS project updated to VS2013 and .NET 4.0

 

New in v0.4.0.0 (03/09/2013):

  • parameter -sta for running PowerShell in Single Thread Apartment mode
  • parameter -mta for running PowerShell in Multi Thread Apartment mode
  • parameter -noconsole to compile the resulting exe file als "Windows Application". the only implemented GUI interaction is for "get-credential"!!
  • Blog article coming soon...

New in v0.3.0.0 (03/08/2013):

Here are the previous articles on my blog:

Original description of v0.1.0.0

But: It does not convert the PowerShell script to an other language! It encapsulates the script with a lightweight PowerShell host written in C# and compiles the dynamically generated C# source code in memory to an EXE file. The resulting EXE is an .NET assembly that contains the source script encoded in Base64. The EXE includes all stuff that is needed to execute an PowerShell through the .NET object model. It is based on classes in the namespace System.Management.Automation that reperents the PowerShell engine. – Therefore the EXE file is not a real “standalone” EXE file. It needs PowerShell to be installed!!! And – of course – it needs .NET Framework v2.0. Furthermore “script execution” have to be allowed (see cmdlet: set-execultionpolicy). – The resulting EXE is “MSIL” and is able to execute as x64 or x86.

The tool “PS2EXE” itself is a PowerShell script! – It does the in-memory compilation and generates the EXE file. It uses the CSharpCodeProvider class of namespace Microsoft.CSharp.

The script is really simple. I contains a multiline string that represents the PowerShell host I’ve written. This is much more interesting than the PS2EXE.ps1 script itself. – Have a look into it!

Usage:

Call  the script with this parameters:

-inputFilePowerShell script file
-outputFilefile name (with path) for the destination EXE file
-debug(switch) generate debug info in the destination EXE file. The dynamically generated .CS file will stored beside the output EXE file. Furthermore a .PDB file will be generated for the EXE file
-verbose(switch) shows also verbose informations – if any.
-x86(switch) compile EXE to run as 32 bit application
-x64(switch) compile EXE to run as 64 bit application
-runtime20(switch) force running the EXE in PowerShell 2.0 using .NET 2.0
-runtime30(switch) force running the EXE in PowerShell 3.0 using .NET 4.0
-lcidspecify language ID for threads
-starun PowerShell environment in Single Thread Apartment mode
-mtarun PowerShell environment in Multithread Apartment mode
-noconsolecompile PS script as Windows application

Sample:

image_thumb[2]

This creates “test.exe” out of the PowerShell source file “test.ps1”

Limitations: It’s not easy to create a fully functional PowerShell host such as “Console host” (powershell.exe) or “ISE” (powershell_ise.exe). So there may be functionality that does not work properly.

 

The generated EXE can also be calls using command line options. There are 4 options that are used by the PowerShell host:

-debugForces the EXE to be debugged. It calls “System.Diagnostics.Debugger.Break()”.
-extract:”Filename”Extracts the PowerShell script inside the EXE and saves it as “Filename”. The script will not be executed.
-waitAt the end of the script execution it writes “Press a key…” and waits for a key to be pressed.
-endAll following options will be passed to the script inside the EXE. All preceding options are used by the EXE and will not be passed to the script.

Sample:

I create a script file containing this line of code:

$args | Write-Host

 

I save it as “c:\test2.ps1” and convert it as EXE by using PS2EXE:

image_thumb[5]

Sample 1.: “-wait” forces the “Hit any key…” message. All options following “-end” will be passed to the script.

Sample 2., 3. : The script will not get options preceding to “-end”.

Sample 4: “-wait” follows to “-end” and so it’s passed to the script. No message “Hit any key…”.

So. That’s it for the moment. Please feel free to modify the script and let me know.

Possible tasks:

  • Sign the script inside the EXE with code signature
  • Sign the EXE with code signature
  • Compress the script inside the EXE
  • Improve the PSHost implementation inside the EXE.

Have fun!

Updated Wiki: Home

$
0
0

In the last days I created the tool “PS2EXE”. It is able to “convert” PowerShell scripts to “standalone” EXE files.

It’s BETA in the current version 0.5.0.0.  

New in v0.4.0.0 (14/11/2013): 

  • support for PowerShell 4.0
  • VS project updated to VS2013 and .NET 4.0 

New in v0.4.0.0 (03/09/2013):

  • parameter -sta for running PowerShell in Single Thread Apartment mode
  • parameter -mta for running PowerShell in Multi Thread Apartment mode
  • parameter -noconsole to compile the resulting exe file als "Windows Application". the only implemented GUI interaction is for "get-credential"!!
  • Blog article coming soon...

New in v0.3.0.0 (03/08/2013):

Here are the previous articles on my blog:

Original description of v0.1.0.0

But: It does not convert the PowerShell script to an other language! It encapsulates the script with a lightweight PowerShell host written in C# and compiles the dynamically generated C# source code in memory to an EXE file. The resulting EXE is an .NET assembly that contains the source script encoded in Base64. The EXE includes all stuff that is needed to execute an PowerShell through the .NET object model. It is based on classes in the namespace System.Management.Automation that reperents the PowerShell engine. – Therefore the EXE file is not a real “standalone” EXE file. It needs PowerShell to be installed!!! And – of course – it needs .NET Framework v2.0. Furthermore “script execution” have to be allowed (see cmdlet: set-execultionpolicy). – The resulting EXE is “MSIL” and is able to execute as x64 or x86.

The tool “PS2EXE” itself is a PowerShell script! – It does the in-memory compilation and generates the EXE file. It uses the CSharpCodeProvider class of namespace Microsoft.CSharp.

The script is really simple. I contains a multiline string that represents the PowerShell host I’ve written. This is much more interesting than the PS2EXE.ps1 script itself. – Have a look into it!

Usage:

Call  the script with this parameters:

-inputFilePowerShell script file
-outputFilefile name (with path) for the destination EXE file
-debug(switch) generate debug info in the destination EXE file. The dynamically generated .CS file will stored beside the output EXE file. Furthermore a .PDB file will be generated for the EXE file
-verbose(switch) shows also verbose informations – if any.
-x86(switch) compile EXE to run as 32 bit application
-x64(switch) compile EXE to run as 64 bit application
-runtime20(switch) force running the EXE in PowerShell 2.0 using .NET 2.0
-runtime30(switch) force running the EXE in PowerShell 3.0 using .NET 4.0
-lcidspecify language ID for threads
-starun PowerShell environment in Single Thread Apartment mode
-mtarun PowerShell environment in Multithread Apartment mode
-noconsolecompile PS script as Windows application

Sample:

image_thumb[2]

This creates “test.exe” out of the PowerShell source file “test.ps1”

Limitations: It’s not easy to create a fully functional PowerShell host such as “Console host” (powershell.exe) or “ISE” (powershell_ise.exe). So there may be functionality that does not work properly.

 

The generated EXE can also be calls using command line options. There are 4 options that are used by the PowerShell host:

-debugForces the EXE to be debugged. It calls “System.Diagnostics.Debugger.Break()”.
-extract:”Filename”Extracts the PowerShell script inside the EXE and saves it as “Filename”. The script will not be executed.
-waitAt the end of the script execution it writes “Press a key…” and waits for a key to be pressed.
-endAll following options will be passed to the script inside the EXE. All preceding options are used by the EXE and will not be passed to the script.

Sample:

I create a script file containing this line of code:

$args | Write-Host

 

I save it as “c:\test2.ps1” and convert it as EXE by using PS2EXE:

image_thumb[5]

Sample 1.: “-wait” forces the “Hit any key…” message. All options following “-end” will be passed to the script.

Sample 2., 3. : The script will not get options preceding to “-end”.

Sample 4: “-wait” follows to “-end” and so it’s passed to the script. No message “Hit any key…”.

So. That’s it for the moment. Please feel free to modify the script and let me know.

Possible tasks:

  • Sign the script inside the EXE with code signature
  • Sign the EXE with code signature
  • Compress the script inside the EXE
  • Improve the PSHost implementation inside the EXE.

Have fun!

New Post: PowerShell 4.0 Support

$
0
0
Hi all!

I uploaded a modified version for PS 4.0.

Regards
Ingo

New Post: Create Exe with script that takes params

$
0
0
I have a script that takes a few parameters that I would like to create an exe with. Using ps2exe, is this possible?

I already made the exe and tested it and I am not getting the deisred results, I just wasn't sure if I was missing something or not.

So, for example, my script takes a parameter FirstName and LastName. My script works like this:

My-Script -FirstName Mike -LastName Smith

And the output is
Mike Smith, Hello World!

I would like to call myexe.exe -FirstName Mike -LastName Smith and get the same results.

Thanks,
sb

Reviewed: PS2EXE v0.5 (Nov 22, 2014)

$
0
0
Rated 5 Stars (out of 5) - not working

New Post: the config file

$
0
0
Sorry if this is somewhere else and I missed it, but what is the purpose of the .config file that is produced alongside the .exe? Is it needed? Can it just be discarded?

The little bit of testing I did indicated that it was not needed. I was hoping for some clarification on why it is created in the first place.

New Post: Get-Credential wasn't working after ps2exe

$
0
0
I was using Get-Credential in my ps1 code and the created .exe was not working as expected. I was being prompted in the console for a username, but it would fail saying the password was null and not allow me to type in my password. I fixed this by updating the PromptForCredential function, specifically the one below, removing the if-statement.
public override PSCredential PromptForCredential(string caption, string message, string userName, string targetName, PSCredentialTypes allowedCredentialTypes, PSCredentialUIOptions options)
{
    if (!CONSOLE)
    {
        ik.PowerShell.CredentialForm.UserPwd cred = CredentialForm.PromptForPassword(caption, message, targetName, userName, allowedCredentialTypes, options);
        if (cred != null )
        {
            System.Security.SecureString x = new System.Security.SecureString();
            foreach (char c in cred.Password.ToCharArray())
                x.AppendChar(c);

            return new PSCredential(cred.User, x);
        }
        return null;
    }
        
    if (!string.IsNullOrEmpty(caption))
        WriteLine(caption);
    WriteLine(message);
    Write("User name: ");
    string un = ReadLine();
    SecureString pwd = null;
    Write("Password: ");
    pwd = ReadLineAsSecureString();
    PSCredential c2 = new PSCredential(un, pwd);
    return c2;
}
Once the above was fixed, I noticed that the password was being displayed in plain text, something that would not be acceptable for the .exe I was creating. To fix this, I updated the function ReadLineAsSecureString(), see below for code update.
public override System.Security.SecureString ReadLineAsSecureString()
{
    System.Security.SecureString x = new System.Security.SecureString();
    while (true)
    {
        ConsoleKeyInfo i = Console.ReadKey(true);
        if (i.Key == ConsoleKey.Enter)
        {
            break;
        }
        else if (i.Key == ConsoleKey.Backspace)
        {
            if (x.Length > 0)
            {
                x.RemoveAt(x.Length - 1);
                Console.Write("\b \b");
            }
        }
        else
        {
            x.AppendChar(i.KeyChar);
            Console.Write("*");
        }
    }
    return x;
}
This works for the console application, but when using -noconsole, we are unable to use Get-Credential at all, as there is no prompt for credentials. Can I recommend the above code be added to the repository as an enhancement? Is there any troubleshooting or code updates to allow Get-Credential to work when -noconsole is used? Thank you.

Updated Wiki: Home

$
0
0

PS2EXE moved to Microsoft Technet Galery: https://gallery.technet.microsoft.com/PS2EXE-Convert-PowerShell-9e4e07f1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

In the last days I created the tool “PS2EXE”. It is able to “convert” PowerShell scripts to “standalone” EXE files.

It’s BETA in the current version 0.5.0.0.  

New in v0.4.0.0 (14/11/2013): 

  • support for PowerShell 4.0
  • VS project updated to VS2013 and .NET 4.0 

New in v0.4.0.0 (03/09/2013):

  • parameter -sta for running PowerShell in Single Thread Apartment mode
  • parameter -mta for running PowerShell in Multi Thread Apartment mode
  • parameter -noconsole to compile the resulting exe file als "Windows Application". the only implemented GUI interaction is for "get-credential"!!
  • Blog article coming soon...

New in v0.3.0.0 (03/08/2013):

Here are the previous articles on my blog:

Original description of v0.1.0.0

But: It does not convert the PowerShell script to an other language! It encapsulates the script with a lightweight PowerShell host written in C# and compiles the dynamically generated C# source code in memory to an EXE file. The resulting EXE is an .NET assembly that contains the source script encoded in Base64. The EXE includes all stuff that is needed to execute an PowerShell through the .NET object model. It is based on classes in the namespace System.Management.Automation that reperents the PowerShell engine. – Therefore the EXE file is not a real “standalone” EXE file. It needs PowerShell to be installed!!! And – of course – it needs .NET Framework v2.0. Furthermore “script execution” have to be allowed (see cmdlet: set-execultionpolicy). – The resulting EXE is “MSIL” and is able to execute as x64 or x86.

The tool “PS2EXE” itself is a PowerShell script! – It does the in-memory compilation and generates the EXE file. It uses the CSharpCodeProvider class of namespace Microsoft.CSharp.

The script is really simple. I contains a multiline string that represents the PowerShell host I’ve written. This is much more interesting than the PS2EXE.ps1 script itself. – Have a look into it!

Usage:

Call  the script with this parameters:

-inputFilePowerShell script file
-outputFilefile name (with path) for the destination EXE file
-debug(switch) generate debug info in the destination EXE file. The dynamically generated .CS file will stored beside the output EXE file. Furthermore a .PDB file will be generated for the EXE file
-verbose(switch) shows also verbose informations – if any.
-x86(switch) compile EXE to run as 32 bit application
-x64(switch) compile EXE to run as 64 bit application
-runtime20(switch) force running the EXE in PowerShell 2.0 using .NET 2.0
-runtime30(switch) force running the EXE in PowerShell 3.0 using .NET 4.0
-lcidspecify language ID for threads
-starun PowerShell environment in Single Thread Apartment mode
-mtarun PowerShell environment in Multithread Apartment mode
-noconsolecompile PS script as Windows application

Sample:

image_thumb[2]

This creates “test.exe” out of the PowerShell source file “test.ps1”

Limitations: It’s not easy to create a fully functional PowerShell host such as “Console host” (powershell.exe) or “ISE” (powershell_ise.exe). So there may be functionality that does not work properly.

 

The generated EXE can also be calls using command line options. There are 4 options that are used by the PowerShell host:

-debugForces the EXE to be debugged. It calls “System.Diagnostics.Debugger.Break()”.
-extract:”Filename”Extracts the PowerShell script inside the EXE and saves it as “Filename”. The script will not be executed.
-waitAt the end of the script execution it writes “Press a key…” and waits for a key to be pressed.
-endAll following options will be passed to the script inside the EXE. All preceding options are used by the EXE and will not be passed to the script.

Sample:

I create a script file containing this line of code:

$args | Write-Host

 

I save it as “c:\test2.ps1” and convert it as EXE by using PS2EXE:

image_thumb[5]

Sample 1.: “-wait” forces the “Hit any key…” message. All options following “-end” will be passed to the script.

Sample 2., 3. : The script will not get options preceding to “-end”.

Sample 4: “-wait” follows to “-end” and so it’s passed to the script. No message “Hit any key…”.

So. That’s it for the moment. Please feel free to modify the script and let me know.

Possible tasks:

  • Sign the script inside the EXE with code signature
  • Sign the EXE with code signature
  • Compress the script inside the EXE
  • Improve the PSHost implementation inside the EXE.

Have fun!

Updated Wiki: Home

$
0
0

PS2EXE moved to Microsoft Technet Galery:

https://gallery.technet.microsoft.com/PS2EXE-Convert-PowerShell-9e4e07f1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

In the last days I created the tool “PS2EXE”. It is able to “convert” PowerShell scripts to “standalone” EXE files.

It’s BETA in the current version 0.5.0.0.  

New in v0.4.0.0 (14/11/2013): 

  • support for PowerShell 4.0
  • VS project updated to VS2013 and .NET 4.0 

New in v0.4.0.0 (03/09/2013):

  • parameter -sta for running PowerShell in Single Thread Apartment mode
  • parameter -mta for running PowerShell in Multi Thread Apartment mode
  • parameter -noconsole to compile the resulting exe file als "Windows Application". the only implemented GUI interaction is for "get-credential"!!
  • Blog article coming soon...

New in v0.3.0.0 (03/08/2013):

Here are the previous articles on my blog:

Original description of v0.1.0.0

But: It does not convert the PowerShell script to an other language! It encapsulates the script with a lightweight PowerShell host written in C# and compiles the dynamically generated C# source code in memory to an EXE file. The resulting EXE is an .NET assembly that contains the source script encoded in Base64. The EXE includes all stuff that is needed to execute an PowerShell through the .NET object model. It is based on classes in the namespace System.Management.Automation that reperents the PowerShell engine. – Therefore the EXE file is not a real “standalone” EXE file. It needs PowerShell to be installed!!! And – of course – it needs .NET Framework v2.0. Furthermore “script execution” have to be allowed (see cmdlet: set-execultionpolicy). – The resulting EXE is “MSIL” and is able to execute as x64 or x86.

The tool “PS2EXE” itself is a PowerShell script! – It does the in-memory compilation and generates the EXE file. It uses the CSharpCodeProvider class of namespace Microsoft.CSharp.

The script is really simple. I contains a multiline string that represents the PowerShell host I’ve written. This is much more interesting than the PS2EXE.ps1 script itself. – Have a look into it!

Usage:

Call  the script with this parameters:

-inputFilePowerShell script file
-outputFilefile name (with path) for the destination EXE file
-debug(switch) generate debug info in the destination EXE file. The dynamically generated .CS file will stored beside the output EXE file. Furthermore a .PDB file will be generated for the EXE file
-verbose(switch) shows also verbose informations – if any.
-x86(switch) compile EXE to run as 32 bit application
-x64(switch) compile EXE to run as 64 bit application
-runtime20(switch) force running the EXE in PowerShell 2.0 using .NET 2.0
-runtime30(switch) force running the EXE in PowerShell 3.0 using .NET 4.0
-lcidspecify language ID for threads
-starun PowerShell environment in Single Thread Apartment mode
-mtarun PowerShell environment in Multithread Apartment mode
-noconsolecompile PS script as Windows application

Sample:

image_thumb[2]

This creates “test.exe” out of the PowerShell source file “test.ps1”

Limitations: It’s not easy to create a fully functional PowerShell host such as “Console host” (powershell.exe) or “ISE” (powershell_ise.exe). So there may be functionality that does not work properly.

 

The generated EXE can also be calls using command line options. There are 4 options that are used by the PowerShell host:

-debugForces the EXE to be debugged. It calls “System.Diagnostics.Debugger.Break()”.
-extract:”Filename”Extracts the PowerShell script inside the EXE and saves it as “Filename”. The script will not be executed.
-waitAt the end of the script execution it writes “Press a key…” and waits for a key to be pressed.
-endAll following options will be passed to the script inside the EXE. All preceding options are used by the EXE and will not be passed to the script.

Sample:

I create a script file containing this line of code:

$args | Write-Host

 

I save it as “c:\test2.ps1” and convert it as EXE by using PS2EXE:

image_thumb[5]

Sample 1.: “-wait” forces the “Hit any key…” message. All options following “-end” will be passed to the script.

Sample 2., 3. : The script will not get options preceding to “-end”.

Sample 4: “-wait” follows to “-end” and so it’s passed to the script. No message “Hit any key…”.

So. That’s it for the moment. Please feel free to modify the script and let me know.

Possible tasks:

  • Sign the script inside the EXE with code signature
  • Sign the EXE with code signature
  • Compress the script inside the EXE
  • Improve the PSHost implementation inside the EXE.

Have fun!

New Post: PS2EXE moved to Microsoft Technet Galery


New Post: Get-Credential wasn't working after ps2exe

$
0
0
Do you want to send me the complete ps2exe-script with your modifications? Don't forget to add a comment in the top with your name.

New Post: Get-Credential wasn't working after ps2exe

$
0
0
I can do that. What is your preferred method of delivery?

New Post: Program icons

$
0
0
Hello,

It's not necessary to modify the compiler as Olivier stated, although it probably does get the job done.

The simplest way is to put your .ico file in the same directory as the exe you're compiling, then using the built in parameter. (-iconFile loop.ico)

Here's an example of what did the trick for me, in compiling an exe with an icon file.

PS C:\pshell\ps2exe> .\ps2exe.ps1 -inputFile c:\pshell\ps2exe\SDPCResolver.ps1 c:\pshell\ps2exe\SDPCResolver.exe -iconFile loop.ico -noconsole -x64

The above is correct, didn't even need to add file path for loop.ico, simply made sure it was in same directory.

Commented Unassigned: Virus Detected when compiling to Exe ? [1773]

$
0
0
Strangely enough, when i compile a PS script to an exec, our Symantec Virusscanner thinks there is a virus in it ?

When i compile the same script with Primalscript, i don't get a warning..
Comments: ** Comment from web user: Jumbor12 **

I have same issu when i add some picture ressource in my code. I thing some antivirus are more or less permissive with encapsulation code. For exemple "Avira" alert me but Sophos do not. I thing it's just a "false positive" for me.

New Post: Convert back from executable to Powershell script

$
0
0
Someone has successfully extract information using the ILSpy ??
Viewing all 87 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>