Page 2 of 3 <123>
Topic Options
#89776 - 2002-11-29 03:53 AM Re: Win32Admin.DLL updated
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
No problem.

I am close to publishing an updated DLL with the added functions listed below. I still have a couple bugs to fix.
code:
;-----------------------------------------------------------------------------------------------------
; Share Methods
;-----------------------------------------------------------------------------------------------------

; NetShareAdd ($Server, $NetName, $Type, $Remark, $Max_Uses, $Path)
;
; $Server (string) computer on which to add share.
; $NetName (string) name of share.
; $Type (string) one of the following:
; STYPE_DISKTREE
; STYPE_PRINTQ
; STYPE_DEVICE
; STYPE_IPC
; $Remark (string) share comment or description
; $Max_Uses (numeric) Maximum number of connections (-1 = unlimited)
; $Path (string) local path on $Server to share out.
;
; Returns 1 (true) if successful.

; Adds a new disk share on server \\bullpup


;-----------------------------------------------------------------------------------------------------
; NetShareCheck ($Server, $Path)
;
; $Server (string) computer on which to add share.
; $Path (string) local path on $Server to share out.
;
; Returns (string) one of the following:
; STYPE_DISKTREE Disk drive
; STYPE_PRINTQ Print queue
; STYPE_DEVICE Communication device
; STYPE_IPC Interprocess communication (IPC)
; STYPE_SPECIAL Special share reserved for interprocess communication
; (IPC$) or remote administration of the server (ADMIN$).
; Can also refer to administrative shares such as C$, D$,
; E$, and so forth.

; Checks if c:\data on server \\testserver is sharing a device


;-----------------------------------------------------------------------------------------------------
; NetShareGetInfo ($Server, $ShareName)
;
; $Server (string) computer on which to add share.
; $ShareName (string) name of share on $Server to share remove.
;
; Returns an interleaved array if successful.
; [0] = 'netname' [1] = data
; [2] = 'type' [3] = data
; [4] = 'remark' [5] = data
; [6] = 'max_uses' [7] = data
; [8] = 'current_uses' [9] = data
; [10] = 'path' [11] = data



;-----------------------------------------------------------------------------------------------------
; NetShareSetInfo ( $Server, $ShareName, $Properties )
;
; $Server (string) computer on which to add share.
; $ShareName (string) name of share on $Server to share remove.
; $Properties (string)
;
; $Properties is a string of properties and values. "property=value;"
; The "=" and ";" is required for each property/value pair.
; Properties:
; remark => 'New description of share.',
; max_uses => numeric -1 = unlimited,
;
; Returns 1 (true) if successful.

; Sets information on share testshare on server \\testserver

;-----------------------------------------------------------------------------------------------------
; NetShareDel ($Server, $ShareName)
;
; $Server (string) computer on which to add share.
; $ShareName (string) name of share on $Server to share remove.
;
; Returns 1 (true) if successful.

; Deletes share 'myShare' on server \\testserver





