Feb 22, 2013 at 4:54 PM
Edited Feb 22, 2013 at 4:55 PM
If the problem is in certificate, and it's not a *.snk certificate
1) you could (try to) sign powershell.exe (I'm sure that this will work)
I sign my software creatures is the following way:
"C:\Program Files (x86)\Windows Kits\8.0\bin\x64\signtool.exe" sign /f C:\Projects\PS\STUPS\certificate\my\SoftwareTestingUsingPowerShell.pfx /t
/p %1 C:\Projects\PS\STUPS\UIA\UIAutomationSpy\bin\Release35\UIAutomationSpy.exe
SoftwareTestingUsingPowerShell.pfx is a local certificate I generated months ago
%1 is certificate's password
signtool.exe in is Windows SDK 8.0, 7.1, should be in 7.0 also
the last is the executable I sign
2) you could sign my exes:
the UIAutomation module is shipped with three executables: UIAutomationSpy (it can run PS code), UIARunner (it is intended to run PS code in the GUI or from command-line) and BGShell (for running code over Metro UI)
Both types of signing are possible.
Open source rules!
3) you could follow steps how to install an accessible app
after the phrase "Putting module files into a secure location".
(put an app in the secure location, add my certificate to the Trusted Root Certification Authorities store (a Microsoft's requirement), etc)
Accessible apps have more privileges.
You also could try to combine 2) and 3).
P.S. Are you working on an AV? A fun fact about avast: when I build another release/beta and put my executables in a new location to publish them, avast on the first run embraces my app with sandbox border and label. If I start spying with UIAutomationSpy,
it also sandboxes my squares over windows or controls with the Avast label...