Steven Meier Posted January 21, 2007 Posted January 21, 2007 The VBS code below is to create a mailbox for an already created active directory user (Mail enable a user). I would like to have this work in Autoit but am a bit lost. Cheers Steve CODEVBS code. strServer = "Paris" strExchangeOrg = "CPNou" strDomain = "DC=CPEXCH,DC=COM" ' These are the defaults, compare with your server and amend. strAdminGroup = "First Administrative Group" strStorageGroup = "First Storage Group" strStoreName = "Mailbox Store (" & strServer & ")" ' Build LDAP string strMailbox = strMailbox & "CN=" & strStoreName strMailbox = strMailbox & ",CN=" & strStorageGroup strMailbox = strMailbox & ",CN=InformationStore" strMailbox = strMailbox & ",CN=" & strServer strMailbox = strMailbox & ",CN=Servers" strMailbox = strMailbox & ",CN=" & strAdminGroup strMailbox = strMailbox & ",CN=Administrative Groups" strMailbox = strMailbox & ",CN=" + strExchangeOrg strMailbox = strMailbox & ",CN=Microsoft Exchange" strMailbox = strMailbox & ",CN=Services" strMailbox = strMailbox & ",CN=Configuration" strMailbox = strMailbox & "," & strDomain WScript.Echo "Mailbox " & vbCR & strMailbox WScript.Quit
jlorenz1 Posted January 21, 2007 Posted January 21, 2007 Hallo Steven Meier, First you can embed your .vbs-script in your Autoit with the function FileInstall() oder FileOpen() & FileWrite() & FileClose() Second you can run your vbs-script with the function Run() or RunWait() If you want to exchange information from vbs-script to an AutoIt_script you can write the information in a file during the vbs-execution and then you can read this file with FileOpen() & FileWrite() & FileClose() . Or you StoutRead() This are the possibilties for me. Bye Johannes Johannes LorenzBensheim, Germanyjlorenz1@web.de[post="12602"]Highlightning AutoIt Syntax in Notepad++ - Just copy in your Profile/application data/notepad++[/post]
jlorenz1 Posted January 22, 2007 Posted January 22, 2007 Hallo Steven Meier,First you can embed your .vbs-script in your Autoit with the function FileInstall() oder FileOpen() & FileWrite() & FileClose()Second you can run your vbs-script with the function Run() or RunWait()If you want to exchange information from vbs-script to an AutoIt_script you can write the information in a file during the vbs-execution and then you can read this file with FileOpen() & FileWrite() & FileClose() . Or you use StoutRead() This are the possibilties for me. Bye Johannes Johannes LorenzBensheim, Germanyjlorenz1@web.de[post="12602"]Highlightning AutoIt Syntax in Notepad++ - Just copy in your Profile/application data/notepad++[/post]
jlorenz1 Posted January 22, 2007 Posted January 22, 2007 Hallo Steven Meier,First you can embed your .vbs-script in your Autoit with the function FileInstall() oder FileOpen() & FileWrite() & FileClose()Second you can run your vbs-script with the function Run() or RunWait()If you want to exchange information from vbs-script to an AutoIt_script you can write the information in a file during the vbs-execution and then you can read this file with FileOpen() & FileWrite() & FileClose() . Or you use StoutRead() This are the possibilties for me. Bye Johannes Johannes LorenzBensheim, Germanyjlorenz1@web.de[post="12602"]Highlightning AutoIt Syntax in Notepad++ - Just copy in your Profile/application data/notepad++[/post]
therks Posted January 22, 2007 Posted January 22, 2007 Wow, you must have thought you provided some really good information if you had to quote yourself twice after your initial post... My AutoIt Stuff | My Github
Steven Meier Posted January 22, 2007 Author Posted January 22, 2007 I would prefer not to call a file as I am using this in an APP I have created for Helpdesk people to make it easy for creation of active directory users etc and basic tasks without having to go through multiple apps or multiple servers. I would like to place the converted VBS script into autoit and compile and would prefer not to be outputting to files and then re inputting as this seems inefficient. I know it can be done but I dont have the skill to convert it. Cheers Steve
randallc Posted January 22, 2007 Posted January 22, 2007 $s_strServer = "Paris" $s_strExchangeOrg = "CPNou" $s_strDomain = "DC=CPEXCH,DC=COM" ;' These are the defaults, compare with your server and amend. $s_strAdminGroup = "First Admini$s_strative Group" $s_strStorageGroup = "First Storage Group" $s_strStoreName = "Mailbox Store (" & $s_strServer & ")" $s_strMailbox="" ;' Build LDAP $s_string $s_strMailbox = $s_strMailbox & "CN=" & $s_strStoreName $s_strMailbox = $s_strMailbox & ",CN=" & $s_strStorageGroup $s_strMailbox = $s_strMailbox & ",CN=InformationStore" $s_strMailbox = $s_strMailbox & ",CN=" & $s_strServer $s_strMailbox = $s_strMailbox & ",CN=Servers" $s_strMailbox = $s_strMailbox & ",CN=" & $s_strAdminGroup $s_strMailbox = $s_strMailbox & ",CN=Admini$s_strative Groups" $s_strMailbox = $s_strMailbox & ",CN=" + $s_strExchangeOrg $s_strMailbox = $s_strMailbox & ",CN=Microsoft Exchange" $s_strMailbox = $s_strMailbox & ",CN=Services" $s_strMailbox = $s_strMailbox & ",CN=Configuration" $s_strMailbox = $s_strMailbox & "," & $s_strDomain MsgBox(0,"","$s_strMailbox="&$s_strMailbox) ;WScript.Echo "Mailbox " & vbCR & $s_strMailbox exit ;WScript.QuitRandall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW
Steven Meier Posted January 22, 2007 Author Posted January 22, 2007 Thanks Randal I will give it a go later.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now