Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Registry

Posted on 2003-11-05
5
259 Views
Last Modified: 2010-05-01
I am having couple of questions regarding registering a component in the registry.

Question 1:
In my development environment, I use component services to register a component and it works great. Now I use Package and Deployment Wizard(PDW) to create an installation version for the application. What I really want is that when I run the setup.exe (created by PDW), it should also register the component. I dont want the client to do it manually.

Condition1: Should be automatically registered when setup.exe is executed.
Condition2: My asp files should be able to use the component even when the machine is logged off. (Right now, I provide the user information in component services).


Question 2:
One of my asp pages uses Server.CreateObject to create an object using a component registered using component services. This object would then write some parameters to the registry. I should be able to do in such a way that any user who loggs on to the system should be able to read the value (which also would be from an asp page written by me). To summarize, the values I write to registry using asp should be accessable by all users.

TIA
Plumppudding
0
Comment
Question by:Plumppudding
  • 3
  • 2
5 Comments
 
LVL 28

Expert Comment

by:AzraSound
ID: 9690730
1)
I havent used PDW in a long time, but I am pretty sure it is aware of which DLLs require self registration and it takes care of that for you once you include the file in your package.

Your asp files will be able to use the component if the IUSR_<machinename> account is given all necessary permissions to access that dll and any resources it requires.  Otherwise, you need to provide instructions to the client on how to create a COM+ package to assign an appropriate login's credentials to the component for it to run under


2)
Then you need to ensure you are writing to the HKLM hive.  This hive is system wide and identical across different logins.  Again, though, your component needs to have the permissions to do this.
0
 
LVL 1

Author Comment

by:Plumppudding
ID: 9814999
Hi Azra,

Sorry for responding so late.

I am now using an installer (Inno setup script) which registers my application using regserver.

The whole  application is installed and then I ran ConfigurationSetup.asp which takes in configuration parameters like logfile information, db information etc. After I click on Save, I read those values and call a method in my dll to add those configuration values in the registry.

  m_lngRetVal = RegCreateKey(lngRootKey, strRegKeyPath, lngKeyHandle)
  MsgBox m_lngRetVal

the message box shows 5. FYI, I installed the application as Administrator. The IIS website is configured to allow access to unauthenticated users.

To summarize, if I use regserver or regsvr32 to register my dll, I am not able to write to the registry with an Error number 5.

What am I missing?

TIA
Plumppudding
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 9815586
Was the DLL included into a COM+ package?  Even though the site is set to allow anonymous access, your dll, specifically, needs to ensure this is allowed for it as well.  If you right-click the dll (on a new NTFS system) you should be able to specify specific rights for it (ensure IUSR_<MachineName> user has all access rights).  Other issues are what system dlls your dll uses.  It can become quite frustrating pinpointing all folders/services that need to be configured to allow your dll the full access it needs.  If possible, I would configure it to be included in a COM+ package whereby you tell COM+ to give administrative rights to your dll, since it sounds like it needs fairly full access (esp. the ability to write to the registry).
0
 
LVL 1

Author Comment

by:Plumppudding
ID: 9819370
No my dll is not included in COM+ package. It was just registered using regsvr32. The dll has Full Control rights to Everyone.

Plumppudding
0
 
LVL 28

Accepted Solution

by:
AzraSound earned 50 total points
ID: 9819570
Things you have to look at then are:

Does IUSR_<MachineName> have rights to access the registry?
Does IUSR_<MachineName> have rights to all areas the dll accesses (e.g., if it uses API it probably needs access rights to the system32 folder where the system dlls are located)?
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question