Re: ReportEvent and MessageDLL problem
- From: "Sachin_M" <SachinM@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 23 Jun 2005 23:28:01 -0700
Hi Mark,
Please help me regarding Windows XP user accounts
My application will run first time under Administrator login, I've developed
code to
1) write into registry (this is working fine)
2) I want to write last reported event's Timestamp into an ini file.
So on next run my application will read this and then move to further
records
which are newer than this timestamp
(i.e. with new timestamp than the stored one)
But here I've some questions like
An XP user (of group Users) can run many instances of my application, so I
need
to create a global
.ini where each instance will store its last timestamp.
The PROBLEM is where to store it under a Users account. In XP there are two
options
a) C:\Documents and Settings\All Users\Application Data\<myApp>\myapp.ini
b) C:\Documents and Settings\All Users\Shared Documents\<myApp>\myapp.ini
I want to know which one is better. On some XP systems I can't see
<Application Data> folder.
Or both of them.
Should I create <Application Data> folder when the application is running
under
Administrator login???
and then create a folder <myapp> containing myapp.ini
Please help
Thanks & Regards,
Sachin M
"Mark Yudkin" wrote:
> Correct. Your user doesn't have permission to create the registry entries
> using his own account.
>
> To work around this, you'll need to create a small advertised MSI
> installation that the user can run (with elevated privileges). You can fire
> up this installation using your program when the user needs to perform the
> installation.
>
> You may want to take this to an MSI forum, as it's not a VB6 issue.
>
> "Sachin_M" <SachinM@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:CA1E4217-C998-4826-B770-ED8C4DB7661F@xxxxxxxxxxxxxxxx
> > Thanks Mark,
> >
> > Well my application is an event logger. The user configures it with new
> > event node before he executes it. And the code should take care of new
> > event source creation/registration of the same if exists.
> >
> > You mean, under Windows XP, for normal user (i.e. other than Administrator
> > login)
> > this won't work at all?
> > I mean, I can't create custom log at runtime for a normal user account?
> > As I've not tested it on XP.
> >
> > Regards,
> > Sachin M
> >
> >
> >
> > "Mark Yudkin" wrote:
> >
> >> Create a key for your application name (value of your strEventSource
> >> variable) under
> >>
> >> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\
> >> Under that new key, create a REG_SZ value with the name EventMessageFile
> >> and
> >> value as the path to your DLL.
> >> Also create a REG_DWORD value with the name TypesSupported and value 7.
> >>
> >> Since normal users on XP do not have write access to this part of the
> >> registry, you need to do this in your installation program. Installation
> >> programs are best written using MSI (not VB6) as MSI installations can be
> >> run with the necessary elevated privileges.
> >>
> >> "Sachin_M" <SachinM@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> >> news:781CB3E6-FCB1-4931-BBC4-D986D94291A7@xxxxxxxxxxxxxxxx
> >> > Hi Friends,
> >> > I'm using following APIs to create custom event log in windows
> >> > RegisterEventSource ("", strEventSource)
> >> > ReportEvent (lngHwnd, LogType, 0&, EventID, 0&, 1, 0&, lngHwndMsg, 0&)
> >> > and then
> >> > DeRegisterEventSource (lngHwnd)
> >> > Now, my application is designed to log events on regular intervals of 1
> >> > second.
> >> >
> >> > The problem is I'm unable to use MessageDll which I've created with
> >> > VC++
> >> > 6.0
> >> > and Message compiler (mc.exe)
> >> > The same Messagedll i've used successfully in VC++ which avoids the
> >> > windows
> >> > header .....
> >> > <Description:
> >> > The description for Event ID ( 1001 ) in Source ( DLLtest ) cannot be
> >> > found.
> >> > The local computer may not have the necessary registry information or
> >> > message
> >> > DLL files to display messages from a remote computer. The following
> >> > information is part of the event: My test message.>
> >> >
> >> > but its (messagedll) not working with VB.
> >> > Can somebody please help me in this? I figure out that there is some
> >> > prob
> >> > in
> >> > api calling from VB.
> >> >
> >> > And I need to use createRegistry and regSetValueEx to set
> >> > eventMessageDLL
> >> > path.
> >> >
> >> > How to do this?????
> >> >
> >> > Thanks & Regards,
> >> > Sachin Malode
> >> >
> >> >
> >>
> >>
> >>
>
>
>
.
- Follow-Ups:
- Re: ReportEvent and MessageDLL problem
- From: Mark Yudkin
- Re: ReportEvent and MessageDLL problem
- References:
- ReportEvent and MessageDLL problem
- From: Sachin_M
- Re: ReportEvent and MessageDLL problem
- From: Mark Yudkin
- Re: ReportEvent and MessageDLL problem
- From: Sachin_M
- Re: ReportEvent and MessageDLL problem
- From: Mark Yudkin
- ReportEvent and MessageDLL problem
- Prev by Date: Re: How to use GIF cursor?
- Next by Date: How to get a round rectangle ActiveX Control?
- Previous by thread: Re: ReportEvent and MessageDLL problem
- Next by thread: Re: ReportEvent and MessageDLL problem
- Index(es):
Relevant Pages
|