Page 1 of 1 1
Topic Options
#44057 - 2003-08-14 03:11 PM help needed with "writevalue"
Clausm Offline
Lurker

Registered: 2003-08-14
Posts: 2
Loc: Denmark
Hi all

I'm new to this board, and kind of new to kix, and I need imput/help/source code on the matter mentioned below:

I want to be able to use AD users and computers to get a listing of who is logged on to what PC at any given time.
My supporters need this info to be able to use VNC in supportmatters without having to use 5 minuts each time to giude the user to the "computername info" [Smile]

The idea is to add the @userid value to the workstation description whenever a user logs on.

So basicly I need to do a writevalue using the @userid variable.

I tried this:

Writevalue ("HKEY_LOCAL_MACHINE\system\currentcontrolset\services\lanmanserver\parameters", "srvcomment", "@username", "REG_SZ")

- Does not work. I get a "unknown:username" entry in the regfile. And the computers describtion does not change at all.

Any ideas/input would be great.

Thanks in advance

Top
#44058 - 2003-08-14 03:15 PM Re: help needed with "writevalue"
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
hehe.
that's why our users have "my computer" named same as wksta-name [Wink]
and that's why many of us place support valueable stuff also in startmenu.

anyway, can't help as no AD -> no AD scripts from here.
_________________________
!

download KiXnet

Top
#44059 - 2003-08-14 03:44 PM Re: help needed with "writevalue"
Clausm Offline
Lurker

Registered: 2003-08-14
Posts: 2
Loc: Denmark
well..its not really that AD-related.

I just want to be able to write the @username value to the workstation description during logon. This takes place on the local PC. Does AD vs. no AD affect the @username value?

Top
#44060 - 2003-08-14 03:55 PM Re: help needed with "writevalue"
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
if you want to use @userid why you tried @username?

just try with:
Writevalue ("HKEY_LOCAL_MACHINE\system\currentcontrolset\services\lanmanserver\parameters", "srvcomment", "@userid", "REG_SZ")
_________________________
!

download KiXnet

Top
#44061 - 2003-08-14 04:00 PM Re: help needed with "writevalue"
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Why would you put @UserName in quotes? Also, it is not a macro. Try @FullName instead.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 302 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.051 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org