Jump to content

Using AutoIT in VB.NET works fine on one machine but not another

Recommended Posts

 I have been using the AutoItX3.dll in my VB.NET apps for some time now with great success. I recently set up a new PC and copied some of my apps over to it, along with the DLL which I registered using regsv32. What's weird is the AutoIT commands on this PC just don't do anything, no error, nothing. For example, I have the command Run(<app>) and when executed it just does nothing ie it doesn't open up the app, whereas it works fine on my other PC. I have confirmed <app> is the correct path, even notepad won't open up. It's strange that there is no error or anything. Has anyone encountered this before? Any suggestions on what to check? It's got me baffled.


Link to post
Share on other sites

Sorry to keep replying but I can't edit my posts for some reason.

Anyway, I misspoke on my last reply, no app gets run on the new PC. I created another vb.net Windows form app and added reference to both the 32bit and 64bit COM DLLs. I then created a form with just this:

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim Autoit As New AutoItX3Lib.AutoItX3
        Dim iPid As Integer = 0

        iPid = Autoit.Run("notepad.exe", "", 1)

    End Sub

I run it on one PC (64bit Windows 10 Pro) and I get a valid PID # in return. I run the app on the other PC (64bit Windows 10 Home) and I get a PID of 0 and notepad doesn't open. I have registered both the 32 bit and 64 bit DLLs. I have also tried compiling for x86 and x64 separately and I get the same result.

Any help appreciated.

Link to post
Share on other sites

I have this same issue. I built everything on a 2019 server, got it working then copied the file to a 2008 R2 server, installed AutoIT and it would not work at all. Same exact issue, iPID=0 and nothing would happen. Task Manager would show the .exe running as well. I then took it to another server that had 2016. Manually running the .au3 file only worked once then would not run anymore. I created a task in task scheduler to run the Autoit3.exe and said for it to grab the .au3 file upon logon. Once I restarted the server the task ran successfully and launched what I wanted the scirpt to do but I cannot manually run the .au3 file still. The logon task has continued to work without any issues. 

Link to post
Share on other sites
  • 3 weeks later...

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...