Page 1 of 3 123>
Topic Options
#89756 - 2002-11-27 05:48 AM Win32Admin.DLL updated
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
A new method has been added to Win32Admin.DLL.

Method: UserSetProps( $Server, $Account, $Properties)

code:
;  $Server : "ServerName"
; $Account : "User1"
; $Properties is a string of property and value pairs. "property=value;"
; The "=" and ";" is required for each property/value pair.
; Properties:
; name => 'testuser', (use to rename an account)
; password => 'testpassword',
; home_dir => '\\\\testserver\\testshare',
; comment => 'test users comment',
; flags => numeric,
; script_path => '\\\\testserver\\testshare\\logon_script.bat',
; full_name => 'test users full name',
; usr_comment => 'test users usr comment',
; workstations => 'comp0001,comp0002,comp0003,comp0004,comp0005,comp0006,comp0007,comp0008',
; acct_expires => epoch seconds time() + 3600 * 24,
; logon_hours => a string of 168 1's and/or 0's, each digit represents 1 hour of the 168 hours in a week
; country_code => numeric,
; code_page => numeric,
; primary_group_id => numeric, 513 = "domain users" the RID of the group
; profile => '\\\\testserver\\testshare\\profile_dir',
; home_dir_drive => 'Y:'
;
; The command returns true (1) on success.
;
; Be very careful when modifying account properties. Research each one before use.
;

code:
$Win32Admin = createobject("Win32Admin")
if vartypename($Win32Admin) <> "Object"
? "@serror"
endif

$props = "password=abc123;" +
"full_name=John Smith;" +
"primary_group_id=513;"
if $Win32Admin.UserSetProps("server1", "user1", $props)
? "properties successfully set"
else
? "UserSetProps failed: @serror"
endif

The updated DLL can be downloaded from my website.

