#89776 - 2002-11-29 03:53 AM
Re: Win32Admin.DLL updated
|
Howard Bullock
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 ]
|
|
Top
|
|
|
|
#89777 - 2002-11-29 05:12 AM
Re: Win32Admin.DLL updated
|
Howard Bullock
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.
|
|
Top
|
|
|
|
#89778 - 2002-11-30 07:59 PM
Re: Win32Admin.DLL updated
|
Howard Bullock
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
|
|
Top
|
|
|
|
#89779 - 2002-12-01 11:08 PM
Re: Win32Admin.DLL updated
|
Howard Bullock
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 ]
|
|
Top
|
|
|
|
#89781 - 2002-12-01 11:59 PM
Re: Win32Admin.DLL updated
|
Howard Bullock
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.
|
|
Top
|
|
|
|
#89783 - 2002-12-02 08:43 AM
Re: Win32Admin.DLL updated
|
Howard Bullock
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 ]
|
|
Top
|
|
|
|
#89784 - 2002-12-02 11:58 PM
Re: Win32Admin.DLL updated
|
Howard Bullock
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?
|
|
Top
|
|
|
|
#89786 - 2002-12-03 12:19 AM
Re: Win32Admin.DLL updated
|
Howard Bullock
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 ]
|
|
Top
|
|
|
|
#89788 - 2002-12-03 01:23 PM
Re: Win32Admin.DLL updated
|
Bonji
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
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 ]
|
|
Top
|
|
|
|
#89791 - 2002-12-04 04:47 AM
Re: Win32Admin.DLL updated
|
Howard Bullock
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 ]
|
|
Top
|
|
|
|
#89792 - 2002-12-19 03:35 PM
Re: Win32Admin.DLL updated
|
Bonji
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
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.
|
|
Top
|
|
|
|
#89794 - 2003-02-04 05:31 PM
Re: Win32Admin.DLL updated
|
Bonji
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
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?
|
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
0 registered
and 657 anonymous users online.
|
|
|