sam
sam

Reputation: 4694

how to execute script without installing the exe of its program

I am executing a autoit script when autoit is installed in the system by using the following code

objProcess = New System.Diagnostics.Process()
objProcess.StartInfo.Arguments = "abc"
objProcess.StartInfo.FileName = "Z:\Scripts\test.au3"
objProcess.Start()

But I need to do same by giving a path to a unzipped files instead of installing it on system. Any idea how can I do this. e.g My autoit path where I extracted files are z:\Software\autoit3.exe and my scripts path is "Z:\Scripts\test.au3".

Upvotes: 0

Views: 1432

Answers (2)

Jos van Egmond
Jos van Egmond

Reputation: 2360

You can compile your script files with the included Au2Exe compiler. This will turn your .au3 files into .exe files and they can be run without needing to install AutoIt on the computer first.

Upvotes: 3

Matt
Matt

Reputation: 7160

Use the command line parameters as described in the helpfile, and run the autoit3.exe as the main process.

At it's most basic you would use something like:

objProcess.StartInfo.FileName = "path\\autoit3.exe"
objProcess.StartInfo.Arguments = "\"path\\test.au3\" abc" // You can add any arguments for the script afterwards.

Note that I have never used vb.net, so don't expect anything I write to work first time :P But that is the basic idea.

Upvotes: 1

Related Questions