Jump to content

Automating creation of com object


Recommended Posts

$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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...