Ratherbefishing Posted August 17, 2010 Share Posted August 17, 2010 $user="localadmin" $domain="somedomain" $Password="Qwerty12" $ENV="PROD" RunAsSet($User, $Domain, $Password) Run("C:\Windows\system32\dcomcnfg.exe") WinWaitActive("Component Services") Sleep(1000) Send("{HOME}") Sleep(1000) Send("{DOWN}") WinWaitActive("Component Services","Component Services") Sleep(3000) Send("#{NUMPADADD}") Send("{DOWN}") ; WinWaitActive("Component Services","\Computers") Sleep(3000) Send("#{NUMPADADD}") Send("{DOWN}") WinWaitActive("Component Services","\My Computer") Sleep(3000) Send("#{NUMPADADD}") Send("{DOWN}") Send("{APPSKEY}") Sleep(200) Send("N") Send("A") Send("{ENTER}") Send("M") ;Send("E") Sleep(700) exit What the above code segment does is run the component services navigates to COM +Applications and starts the new COM+ Application Installation wizard Selects Create empty application In the create empty Application screen I get a MMC error "MMC cannot initialize the snap-in." This is before I try and do anything with the screen. I put sleep(700) to see if I slowed things down the problem would go away. But to no avail. If I run the component services under admin tools group and do this manually it is fine. Any suggestions would be welcome. Thanks Link to comment Share on other sites More sharing options...
Ratherbefishing Posted August 19, 2010 Author Share Posted August 19, 2010 Fixed it. Added more winwaitactive functions for each window that appears during the running of the wizard. 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