Packaged App fails

Archived support forum for customers who once purchased a PrimalForms product license. This forum is locked.
This topic is 13 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
wayne_Avery
Posts: 30
Last visit: Tue Feb 01, 2022 2:25 pm

Packaged App fails

Post by wayne_Avery »

Hi, I have a basic PrimalForms project that hides a mailbox in Exchange. I have PowerShell V2 installed. In the OnApplicationLoad function I have the following.
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin

My form has 1 button with the following command associated with the Click event.

set-mailbox myuser_test -hiddenfromaddresslistsenabled $true -acceptmessagesonlyfrom myuser_test
When I run this from within PrimalForms it works great. When I package it to an exe and run it externally from PrimalForms it doesn't work. I receive an event log: Source MSExchange Common, event ID 106, Performance counter updating error. Does anyone know why it works in PrimalForms and not when packaged?
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Packaged App fails

Post by davidc »

This could be various things such as permissions or firewall exceptions. Are you creating a 64bit or 32bit exe?



According to the MSDN there is usually an application log generated:

http://www.microsoft.com/technet/suppor ... &LCID=1033

See if you can find any related event that might shed light on the situation.

David
David
SAPIEN Technologies, Inc.
User avatar
wayne_Avery
Posts: 30
Last visit: Tue Feb 01, 2022 2:25 pm

Packaged App fails

Post by wayne_Avery »

It is 32bit exe. Don't mind me, I came to work today with a fresh mind and realised that it is a permissions issue. I was running PrimalForms with elevated priviledge as it needs to make changes to Exchange whereas my normal account doesn't have the required access. Looks like I will need to learn more about trapping errors. Thanks for taking the time to look at it anyway.
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Packaged App fails

Post by Alexander Riedel »

You can package your exe with a manifest that requires elevation.
Hope that helps.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 13 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.