Sign in to follow this  
Followers 0
lyledg

Powershell and Autoit integration

13 posts in this topic

Hey guys

I am currently on a MS Powershell course and there are a lot of good things that can be done with this tool.

The only drawbacks are:

1) You need .NET framework 2.0 instlled(Sigh....as usual)

2) Need Powershell INSTALLED....(Just trying to use the powershell.exe standalone won't work!!)

So, taking this all into account, are there any plans afoot to leverage off PS using Autoit, and by having functions available for it in Autoit?

Cheers

Share this post


Link to post
Share on other sites



So, taking this all into account, are there any plans afoot to leverage off PS using Autoit, and by having functions available for it in Autoit?

It is just another CLI interpreter like Comspec, so will be used within AutoIt the same as Comspec. I see no direct connection between AutoIt and CLI interpreters so I cannot envision the concept of having inbuilt functions for PowerShell. AFAIK, if AutoIt were to try and mimic some of the functionality of PowerShell, then it would do it through the runtime files same as PowerShell does.

I have not seen any documentation for any object usage from installing PowerShell. If it has objects then that would help with Autoit scripts interactivity by using Com.

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

There is one dark place, though:

However, Microsoft has made the CLR execution engine (MSCorEE.dll ) a full COM server. It can load your assembly at runtime and provide you with a proxy to your .NET classes.

My code works fine and CRL is ready by COM server mscoree.dll

#include <GUIConstants.au3>

;Declare objects
$oMSCorEE = ObjCreate("System.Security.Cryptography.XXXXXXX")
if not IsObj($oMSCorEE) then
  MsgBox(0,'','Can not create MSCorEE object!')
 exit
endif

But it has numerous interfaces.

Is there DOC for ther's usage?

Or

How can I create instance of NET objects without regasm.exe (by fly)?


The point of world view

Share this post


Link to post
Share on other sites

@Valery

As you probably have seenn your classes are not recognized as COM objects.

The only way I found to tranform .Net Classes to COM is the way it is described in the document I post before.

It would mean a huge savings, if the AU3 developer would build CLR HOST for .Net in AU3

CLR Host application for DotNet

This was the DotNet Assamblies could be run like COM interface does in AU3.

The AU3 scripters would not need to convert to DotNEt Assemblies to COM (using an external tool like REASM),

and than run the COM interface of the assembly through AU3

This is a huge step forward I would think.

regards

ptrex

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

@Valery

As you probably have seenn your classes are not recognized as COM objects.

The only way I found to tranform .Net Classes to COM, is the way it is described in the document I post before.

The LONG way as you can read yourselve.

It would mean a huge savings, if the AU3 developer would build CLR HOST for .Net in AU3

CLR Host application for DotNet

This was the DotNet Assamblies could be run like COM interface does in AU3.

The AU3 scripters would not need to convert to DotNEt Assemblies to COM (using an external tool like REGASM),

and than run the COM interface of the assembly through AU3

This is a huge step forward I would think.

regards

ptrex

Edited by ptrex

Share this post


Link to post
Share on other sites

Sun allows to build any it's classes for COM access by ServiceManager which has so-called Bridge. But they has own concept about interfaces and instances. NET is weird technology where there is very simple technics to use NET classes by common langs. But MS hasn't desire to open it, I think. I can to ignore their's cool objects from NET's world.

And you have to wait a more good times.

:)


The point of world view

Share this post


Link to post
Share on other sites

They tease a candy from the island surrounded by their's sharks.


The point of world view

Share this post


Link to post
Share on other sites

BTW. I found one indicative and instructive article with title

Analysis of .NET Use in Vista RC2

...Put this another way: 3.7% of the executable files (excluding the framework files) in Vista RC2 Ultimate are managed, therefore, Vista is less than 4% managed. Note that I am using the number of executable files since it is easier to measure than the number of publicly available API methods.

It shows that Vista's development has done without application of NET. So, are they ready to use own tool? Or this is deadborn child for the general pleasure.


The point of world view

Share this post


Link to post
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
Sign in to follow this  
Followers 0