Jump to content
Nutster

My Powershell in Windows 10 is using AutoItX

Recommended Posts

Nutster

When I check the list of commands in the Powershell included with Windows 10, I found Assert-AU3IsAdmin, from the module AutoItX.  Is anybody else getting this, or did Powershell include AutoItX as one of its modules automatically for everybody?  Did you know about this, Jon?

To reproduce, start PowerShell and enter "Help Admin".  I got Assert-AU3IsAdmin which returns 1 if run as admin and 0 if not.  The AU3 in the middle got my attention and I thought to check here.  "Help AU3" gave me a huge list of entries.  Any ideas?


David Nuttall
Nuttall Computer Consulting

An Aquarius born during the Age of Aquarius

AutoIt allows me to re-invent the wheel so much faster.

I'm off to write a wizard, a wonderful wizard of odd...

Share this post


Link to post
Share on other sites
jvanegmond

I can imagine you totally freaking out when you found out Nutster. =)

Share this post


Link to post
Share on other sites
Nutster

I am willing to admit I was concerned.


David Nuttall
Nuttall Computer Consulting

An Aquarius born during the Age of Aquarius

AutoIt allows me to re-invent the wheel so much faster.

I'm off to write a wizard, a wonderful wizard of odd...

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

  • Similar Content

    • Daydreamer067
      By Daydreamer067
      Hi
      in windows 10 i create a new desktop.
      I want to run a script in this desktop, for exemple Mouseclick("left",x,y)
      I want the script to work in that desktop while i switch to the primary desktop.
      So far autoit clicks on the active desktop.
      Is there a way to make it run only on the other desktop ?
       
      Thank you for your response.
    • PramodR
      By PramodR
       
      I see couple of ways to import module ,  one with specifying absolute path of the file to get imported, by this logic i believe to import a specific module will be like #include <c:\modulepath\duplicatemodule.au3>
      but i see some registry changes also made in this link , can someone explain why that registry change is really required.
       
    • PramodR
      By PramodR
       
      I am trying to execute a exe file in auto it as elevated previlage , but not successful till now . below are the methods i tried till now.
      Disabled UAC access from windows and  selected run only as administrator from executable properties.  i logged in as administrator but still exe needs to launch as run as administrator.
       
      Used Below methods from forum still no luck. anything i missing? i tried to use powershell.ps1 intead of exe as well.
      1.  Local $iPID = RunAs($sUserName, @ComputerName, $sPassword, $RUN_LOGON_NOPROFILE, "c:\Exec.exe", "", @SW_SHOWMAXIMIZED)
      2.  RunWait("C:\Automation\TestScripts\Writefilter.exe", @WindowsDir, @SW_MAXIMIZE)     - Std out error
       
      This command gives out put as running with admin rights
      #include <MsgBoxConstants.au3> #include <AutoItConstants.au3> #include <MsgBoxConstants.au3> #RequireAdmin Example() Func Example()     ; Change the username and password to the appropriate values for your system.     Local $sUserName = "Admin"     Local $sPassword = "PASSWORD"     Local $iPID = RunAs($sUserName, @ComputerName, $sPassword, 0, "noetpad.exe", "", @SW_SHOWMAXIMIZED)     ; Run Notepad with the window maximized. Notepad is run under the user previously specified. ;~     RunWait(@WindowsDir & "C:\automation\TestScripts\Writefilter.exe", @WindowsDir, @SW_MAXIMIZE) EndFunc   
    • PramodR
      By PramodR
      Hello,
      I have below code which execute well when all prerequisite met, when window pop up is not available its throwing an error. i want to capture error instead of error  out.
      error handling added in the code to capture it but it does not work still giving me error saying Variable must be of type "Object".
      $oCurWin.FindAll($treescope_subtree, $oCondition, $pElements)
      $oCurWin^ ERROR
      How to catch error properly . 
       
       
    • codingislife
      By codingislife
      Hi everyone, 
      I'm new to the autoit world and am trying to do something a little complicated and am having trouble developing a solution. My OS after reimaging comes up with two operating system choices during boot up, I'd like to delete the incorrect OS. I have noticed that the default OS is always the correct OS. My issue is I need a way to find the OS identifier before I can delete. I know that I  can use bcdedit to find this but it changes every time and it needs to be the correct identifier (i.e. not the Default or bootmgr). If someone knows of a way to parse through the output of bcdedit to find the identifier that would be greatly appreciated. Here is an example of what I am trying to do:
      https://scottiestech.info/2016/07/03/remove-the-choose-an-operating-system-message-when-starting-your-computer/
×