Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Windows Event Log record while Windows Service runs

Posted on 2004-10-12
21
Medium Priority
?
602 Views
Last Modified: 2007-12-19
I am getting consistent warning messages regarding MS Word when my Windows Service runs that uses MS Word:

Event Type:      Warning
Event Source:      MsiInstaller
Event Category:      None
Event ID:      1004
Date:            10/12/2004
Time:            10:05:13 AM
User:            N/A
Computer:      RADIUM
Description:
Detection of product '{00010409-78E1-11D2-B60F-006097C998E7}', feature 'OfficeUserData', component '{C9AF9050-C8BE-11D1-9C67-0000F81F1B38}' failed.  The resource 'HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Common\UserData' does not exist.
Data:


ALSO:


Event Type:      Warning
Event Source:      MsiInstaller
Event Category:      None
Event ID:      1004
Date:            10/12/2004
Time:            10:03:51 AM
User:            N/A
Computer:      RADIUM
Description:
Detection of product '{00010409-78E1-11D2-B60F-006097C998E7}', feature 'WordUserData', component '{8ADD2C93-C8B7-11D1-9C67-0000F81F1B38}' failed.  The resource 'HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Word\UserData' does not exist.
Data:




These error messages do not seem to STOP or PREVENT the Windows Service from running........nor do they seem to corrupt or affect the resulting WORD documents in any way.........yet still I get the warnings above with every attempt to use MS WORD.



Please help me figure out why this is happening and give me some advice as to how to get rid of this error message.



Thanks,

Tom
0
Comment
Question by:Tom Knowlton
  • 11
  • 9
21 Comments
 
LVL 8

Expert Comment

by:Razzie_
ID: 12290605
Well, I think what happening might be normal. Did you write the service yourself?
Are you trying to read a value from a registry key and writing an error to the eventlog if the key is not found without terminating the service? (try-catch, and write the exception to the eventlog).
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 12291584
I wrote the Windows Service myself.
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 12291609
I do not knowingly access the Registry to do anything....but that does not mean that .NET isn't trying to do it in an effort to support COM.


I am not sure WHERE the attempt to read the registry is actually happening.

I'll post the code for the Windows Services.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Author Comment

by:Tom Knowlton
ID: 12291774
Here is my Windows Service Code:

http://www.robotzgame.com/junk/ws_code.zip
0
 
LVL 8

Expert Comment

by:Razzie_
ID: 12292093
I think this has something to do with Office trying to save settings. I found the following:
http://support.microsoft.com/default.aspx?scid=kb;en-us;298059

This is about OfficeXP but I'm sure it'll count for other versions too. Now, I know little about Office, but maybe you need to repair it, or you should look for some option related to the wizard mentioned in the article.
Maybe when you call Process.Kill() for WINWORD or something, the save your settings wizard, or some other related process that saves settings, automatically kicks in. Either way, I'm quite sure it's not your C# code doing anything wrong (since there is nothing that comes close to it looking at your code).
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 12292132
How did you link this article to my problem, exactly?

Or are you really just grasping at straws as to a reason?

No offense....just wondering how sure you are.
0
 
LVL 8

Expert Comment

by:Razzie_
ID: 12292471
The article might not be the best explanation. It just serves as an indiaction that there might be an automatic process in Winword (or call it a wizard, hence the article) that tries to save data and settings. And the article clearly states that it tries to read some registry keys (including the ones you get the error on).

So when I see you terminate WINWORD, or whenever WINWORD is winning, it sounds quite logical to me that is trying to save settings. And again as the article says it tries to read certain registry keys for that. That's why I made the connection.

Now I'm absolutely NOT sure about that, but it might be an explanation, right? :)
0
 
LVL 8

Expert Comment

by:Razzie_
ID: 12292504
Btw, it seems now that since the source is 'MsiInstaller' it might have something to do with Office trying to do an installation or repair.
If you start WinWord, does it prompt you, in any way, for some additional components to install, repair, anything?
0
 
LVL 8

Expert Comment

by:Razzie_
ID: 12292527
Try creating a key HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Common\UserData with type of the key REG_DWORD and value 1. (taken from http://www.eggheadcafe.com/ng/microsoft.public.vstudio.setup/post272771.asp)
0
 
LVL 8

Expert Comment

by:Razzie_
ID: 12292816
that should be 9.0 instead of 10.0 of course.
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 12293013
I get something with Microsoft Visio from time to time  (not related to THIS problem).....but it like....tries to run a Visio install for no reason out of the blue.....

Just throwing that out there.
0
 
LVL 3

Assisted Solution

by:a_goat
a_goat earned 800 total points
ID: 12294663
The problem is that services don't run as the System user (by default).  The System user has no HKEY_CURRENT_USER registry keys (you can't create them either).  The easiest fix would be to go into the service settings in the control panel and change it to run under your account.  That way it'll use YOUR user settings to load up whatever Word needs.  

