Jump to content
Macro Express Forums

Launch separate Powershell script silently

Recommended Posts

I have a PowerShell script that creates a text file, that I will subsequently email via MEP.  I want to kick the PowerShell script silently from MEP.  I have read that I cannot embed PowerShell scripts in MEP, but does anyone know how to silently kick-off a PowerShell script from MEP?

Link to comment
Share on other sites

You could put the commands to run the PowerShell script into a batch file and run it from Macro Express Pro using the Program Launch command. A quick Google search turned up this example of how to run a PowerShell script in a batch file:

Powershell.exe -executionpolicy remotesigned -File  C:\Users\SE\Desktop\ps.ps1


Link to comment
Share on other sites

It probably isn't relative but one thing to bear in mind is that PS is by default, Unicode and MEP is ASCII/ANSI. I remember I was doing something in PS with MEP and I found a workaround by reading every other character. Unicode is 16bit so as long as the characters were still in the ACSII set, this trick worked. Someone once suggested that PS file encoding output could be modified to be ASCII. Set-Content cmdlet with '-Encoding ASCII' it might have been. But that was long ago. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...