Groups > Novell > NDS Client > Re: Developing application needs Workstation ID... How??




Developing application needs Workstation ID... How??

Developing application needs Workstation ID... How??
Tue, 31 May 2005 16:01:24 GMT
I'm creating a little application for work that is a repository of 
information that clients can call in with when they have problems. This 
tool gathers all of the necessary information to create a valid call 
ticket but the one area that I'm having problems with is the registered 
workstation ID. 

Currently, the application reads the registry for the valid Workstation 
ID name under HKLM\Software\Novell\Workstation Manager\Identification 
as "Workstation Object" and this works well with accounts that have 
administrative rights but that will not work for regular user accounts.

I noticed that the nwtray.exe that adds the "Novell Desktop
Management" 
icon in the systray is executed under the user's account and it returns 
the information under the  "Display NDS Information" menu selection
for 
Workstation Object. It also displays it differently than the registry 
method so it is obviously reading it from somewhere else with the User's 
rights which doesn't have to be admin. The nwtray.exe calls a function 
WMGetAssociatedWorkstationA and WMGetAssociatedWorkstaionW from the 
wmntapi.dll which I'm assuming completes this request from the nwtray.exe 
application. Is it possible to get the arguments that it needs to pass 
the results to my application? I've looked through the NDKs for 
information on this dll and it's functions but I haven't been able to 
find anything relating to the actual novell client. Anyone know of a 
better way to get the information I need to supply it in the interface 
I'm designing or can Novell give me the arguments to pass to this 
function to get the necessary information?

Simply asking the user to click on that icon in the systray isn't really 
a solution as it defeats the purpose of gathering all information in one 
interface for reporting system problems....



Post Reply
Re: Developing application needs Workstation ID... How??
Mon, 06 Jun 2005 08:46:23 GMT
>  The nwtray.exe calls a function 
> WMGetAssociatedWorkstationA and WMGetAssociatedWorkstaionW from the 
> wmntapi.dll which I'm assuming completes this request from the nwtray.exe 
> application. Is it possible to get the arguments that it needs to pass 
> the results to my application? I've looked through the NDKs for 
> information on this dll and it's functions but I haven't been able to 
> find anything relating to the actual novell client. Anyone know of a 
> better way to get the information I need to supply it in the interface 
> I'm designing or can Novell give me the arguments to pass to this 
> function to get the necessary information?

I'd use a debugger to step through nwtray.exe, but I didn't say that.

You could probably dig out the client people and just ask them ...

Post Reply
Re: Developing application needs Workstation ID... How??
Mon, 06 Jun 2005 15:10:33 GMT
Christian Hofstaedtler #55 wrote:
>>  The nwtray.exe calls a function WMGetAssociatedWorkstationA and
>> WMGetAssociatedWorkstaionW from the wmntapi.dll which I'm assuming
>> completes this request from the nwtray.exe application. Is it possible
>> to get the arguments that it needs to pass the results to my
>> application? I've looked through the NDKs for information on this dll
>> and it's functions but I haven't been able to find anything relating
>> to the actual novell client. Anyone know of a better way to get the
>> information I need to supply it in the interface I'm designing or can
>> Novell give me the arguments to pass to this function to get the
>> necessary information?
> 
> 
> I'd use a debugger to step through nwtray.exe, but I didn't say that.
> 
> You could probably dig out the client people and just ask them ...

Post Reply
Re: Developing application needs Workstation ID... How??
Tue, 14 Jun 2005 12:14:23 GMT
> Christian Hofstaedtler #55 wrote:
> >>  The nwtray.exe calls a function WMGetAssociatedWorkstationA and
> >> WMGetAssociatedWorkstaionW from the wmntapi.dll which I'm
assuming
> >> completes this request from the nwtray.exe application. Is it 
possible
> >> to get the arguments that it needs to pass the results to my
> >> application? I've looked through the NDKs for information on this
dll
> >> and it's functions but I haven't been able to find anything
relating
> >> to the actual novell client. Anyone know of a better way to get
the
> >> information I need to supply it in the interface I'm designing or
can
> >> Novell give me the arguments to pass to this function to get the
> >> necessary information?
> > 
> > 
> > I'd use a debugger to step through nwtray.exe, but I didn't say that.
> > 
> > You could probably dig out the client people and just ask them ...
> 
> Er, if the OP is still reading I might be able to perform a hook up.

Any help is greatly appreciated. If there is an easier way, I'm also open 
to suggestions! The big problem I have right now is the application 
requires that I run it in "Unsecured System User" through ZENWorks so
it 
can read the registry entry for "HKLM\Software\Novell\Workstation 
Manager\Identification\Workstation Object". This works for now but if a 
client is not connected due to a network connection, the application 
can't be run local to gather the Workstation ID because it will launch 
with the current users' rights and not have rights to read that key! The 
only way I found possible is through the wmntapi.dll but then again, it's 
all secret!
Post Reply
Re: Developing application needs Workstation ID... How??
Tue, 14 Jun 2005 14:45:04 GMT
wfiel36849@ev1.net wrote:
>>Christian Hofstaedtler #55 wrote:
>>
>>>> The nwtray.exe calls a function WMGetAssociatedWorkstationA
and
>>>>WMGetAssociatedWorkstaionW from the wmntapi.dll which I'm
assuming
>>>>completes this request from the nwtray.exe application. Is it 
> 
> possible
> 
>>>>to get the arguments that it needs to pass the results to my
>>>>application? I've looked through the NDKs for information on
this dll
>>>>and it's functions but I haven't been able to find anything
relating
>>>>to the actual novell client. Anyone know of a better way to get
the
>>>>information I need to supply it in the interface I'm designing
or can
>>>>Novell give me the arguments to pass to this function to get
the
>>>>necessary information?
>>>
>>>
>>>I'd use a debugger to step through nwtray.exe, but I didn't say
that.
>>>
>>>You could probably dig out the client people and just ask them ...
>>
>>Er, if the OP is still reading I might be able to perform a hook up.
> 
> 
> Any help is greatly appreciated. If there is an easier way, I'm also open 
> to suggestions! The big problem I have right now is the application 
> requires that I run it in "Unsecured System User" through
ZENWorks so it 
> can read the registry entry for "HKLM\Software\Novell\Workstation 
> Manager\Identification\Workstation Object". This works for now but if
a 
> client is not connected due to a network connection, the application 
> can't be run local to gather the Workstation ID because it will launch 
> with the current users' rights and not have rights to read that key! The 
> only way I found possible is through the wmntapi.dll but then again, it's 
> all secret!

Just checking on Google it looks like it might (stress might) be:

int WMGetAssociatedWorkstationA(char *tree, char *wkstn);
int WMGetAssociatedWorkstationW(wchar_t *tree, wchar_t *wkstn);

If you were to make this windows.h "tidy" add the following after
those
declarations:

#ifdef UNICODE
#define WMGetAssociatedWorkstation WMGetAssociatedWorkstationW
#else
#define WMGetAssociatedWorkstation WMGetAssociatedWorkstationA
#endif

From what I can tell the tree is input (tree name) and the wkstn string
is output (looks like you should provide at least 256 bytes of storage).

You can always try them and see what you get. Your application might
just terminate with an exception because the thing I found on Google is
not entirely consistent with your analysis. If I correctly read the
sample I found then my guess is that this returns a DN but you should
Post Reply
<< Previous 1 2 Next >>
( Page 1 of 2 )
about | contact