It's nothing that repairing word or a clean install or anything along those lines should fix.
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 12304091


I was incorrect about the Windows Service NOT crashing during the day....I apologize.  I watched the errors more closely today...and the Windows Service did indeed crash during the day.

See this screenshot:

http://www.robotzgame.com/junk/faxcomdie.gif


Here is the code block that generates the e-mail message....perhaps you can recommend some changes I can make to find out why the Windows Service is crashing?



private void CheckTrackingWS()
          {
               try
               {    
                   
                    lock(this)
                    {                        
                         FileInfo fi = new FileInfo("C:\\heartbeat\\tracker_alive.txt");
                         long _file = fi.LastWriteTime.Ticks;
                         DateTime _now = DateTime.Now;
                         TimeSpan ts = _now - fi.LastWriteTime;
                         
                         if(ts.Minutes >= 1)
                         {
                              genFuncs.SendMessage("tom@thebuyersfund.com","ALERT!!  FAX COM TRACKER SERVICE HAS DIED",ts.Minutes.ToString() + " minutes(s) since the last heart beat");
                              genFuncs.SendMessage("jasons@thebuyersfund.com","ALERT!!  FAX COM TRACKER SERVICE HAS DIED",ts.Minutes.ToString() + " minutes(s) since the last heart beat");

                              System.ServiceProcess.ServiceController myController =   new System.ServiceProcess.ServiceController("TrackBFRequests");

                              if (myController.Status == ServiceControllerStatus.Running)
                              {
                                   //stop the service if its running
                                   myController.Stop();                                  
                                   myController.Start();                                  
                              }
                              else if (myController.Status == ServiceControllerStatus.Paused)
                              {
                                   //continue the service if its paused
                                   myController.Continue();
                              }
                              else if (myController.Status == ServiceControllerStatus.Stopped)  
                              {
                                   //Start the service if its stopped
                                   myController.Start();
                              }
                              myController.Close();                              
                         }                    
                    }
                    //               throw new Exception("ERROR HANDLING TESTING");
               }
               catch(Exception eee)
               {
                    genFuncs.SendMessage("tom@thebuyersfund.com","WATCHDOG problem in method CheckTrackingWS","ERROR:  " + eee.ToString());
                    genFuncs.SendMessage("jasons@thebuyersfund.com","WATCHDOG problem in method CheckTrackingWS","ERROR:  " + eee.ToString());
               }    
          }
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 12304102
a_goat:

The Windows Service in question is logging in under the Administrator account........NOT as Local System.
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 12304137
I logged into the RADIUM server as the Administrator......I checked the Registry finally.....and sure enough...the KEY that the warning message talks about is in fact missing:

http://www.robotzgame.com/junk/UserData.gif



Is there any harm in CREATING the KEY manually?      Or is the problem more complex than that?
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 12304311
Well, under the Administrator account I tried creating the missing KEY information as is hinted at in this article:

http://www.eggheadcafe.com/ng/microsoft.public.vstudio.setup/post272771.asp



The MsiInstaller still complains that the KEY does not exist.  I even rebooted the RADIUM server to make sure....no luck.
0
 
LVL 8

Accepted Solution

by:
Razzie_ earned 1200 total points
ID: 12306448
Tom,

A couple of links in order of possible 'usefullness':

http://www.adminlife.com/247reference/msgs/18/90934.aspx
http://www.eventid.net/display.asp?eventid=1004&eventno=437&source=MsiInstaller&phase=1
http://www.dotnet247.com/247reference/msgs/44/223038.aspx
http://whirlpool.net.au/forum-replies.cfm?t=186755&r=2641695&u=26123

I can't test all this since I don't have the error. In addition, if nothing of the above helps, I guess reinstalling office would help.

Razzie
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 12309376
I'm giving up on this for a while......I'm such a quitter.  :)
0
 
LVL 8

Expert Comment

by:Razzie_
ID: 12310103
Well it's always hard to track down these kind of problems... hope you'll work it out in the near future.
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 12310112
For now.....it is not a big deal......but when I decide to pursue this problem again....atleast I'll have a decent starting point, right?
0
 
LVL 8

Expert Comment

by:Razzie_
ID: 12310141
Right :)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Screencast - Getting to Know the Pipeline
Suggested Courses

773 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