shahviral6438
Posts: 11
Joined: Mon Mar 23, 2020 8:13 am

C# custom action not working without run as admin

Hi Team,

We have created custom action which will call a method from the .dll file (CustomeActionInstaller.CA.dll) to execute custom logic written under that.
Inside the CustomeActionInstaller.CA.dll, the method will make a use of Session variable to get and set data as shown below
1.png
1.png (69.32 KiB) Viewed 6599 times
For the above requirement, we cannot check "Run As Administrator" option in the AIP file, as installing the generated exe should not require admin privileges.

Solution that we have tried so far:
1. Set your custom action back to Immediate and check the "Run as administrator" option from the "Install Parameters" page (this may allow the creation of the temp directory) - This is working fine but we can't use this due to non admin requirements.
2. Keep the "deferred" with no "impersonation" options and implement the suggestion from the thread below: viewtopic.php?f=2&t=20318#p49604 - This is not working We are getting below error while using this option:
1.png
1.png (87.19 KiB) Viewed 6599 times
This scenario is stopping us to dev complete one of the upcoming production release. Any immediate response would be highly appreciated.

AIP version used: 18.3
.Net version used: .Net 6

Thanks,
Viral Shah
Catalin
Posts: 7513
Joined: Wed Jun 13, 2018 7:49 am

Re: C# custom action not working without run as admin

Hello Viral,

I've noticed that you already have two threads with my colleagues over the email, with the same problem, so please continue this over the email with them.

If possible, please try to avoid duplicating threads, as this is pretty confusing for us and leads to team members working on the same ticket sometimes.

Thank you for your understanding!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shahviral6438
Posts: 11
Joined: Mon Mar 23, 2020 8:13 am

Re: C# custom action not working without run as admin

Hi Catalin,

Yeah sure, I am fine following up through existing mail thread.
It's just that we were not getting timely responses, and this is something blocking the release, hence raised as ticket in forum as well.

Thanks,
Viral Shah
Catalin
Posts: 7513
Joined: Wed Jun 13, 2018 7:49 am

Re: C# custom action not working without run as admin

Hello Viral,
Yeah sure, I am fine following up through existing mail thread.
Awesome then. :)
It's just that we were not getting timely responses, and this is something blocking the release, hence raised as ticket in forum as well.
We do our best to answer each of our customers as soon as possible, but lately we've been a little bit busier than usual and therefore some delay is to be expected. I apologize for this.

If you have any other questions that I could help you with, please do not hesitate to let me know and I will gladly assist.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”