Jump to content
Sign in to follow this  
TXTechie

AutoIt vs. PowerShell

Recommended Posts

TXTechie

Hello Everyone,

I know that this is an AutoIt forum and that everyone here loves AutoIt (as I do). But, I was hoping that some of you whom might have experience with PowerShell could provide me with a more objective comparison as to whether it makes more sense to use AutoIt or PowerShell as my primary "wrapper" for driving all of the software deployments within my company. Currently, I'm using VBScript for my "wrapper" template, but I'm seriously thinking about switching to either AutoIt or PowerShell.

Which one should I use and why?

Share this post


Link to post
Share on other sites
water

You could use both. Call PowerShell from AutoIt.

Why:

AutoIt is easy to learn. Moving from VBScript to AutoIt shouldn't be a problem.

Powershell is powerfull. Some things that can't be done with AutoIt can be done using PS.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
keldepulo

You could use both. Call PowerShell from AutoIt.

Why:

AutoIt is easy to learn. Moving from VBScript to AutoIt shouldn't be a problem.

Powershell is powerfull. Some things that can't be done with AutoIt can be done using PS.

 

with aut2exe you can create an encrypted executable script embedding everything you need, and than execute them everywhere (on every NT version ) without installing bloaded components ...

have you never tried to do this with vbscript or with powershell ?

Share this post


Link to post
Share on other sites
water

Here is the >link how to combine AutoIt and Powershell.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
TXTechie

Thanks, water! You make some great points - using AutoIt as my primary foundation or "wrapper" I have GUI functions AND I can use PowerShell from within AutoIt (even adding a GUI for PowerShell functionality)! The best of both worlds!

Does anyone else have any suggestions/input?

Share this post


Link to post
Share on other sites
water

Just an observation.

I run PS from Autoit by directly calling powershell.exe to create an Exchange mailbox. It runs forever (about 30 seconds) and uses a huge amount of storage (about 160 MB).

So I use PS only if I can't avoid it.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
JLogan3o13

I would agree with Water - I've used PowerShell in the past, but now only do so when I cannot accomplish something purely with AutoIt (which is rare).


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
scubar

I use AutoIt for the majority of my tasks.

I recently began using Powershell as its far easier/safer to accomplish Active Directory tasks in Powershell than in Autoit though.

Share this post


Link to post
Share on other sites
water

I recently began using Powershell as its far easier/safer to accomplish Active Directory tasks in Powershell than in Autoit though.

Did you have a look at my AD UDF? I'm sure it is faster and easier than PS.

What do you think makes PS safer than AutoIt regarding AD?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
scubar

No offence but I would just much rather use Powershell as it has been designed by Microsoft with an aim to make windows server based tasks easier.

The AD Cmdlets are so easy to work with it makes automating tasks a breeze

Share this post


Link to post
Share on other sites
JLogan3o13

It is a personal choice, to be sure, scubar. I see AutoIt the same way - it has been designed to work with the Windows API, and to make tasks easier (not only server tasks). And from my personal use of the AD Cmdlets, I have only found one task out of literally hundreds of scripts that I could not do more easily in AutoIt. It's all about your experiences with a language, I guess :)


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
water

No offence taken :)

If you feel better using PS to interact with AD, fine. The AD UDF was started when there was no Powershell available.

As JLogan3o13 said: It is a personal choice.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
water

icecola321,

is this post related to the subject? Don't understand what you try to tell us. Please use Google translate to create a meaningful english post.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
spudw2k

with aut2exe you can create an encrypted executable script embedding everything you need, and than execute them everywhere (on every NT version ) without installing bloaded components ...

Mostly true, except for the "encrypted" part; the security (integrity) of a complied script has been discussed time and time again on this forum.

I didn't want to leave that (as slight as it may seem) hanging out there.  It could be ill or un-informed info, but I don't want other un-informed users to adopt it.

The ultimate lesson here is, don't script something you aren't willing to risk being seen by prying eyes (such as sensitive names, sites and credentials).

Sorry for the rant.

Anyways, both PowerShell and AutoIt are great.  I mostly have AutoIt experience and it has worked well for me.

Share this post


Link to post
Share on other sites
TXTechie

I have also heard (and experienced some) of the slowness of PowerShell. Just another good reason to go with AutoIt.

I have decided to go ahead an migrate my template from VBScript to AutoIt.

I want to thank everyone for their input!

Share this post


Link to post
Share on other sites
spudw2k

Despite what new members may think--specifically one's who want something for nothing or clearly disregard the rules--this forum is a great resource/community for learning; so please don't hesitate to ask for help when needed.

  • Like 1

