amfony Posted September 4, 2006 Share Posted September 4, 2006 hay gang, My question is pretty simple - im looking for advice rather then tecnical answers. I made a script to open outlook - create accounts - input passwords then exit. It works sometimes and sometimes not - mainly to do with the timing (speed) the script runs. I think it runs to quick for the computers and sometimes will fill in "password" in the account name whilst other times will do so correctly. I find my self after ev-er-y step of the script typing sleep(100). this is very tedious. very. Am i going around this problem the wrng way perhaps? can i be doing this a bette way? (not the automating the timing issue). Thanks gang Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted September 4, 2006 Share Posted September 4, 2006 well thanks for posting your script it helps alot dude, we dont know if your just using send , or controlsend, controlclick or what , so its still kinda hard to know what your problem is Link to comment Share on other sites More sharing options...
sandyd Posted September 4, 2006 Share Posted September 4, 2006 Hi amfony, I have been doing something like this lately, I can create a basic profile for the currently logged on user if thats any help for you. It does this by creating a an outlook PRF file and then imports that into Outlook. If you let us see your script so far, I'll try and point you in the right direction. ----[ SandyD ]--- Link to comment Share on other sites More sharing options...
amfony Posted September 5, 2006 Author Share Posted September 5, 2006 expandcollapse popup; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.0 ; Author: A.N.Other <myemail@nowhere.com> ; ; Script Function: ; Template AutoIt script. ; ; ---------------------------------------------------------------------------- ; Script Start - Add your code below here ; This gets user object information $oMyError = ObjEvent("AutoIt.Error", "ComError") $UserObj = ObjGet("WinNT://" & @LogonDomain & "/" & @UserName) BlockInput(1) Run("c:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE") WinWaitActive("Inbox - Microsoft Outlook") Sleep(125) ; This opens users PST from W:\ WinWaitActive("Inbox - Microsoft Outlook") Send("!f") sleep(125) Send("o") sleep(125) Send("f") sleep(125) Send("W:\Mail\" & @USERNAME & ".pst") sleep(15000) Send("{ENTER}") sleep(125) Send("!t") sleep(125) Send("a") sleep(125) Send("n") sleep(125) Send("!n") sleep(125) Send("{ENTER}") sleep(125) Send("{ENTER}") WinClose("Inbox - Microsoft Outlook") Run("c:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE") WinWaitActive("Inbox - Microsoft Outlook") Sleep(125) Send("^1") Sleep(125) Send("{Down 5}") Sleep(125) Send("{APPSKEY}") Sleep(125) Send("c") ; This is to install MsMail Sleep(125) Send("a") Sleep(125) Send("e") Sleep(125) Send("n") Sleep(125) Send("a") Sleep(125) Send("n") Sleep(125) Send("{ENTER}") Sleep(125) Send("\\server\mailshare\wgpo0001") Sleep(125) Send("{TAB 6}, {RIGHT}, {TAB}") Sleep(125) Send(@USERNAME) Send("{TAB}") $cropped = stringLeft(@username, 2) Send($cropped) Send("2000") Send("{TAB}, {SPACE}, {TAB 4}, {RIGHT 3}, {TAB}, {SPACE}, {ENTER}") sleep(125) WinWaitActive("Add E-mail Account") sleep(125) Send("{ENTER}") Sleep(125) ; This is to make MS Mail Default provider WinWaitActive("Inbox - Microsoft Outlook") sleep(125) Send("!t") sleep(125) Send("a") sleep(125) WinWaitActive("E-mail Accounts") Sleep(125) Send("{ENTER}") sleep(125) WinWaitActive("E-mail Accounts") sleep(125) Send("mi") sleep(125) Send("!s") sleep(125) Send("{ENTER}") ; This is to install email email WinWaitActive("Inbox - Microsoft Outlook") sleep(125) Send("!t") sleep(125) Send("a") sleep(125) Send("e") sleep(125) Send("!n") sleep(125) Send("!p") sleep(125) Send("!n") sleep(125) WinWaitActive("E-mail Accounts") Send($UserObj.FullName) Send("{TAB}email@domain.com{TAB}mail.domain.com{TAB}mail.domain.com{TAB}email{TAB}password") Send("!m") sleep(125) WinWaitActive("Internet E-mail Settings") sleep(125) Send("'email e-mail'{TAB 5}{RIGHT 3}!l!r") sleep(125) Send("{ENTER}") sleep(125) Send("{ENTER}") sleep(125) Send("{ENTER}") BlockInput(0) thats the code so far - as i was saying - its very tedious. Thanks for the input guys. Also sandy could you share your code with me if you want? Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted September 5, 2006 Share Posted September 5, 2006 (edited) I would recomend using control IDs , check autoit window info, go start > autoit v3 > autoit window info and controlsend , and controlclick and stuff Edited September 5, 2006 by thatsgreat2345 Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted September 5, 2006 Moderators Share Posted September 5, 2006 (edited) @amfony - You are making this way to hard. Although you have not specified what version of Outlook you are trying to setup, here is a link that explains how to create and import PRF files. This is assuming you have already pushed these installs? If not you need to check out the Custom Installation Wizard that is provided by Microsoft.I just finished pushing Office 2003 to about 110 computers last month, so if you have any more questions now is the time to ask while it is still fresh on my mind. Edited September 5, 2006 by big_daddy Link to comment Share on other sites More sharing options...
amfony Posted September 5, 2006 Author Share Posted September 5, 2006 installing and customising office (2003) is not my problem, even using prf files is not my problem. Inserting passwords for users email - where in this situation users are required not to know their password - is the problem. And i thought since i was automating why not complete the whole process. Link to comment Share on other sites More sharing options...
sandyd Posted September 6, 2006 Share Posted September 6, 2006 amfony, All i do is create a .prf file and import it into outlook. No passwords are used, as the user is already logged in when he runs the script. It does not add any extra services etc, just his main exchange mailbox. I found a program on the net that creates exchange profiles, and used filemon to monitor where the file was written to, then opened it in a text editor and figured out what it contained. I recommend you check out big_daddy's links above. Sandy ----[ SandyD ]--- Link to comment Share on other sites More sharing options...
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