Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

access denied when calling a DLL function


3 replies to this topic

legalla

legalla
  • Members
  • 3 posts

Posted 16 October 2003 - 09:35



I have a setup which install several NT services. I have build a library that create a user account for the services on a domain or a server name given by the user. This function is called on the OnInstalled event of the service. It works fine but I have upgraded my setup from developer 7 to developer 8 and now I have the message "access denied" when creating a user on a domain.
I have tried several thinks and finally I put the function call in OnFirstUIBefore and then it works ?!?
I don't understand why. It seems that the setup has not always the same "privileges".
Can you explain this strange behavior ?!?
I have submit a request to InstallShiedl Support but I have still no answer. They told me to install Service Pack 2 but it still not works.
Is there someone to help me ?!?

Annie Le Gall
Software Developer

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 16 October 2003 - 18:29

I'd recommend performing a MSI Diff of the two packages to see what's different.

legalla

legalla
  • Members
  • 3 posts

Posted 17 October 2003 - 07:36

I found the MSI Diff program and I use it to compare the different package but I don't know how to analyse it.
It seems that the process that was created to manage the OnInstalled event has not the same privileges. I saw in Developer that there is a custom action named OnFeaturesInstalled with the property "Deferred execution in system context". And I saw that if I put my function call in the OnGeneratingMsiScript it works. And the corresponding custom action has the property "Immediate execution". May be a coincidence.
I have attached the MsiDiff results.
Thank you for your help.

Attached Files



legalla

legalla
  • Members
  • 3 posts

Posted 17 October 2003 - 10:17

I have add a function in my DLL to get the user name. Then I saw that when the AddUser function fails, the user name is SYSTEM and when the AddUser function succeeds, the user name is my log on user.
Very strange isn't ?