Share this post


Link to post
Share on other sites
TXTechie

Thank you, spudw2k. And, I agree with you - this community has already helped me and if I'm going to be using AutoIt even more than I have in the past, I fully expect to be here in the forums more often.  :rolleyes:

Share this post


Link to post
Share on other sites
Starstar

I do not know about powershell. But i must say one thing "autoit is an easiest tool in programming". 


Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once."

Share this post


Link to post
Share on other sites
water

Adnan,

do you really think this helps the OP? Would be better posted in the Chat section.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
JLogan3o13

I do not know about powershell. But i must say one thing "autoit is an easiest tool in programming". 

 

Adnan, every time you start spamming threads with these irrelevant posts you get warned by a Mod. How long before you actually learn?

Back on topic - the other big difference in my mind is GUI goodness in AutoIt. I much prefer building a GUI in AutoIt (despite the limitation in the look and feel of windows) rather than a wpf app in PowerShell.


√-1 2^3 ∑ π, and it was delicious!

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  

  • Similar Content

    • JuanFelipe
      By JuanFelipe
      Hello friends, I have a simple question, can I have a variable that is not reset, even if my program is closed?
      That is, I want to make a program that can only be opened once, have a variable $ ini = 0, when it is opened for the first and only time it becomes $ ini = 1, so that it can not use the program a second time, as if it was a test software.
      I do not want the variable to depend on a reading of an external file that is easily manipulated. Thank you.
    • nooneclose
      By nooneclose
      My program has to first search for names in Column D that do not match up with column C. I got that search to work using arrays. It was slow and I could not figure out how to delete them so I just manually put coded the names that do not belong. I found their cell location but I do not know how to store that location and delete it.
      This is what I have so far.
      Local $NameToDelete1[6]  = _Excel_RangeFind($OpenWorkbook, "Smith, Bill") _ArrayDisplay($NameToDelete1, "Excel UDF: _Excel_RangeFind Example 1", "", 0, "|", "Sheet|Name|Cell|Value|Formula|Comment") _Excel_RangeDelete($OpenWorkbook.ActiveSheet, $NameToDelete1[2], $xlShiftUp)  
      Please help, I wanted to have this program done yesterday but I did not see this problem until yesterday. 
    • TrashBoat
      By TrashBoat
      So Im trying to make a simple 2d game and make some sort of collision detection so why not to make a 2 dimensional array but i have no clue how  to write it in multiple lines
      Global $map[5,5] = [0,0,0,0,0 _ [0,0,0,0,0 _ [0,0,0,0,0 _ [0,0,0,0,0 _ [0,0,0,0,0] something like this but it doesn't work
    • Zein
      By Zein
      #include "..\Include\Array.au3" #include "..\Include\File.au3" #include "..\Include\AutoItConstants.au3" Local $aRetArray Local $sFilePath = "n.csv" _FileReadToArray($sFilePath, $aRetArray, ",") ; _FileReadToArray($sFilePath, $aRetArray, $FRTA_COUNT, ",") _ArrayDisplay($aRetArray, "Original", Default, 8) The above code shows two versions of _FileReadToArray and both don't work as expected.
      The first one doesn't use the comma as a delimiter. (so I get a single column array)  I tried adding "Default" between $aRetArray and "," then it told me it had an incorrect number of parameters. 

      I looked again at the documentation:
       
      #include <File.au3> _FileReadToArray ( $sFilePath, ByRef $vReturn [, $iFlags = $FRTA_COUNT [, $sDelimiter = ""]] )
      And I with or without the flags params I should be getting a 2D array due to my file being a csv. 
      I then tried a regular flag, $FRTA_COUNT, and it tells me that I'm using a variable $FRTA_COUNT while it's not declared. Tried putting in 1 instead and it told me again, incorrect number of params. 

       
    • nooneclose
      By nooneclose
      I need to perform a subtotal in excel and I would like to automate this process using Autoit if possible like always any and all help will be greatly appreciated. 
      I can not find a good example but the two from Microsoft. Here is one of the two from msdn.microsoft.com/en-us/vba/excel-vba/articles/range-subtotal-method-excel
      I do not really understand how to translate this into AutoIt, but I gave it a try and here is what I have.
      $OpenRange      = "A1:E200" $xlSum          = -4157 $Added_Array[2] = [2, 3] $OpenRange.Subtotal("B1", $xlSum, $Added_Array, True, False, True) I just need to perform a subtotal on a range based on a header called department, and then perform a sum on the results.
×