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

Commented Issue: Unable to Compile Demo [1594]

$
0
0
I am unable to compile the demo on a Windows 7 x64 Machine with either 32bit or 64bit Powershell V3 (get-host). Image shows the end result on verbose. It's stating there's a missing reference.
Comments: ** Comment from web user: ikarstein **

done in v0.3 and v0.4


Closed Issue: Unable to Compile Demo [1594]

$
0
0
I am unable to compile the demo on a Windows 7 x64 Machine with either 32bit or 64bit Powershell V3 (get-host). Image shows the end result on verbose. It's stating there's a missing reference.
Comments: resolved

New Post: STA Mode

$
0
0
I've fixed it. Please test again... Thanks!

redpark wrote:
Hi Ingo,

Thanks for the extra options - very helpful.
I'm afraid that this one doesn't compile for me - multiple errors.

Image

Rob.

New Post: STA Mode

$
0
0
Will do...

The download doesn't seem to be available just yet... I'll try again tomorrow!

Released: PS2EXE v0.4 (Mar 09, 2013)

Created Release: PS2EXE v0.4 (Mar 09, 2013)

New Post: STA Mode

$
0
0
There was an problem during the upload... now v0.4 is online.
redpark wrote:
Will do...

The download doesn't seem to be available just yet... I'll try again tomorrow!

New Post: STA Mode

$
0
0
Looks great now and compiles my STA required script perfectly.

Many thanks Ingo!

New Post: STA Mode

New Post: Code for ability to set own icon for the exe

New Post: Compilation fails - Assembly not referenced

New Post: Execution Policy

$
0
0
Hi Ingo,

I note that the Execution Policy needs to allow scripts to run that are built with PS2EXE.
Is there a way of temporarily setting the execution policy within the built EXE?

It's possible with VBS by adding -ExecutionPolicy ByPass to the parameters and I've found some C# on the web which seems to suggest it's possible, but don't seem to be able to get it to work...

Am I wasting my time - is this even possible, or do you know a way?

Many thanks,

Rob

New Post: Passing parameters

$
0
0
Is there anyway to pass multiple parameters? For example, I've compiled a custom PowerShell script into an exe called script.exe. The two parameters within the script are ip and fullscreen. If I run the following, the IP is passed, but not the fullscreen switch.

.\script.exe 10.1.1.1 -fullscreen

If I do .\script.exe -ip 10.1.1.1, "-ip" is passed, not "10.1.1.1".

Anyway to change this behavior? Thanks!

New Post: Is it possible to encrypt a "modul"?

$
0
0
Hello,

I want crypt a PowerShell script that included some functions which I would like to protect. Is it possible to encrypt the script and then load this functions from a other .ps1 to use this functions?

Like:
Import-Module "$currentPath\Initialize.exe"

Thanks

New Post: Is it possible to encrypt a "modul"?

$
0
0
Hi!

This is not possible, because PS2EXE uses an own PowerShell environment that only exist while running the generated EXE file.

To achieve your goal you could "encrypt" you initialization script with several methods like Base64. But this is no real encryption! A power user would be able to "decrypt" it. PowerShell is not a good choice if you need to secure or protect your scripts / functions.

Hope this helps
Ingo

New Post: Is it possible to encrypt a "modul"?

$
0
0
Hi Ingo,

Thanks for answer.
I've now a workaround, that works for me :-)

Sample:
I create a Test1.ps1 with my function and a Test2.ps2 where i can call the functions:

Test1.ps1
Function TestFunction {
write-host "Very cool"
}

. "C:\Temp\PS2EXE-v0.4.0.0\Test2.ps1"


Test2.ps1
TestFunction

Now i can encrypt the Test1.ps1 und run the EXE.
Functions are loaded and then run the Test2.ps1 where i can call my function :-)

New Post: Execution Policy

$
0
0
Hi Redpark

Have you found a solution? I need it too...


Thanks

New Post: Execution Policy

New Post: Create exe with "Run as Administrator"

$
0
0
This would be a fantastic addition.
With the .net 3.5 compiler, you can pass a manifest file which would include the line you specified (/win32manifest:<file>). I haven't figured out a way to do it with 2.0 however, my C# knowledge is very limited.


EDIT::
Using MT.exe (part of .NET Framework 2.0 Software Development Kit (SDK) ) you can edit the existing manifest.

Rename your ps2exe compiled EXE to "ExeName.exe". Then copy the below code into a text editor and save it as ExeName.exe.manifest within the same folder.
<?xml version="1.0" encoding="utf-8" ?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity version="1.0.0.0" 
      processorArchitecture="X86"
      name="PS2EXEProject"
      type="win32" />
  <description>MyProjectDescription</description>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="requireAdministrator" />
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>
Then run:
mt.exe -manifest ExeName.exe.manifest -outputresource:ExeName.exe;#1

New Post: Extracts the PowerShell script with parameter -extract:”Filename”

$
0
0
Hello

Please can you add a parameter "-noextract" to prevent extracts the PowerShell script inside the EXE? That would be very cool :-)

Also a parameter for the ExecutionPolicy would be helpful, so that the EXE starts PowerShell with powershell.exe -ExecutionPolicy "XXX". Is that possible?


Thanks for anwser
Viewing all 87 articles
Browse latest View live


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