[ 29. November 2002, 03:54: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#89777 - 2002-11-29 05:12 AM Re: Win32Admin.DLL updated
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
The Win32Admin.DLL has been updated again.

The new functionality is listed in the post above. The web site has been updated with Win32Admin.DLL version 0.10.0.0. This version information is reflected in the internal version property as well as the file properties of the file.

I have successfully tested all the new share management functions on one of my remote servers.

These functions replace the need to use RMTSHARE.EXE.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#89778 - 2002-11-30 07:59 PM Re: Win32Admin.DLL updated
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
I have added a Win32Admin.DLL documentation page to provide a clearer explanation of what the DLL can do and save everyone from rooting through the sample scripts.
http://mywebpages.comcast.net/habullock/Win32Admin.htm

This page is also linked from the page where you can download the latest version of Win32Admin.DLL.
Kix Solutions
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#89779 - 2002-12-01 11:08 PM Re: Win32Admin.DLL updated
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
For those that ask for WTS stuff, I am currently working on adding code to the DLL:

WTSEnumerateSessions
WTSEnumerateProcesses
WTSTerminateProcess
WTSQuerySessionInformation
WTSQueryUserConfig
WTSSetUserConfig
WTSSendMessage
WTSDisconnectSession
WTSLogoffSession
WTSWaitSystemEvent

WTSQuerySessionInformation can return the remote client's computername, user's DomainName, and user's account.

I am still experimenting and learning about some of the data structures. If I can decypher them then I can provide the client's network address without a separate operation and the client's video display characteristics.

[ 01. December 2002, 23:20: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#89780 - 2002-12-01 11:38 PM Re: Win32Admin.DLL updated
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Do you think that the remote OS could be included?

Oh and what about Citrix specific stuff? Had you had a look at their SDK?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#89781 - 2002-12-01 11:59 PM Re: Win32Admin.DLL updated
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
In the generic Lanman WTS server support the client's OS does not seem to be available.

WTS_INFO_CLASS

At this point the Citrix SDK does not yet appear on my to do list.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#89782 - 2002-12-02 12:07 AM Re: Win32Admin.DLL updated
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Howard,
I have no specific need but rather in response to the following:

Topic: check client version
Topic: Possible to retrieve OS of WTS client?

As I had mentioned within those threads, software on the server is able to ascertain those. Just don't know if there is an API or property/method.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#89783 - 2002-12-02 08:43 AM Re: Win32Admin.DLL updated
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
The Win32ADmin.DLL has been updated yet again. This addition includes 5 Windows Terminal Server (WTS) methods. The DLL, documentation, and an example script have been updated on the web site.

I still have more WTS stuff to include, but I am too tired at this point and will not have time through the week. I thought some WTS functionality is better than none for this week.

[ 02. December 2002, 08:44: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#89784 - 2002-12-02 11:58 PM Re: Win32Admin.DLL updated
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
How many people are actually using this tool (Win32Admin.DLL)? If you are, could you please send me an email so that I can get an idea of it usage?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#89785 - 2002-12-03 12:15 AM Re: Win32Admin.DLL updated
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
I'm using it for getting/setting user props... Will use it for WTS...
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#89786 - 2002-12-03 12:19 AM Re: Win32Admin.DLL updated
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
How would you rate the implementation, ease of use, and stability? Any suggestions or requests to improve its usability/functionality?

[ 03. December 2002, 00:21: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#89787 - 2002-12-03 12:23 AM Re: Win32Admin.DLL updated
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
I think it's easy to use, but hey that's my opinion...

Specially like the way parms can be supplied (the =.. ; ) .

Like the docu too! It's simple and straight to the point.

Just keep up the good work.

[ 03. December 2002, 00:24: Message edited by: MightyR1 ]
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#89788 - 2002-12-03 01:23 PM Re: Win32Admin.DLL updated
Bonji Offline
Starting to like KiXtart

Registered: 2001-09-28
Posts: 169
Loc: Virginia
I haven't had a chance to use the dll yet, however I like what it can do. I am planning on using it as soon as I can make the time to work on an application.

-Ben
http://www.rgcweb.org/kix

Top
#89789 - 2002-12-04 03:34 AM Re: Win32Admin.DLL updated
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Les, I believe that I have found a way to return data such as Major and Minor OS as well the networking software the computer is running. Once this command (NetServerGetInfo) is implemented in Win32Admin.DLL, I believe that the logon script on the Citrix server could utilize this call against the client computer name to yield the Client OS and one or more of the following:
code:
SV_TYPE_WORKSTATION       A LAN Manager workstation 
SV_TYPE_SERVER A LAN Manager server
SV_TYPE_SQLSERVER Any server running with Microsoft SQL Server
SV_TYPE_DOMAIN_CTRL Primary domain controller
SV_TYPE_DOMAIN_BAKCTRL Backup domain controller
SV_TYPE_TIME_SOURCE Server running the Timesource service
SV_TYPE_AFP Apple File Protocol server
SV_TYPE_NOVELL Novell server
SV_TYPE_DOMAIN_MEMBER LAN Manager 2.x domain member
SV_TYPE_LOCAL_LIST_ONLY Servers maintained by the browser
SV_TYPE_PRINTQ_SERVER Server sharing print queue
SV_TYPE_DIALIN_SERVER Server running dial-in service
SV_TYPE_XENIX_SERVER Xenix server
SV_TYPE_SERVER_MFPN Microsoft File and Print for NetWare
SV_TYPE_NT Windows NT/Windows 2000/Windows XP workstation or server
SV_TYPE_WFW Server running Windows for Workgroups
SV_TYPE_SERVER_NT Windows NT/Windows 2000 server that is not a domain controller
SV_TYPE_POTENTIAL_BROWSER Server that can run the browser service
SV_TYPE_BACKUP_BROWSER Server running a browser service as backup
SV_TYPE_MASTER_BROWSER Server running the master browser service
SV_TYPE_DOMAIN_MASTER Server running the domain master browser
SV_TYPE_WINDOWS Windows 95 or later
SV_TYPE_TERMINALSERVER Terminal Server



[ 04. December 2002, 03:37: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#89790 - 2002-12-04 04:32 AM Re: Win32Admin.DLL updated
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Howard,
I'm trying to guess at how these would be applied against a client name. Would this go out as a remote network query? I have users that connect to my WTS via ICA-Dial. ICA-Dial does not run over standard network protocols but rather is a proprietary Citrix protocol. Perhaps you're shooting for standard M$ RDP-based clients?

BTW, out of curiosity, do you work with Windows Terminal Servers or Citrix? ICA or RDP?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#89791 - 2002-12-04 04:47 AM Re: Win32Admin.DLL updated
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
I use a Ctrix server and install and use Microsoft's two user WTS for server Admin, but do not manage any metaframe, WinDD, etc.

I envisioned was the client logon script executing on the Citrix server.

the DOS environment var: WINSTATIONNAME=ICA-tcp#416

$SessionID = 416

then take the SessionID and WTSQuerySessionInfo ($Server, $SessionID)

code:
applicationname =
clientaddress = 192.168.0.100
clientbuildnumber = 985
clientdirectory = C:\PROGRA~1\Citrix\ICACLI~1\
clientdisplay =
clienthardwareid = 0
clientname = BULLOCKHA
clientproductid = 1
connectstate = WTSActive
domainname = XXXXX
initialprogram =
oemid =
sessionid = 416
username = userhab
winstationname = ICA-tcp#416
workingdirectory =

Then use the "clientname" in the issue of NetWkstaGetInfo which yields:
code:
computername=BULLPUP
langroup=US-TYCO-E
lanroot=
logged_on_users=7
platform_id=500
ver_major=5
ver_minor=0

or

computername=WCDCNOR60
langroup=AMP01
lanroot=C:\WINDOWS
logged_on_users=1
platform_id=400
ver_major=4
ver_minor=0

Extra info:

Use WTSEnumSessions($Server)
code:
Session ID: 0
State: WTSConnected
WinStationName: Console
Session ID: 1
State: WTSListen
WinStationName: ICA-tcp
Session ID: 37
State: WTSActive
WinStationName: ICA-tcp#37
Session ID: 292
State: WTSActive
WinStationName: ICA-tcp#343
Session ID: 300
State: WTSDisconnected
WinStationName:
Session ID: 346
State: WTSActive
WinStationName: ICA-tcp#346
Session ID: 407
State: WTSActive
WinStationName: ICA-tcp#407
Session ID: 413
State: WTSActive
WinStationName: ICA-tcp#413
Session ID: 415
State: WTSActive
WinStationName: ICA-tcp#415
Session ID: 416
State: WTSActive
WinStationName: ICA-tcp#416
Session ID: 417
State: WTSIdle
WinStationName:
Session ID: 418
State: WTSIdle
WinStationName:



[ 04. December 2002, 04:49: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#89792 - 2002-12-19 03:35 PM Re: Win32Admin.DLL updated
Bonji Offline
Starting to like KiXtart

Registered: 2001-09-28
Posts: 169
Loc: Virginia
Howard,

This is a great tool!

I'm working with sending an email, however when the email is received by my email client the From field is not being populated (while showing the list of all emails). When I open the email all the fields are populated though. I am reading my email with Outlook 2000 and am sending the email to an Exchange 2000 server.

I have looked at some conversations on the board about sending emails and Lonkero had a good solution with using telnet.
http://www.gwspikval.com/jooel/UDF/udf/000248.htm
I am unable to take advantage of this though because I cannot find a telnet utility that is command-line only (and is free). However, looking at the structure of the email being sent with Lonkero's UDF to the SMTP server there appear to be 2 additional fields that your .dll doesn't account for. I was wondering if one of these would fill in the missing display name. Thanks for your input.

-Ben
http://www.rgcweb.org/kix

Top
#89793 - 2002-12-19 05:37 PM Re: Win32Admin.DLL updated
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
I will look into the email issue you reference and will look into providing a telnet session as well.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#89794 - 2003-02-04 05:31 PM Re: Win32Admin.DLL updated
Bonji Offline
Starting to like KiXtart

Registered: 2001-09-28
Posts: 169
Loc: Virginia
I was just checking to see if you had made any progress on the From field on sending an email. I appreciate your efforts on this.

-Ben
http://www.rgcweb.org/kix

Top
#89795 - 2003-02-04 06:48 PM Re: Win32Admin.DLL updated
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Can you send me an email at habullock@comcast.net so that I can see what your talking about?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
Page 2 of 3 <123>


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

Who's Online
0 registered and 657 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.078 seconds in which 0.032 seconds were spent on a total of 13 queries. Zlib compression enabled.

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