Hi,

This will get the imail directory path and then run adduser in a minimised
command window.


dim oWSHShell
dim sAddUserCmdLine
dim sHostName
dim sIMailDir

' Create Window Scripting Host Shell object
set oWSHShell = WScript.CreateObject("WScript.Shell")

' Get the IMail directory from the registry
sIMailDir = oWSHShell.RegRead("HKLM\SOFTWARE\Ipswitch\IMail\Global\TopDir")

' Build command line
sAddUserCmdLine = sIMailDir & "\adduser.exe -u steve -p password -h
domain.com"

' Execute command with window style 2 (minimised), close window afterwards
=true (i think)
oWSHShell.Run sAddUserCmdLine ,2,true

' Clean up after are selves
set oWSHShell = nothing





Steven Moore
Internet Development Engineer
Research Machines
+44 1235 823522 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Philippe Loyer
Sent: 29 June 2000 16:34
To: [EMAIL PROTECTED]
Subject: [IMail Forum] adduser.exe


Hi,

does anybody used adduser.exe in a vb script and is it possible to have the
code ?
Thanks

Philippe.

Please visit http://www.ipswitch.com/support/mailing-lists.html 
to be removed from this list.


STANDARD DISCLAIMER: This message is confidential. You should not copy it or
disclose its contents to anyone. You may use and apply the information only
for the intended purpose. Internet communications are not secure and
therefore RM does not accept legal responsibility for the contents of this
message. Any views or opinions presented are only those of the author and
not those of RM. If this email has come to you in error please delete it and
any attachments.

Please visit http://www.ipswitch.com/support/mailing-lists.html 
to be removed from this list.

Reply via email to