[ 27. November 2002, 06:31: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#89757 - 2002-11-27 07:42 AM Re: Win32Admin.DLL updated
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Any idea when TS support will be there???
_________________________
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
#89758 - 2002-11-27 01:40 PM Re: Win32Admin.DLL updated
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Please define the level of TS support you want. I can add manipulation of WTS account user properties without much issue. Les forwarded a WTS manager DLL for inspection that seems to be more geared toward server/session management than user management. I have yet to find similiar functionality to add to my DLL.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#89759 - 2002-11-27 01:43 PM Re: Win32Admin.DLL updated
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Actually after adding the WTS and a suitable testing period I was going to declare a version 1.0 product.

Has anyone found any issues that needs to be corrected before this happens?

To date I have had very little feedback.

[ 27. November 2002, 13:44: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#89760 - 2002-11-27 01:45 PM Re: Win32Admin.DLL updated
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Is it the tsuserconfig.dll???

That's what I want...

Maybe talk to Shawn and merge it with KiXforms.dll?
_________________________
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
#89761 - 2002-11-27 01:47 PM Re: Win32Admin.DLL updated
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
... Not that there is any relationship between forms and Terminal Server configuration, eh ? [Roll Eyes]
_________________________



Top
#89762 - 2002-11-27 01:52 PM Re: Win32Admin.DLL updated
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
No that wasn't it, but I can provide access to all the WTS user account properties.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#89763 - 2002-11-27 01:57 PM Re: Win32Admin.DLL updated
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Darn, the new functionality is missing a couple lines of code that make the Logon_hours works. [Embarrassed] [Frown]

I will correct this sometime later today.

[ 27. November 2002, 13:57: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#89764 - 2002-11-27 02:03 PM Re: Win32Admin.DLL updated
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
I like how you pass the parms as a delimited strings - sort of reminds me of those positional parameters from VBA.
Top
#89765 - 2002-11-27 02:04 PM Re: Win32Admin.DLL updated
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Jochen,

I know both dlls have nothing in common, except the extend KiX.

And I'd like to regsvr only one dll if possible and not KiXforms.dll + KiXgui.dll + win32admin.dll + tsuserconfig.dll + ....
_________________________
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
#89766 - 2002-11-27 02:05 PM Re: Win32Admin.DLL updated
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
And the properties can be in any order within the string...
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#89767 - 2002-11-27 02:07 PM Re: Win32Admin.DLL updated
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Yeeeaaaahhh ... and finally (speak of an undefined amount of years) we may have this all within kix [Big Grin]
_________________________



Top
#89768 - 2002-11-28 05:06 AM Re: Win32Admin.DLL updated
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
The problem with setting logon_hours with UserSetProps has been corrected.

Also UserGetInfo($Server, $Account) was added to extract 27 properties of the user account. Some are of little interest. But you can adjust and set account's logon_hours using the GUI and then extract that value as a string of 168 1's and 0's to be used as a template in setting the property of other accounts.

The DLL and win32test.kix script have been updated on the web site.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#89769 - 2002-11-28 06:16 AM Re: Win32Admin.DLL updated
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Howard,

Been doing some digging into FTP..

How about FTPPutfile, FTPGetfile?

[Smile]

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#89770 - 2002-11-28 06:38 AM Re: Win32Admin.DLL updated
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Already in there...
code:
; Method FTP($RemoteServer, $Account, $Password, $Mode, $LocalDir, $RemoteDir, $Action, $Filename)
; $Mode -> [ascii|binary]
; $Action -> [get|put|size]
;
; Performs the specified FTP operation.
; Be sure to double the "@" in the password or email address if used for anonymous logons.

$RemoteServer = 'server.xyz.com'
$Account = 'user1'
$Password = 'password'
$Mode = 'ascii'
$LocalDir = 'c:\data'
$RemoteDir = ''
$Action = 'get'
$Filename = 'file.txt'

if $Win32Admin.FTP( $RemoteServer, $Account, $Password, $Mode, $LocalDir, $RemoteDir, $Action, $Filename)
? ? "FTP successful"
?
else
? ? "FTP Failed! @serror"
?
endif

_________________________
Home page: http://www.kixhelp.com/hb/

Top
#89771 - 2002-11-28 07:24 AM Re: Win32Admin.DLL updated
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Howard,

your link in the right colunm in "'REGSVR32 Win32Admin.DLL' to register the DLL." is incorrect. It points to the adssecurity.dll.

Q to all:

Is there any logic in version numbers?
i.e. Win32admin = 0.9.4.0, bbChecker = 1.6 beta1
When will the nummbers increase?
Maybe it can be add to the "Guidelines() topic"

(I think it's been discussed before, but BBsearch doesn't function at work)
_________________________
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
#89772 - 2002-11-28 07:34 AM Re: Win32Admin.DLL updated
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
The link has been fixed. Thanks for letting me know.

As for my version numbers, I will change it to 1.0 when I get the core functionality in it. I need to add WTS user account management. I increment the last column when a trival change occurs like updating the help file or a tiny code fix is applied.

I increment the third number when I add a method to the existing functional groups.

I increment the second digit when I add new functionality or the code under goes a significant rewrite.

I increment the first digit if the compiler changes or I completely rewrite the code and change the data types or structures that are returned by methods.

[ 28. November 2002, 07:35: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#89773 - 2002-11-28 07:40 AM Re: Win32Admin.DLL updated
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Howard,

so in your case it's:
rewrite dll 0.x.x.x --> 1.0.0.0
add new function x.1.x.x --> x.2.0.0
change function x.x.1.x --> x.x.2.0
solve bug x.x.x.1 --> x.x.x.2

I understand now; am thinking Jooel uses this logic too.

When do we use beta/alpha/rc etc...
_________________________
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
#89774 - 2002-11-28 07:50 AM Re: Win32Admin.DLL updated
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
patrick, you know, when you rewrite the code, how sure can you be that it is perfect?

you don't want to call the pre-release of 1.0 as 0.9.9 (many ppl do though)
it actually is misleading as the numbers can grow to something like 0.12.57

so, for the betas and such, I take it as telling of having lot changed code which is not stable enough to be called a release. well, proven stable enough.

like shawn has gone, he has no betas as he would have all the time those.
even his build numbers are not correct as he can make multiple private builds which has the same name as the to be released one (which is damn confusing)

what it comes down to, is to make it look clear what is happening.

also, came to think ms also, xp was to be a great OS we have not seen before and the version number tells us the reality, slighty improven w2k.
_________________________
!

download KiXnet

Top
#89775 - 2002-11-29 03:14 AM Re: Win32Admin.DLL updated
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Howard,

I feel really silly with the FTP stuff that I had been working with. [Embarrassed]

You had already had this under my nose.

Sheesh!

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
Page 1 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 601 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.079 seconds in which 0.029 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