Jump to content
Sign in to follow this  
Sreed

Running AutoIT executable as console app (cmd)

Recommended Posts

Sreed

Hi,

I've written a small AutoIT script that silently installs a software and then make other configuration changes such enabling autologon and disabling screensave by modifying the registry key value.

Then I compiled into standalone executable as my team members need to run this on many windows boxes.

Now the problem is, that though the script is running fine and doing what it is supposed, it is not showing console (the cmd window) while it is running. When its running its shown in the taskbar, but my users can only know that it is running when a console is shown. I've also used a few consolewrite statement to write onto the console to let the users know the status of the executable while it is running.

What changes need to be made to the script so that it shows the console and also consolewrite statements are shown on the console.

Even when I run it from the command line (by giving its executable name), the cmd returns immediately and the program in the background. But when I redirect the output using > operator, I can see consoleWrite statements in the redirected file.

Could you please help?

Thanks,

Sreedhar.

Share this post


Link to post
Share on other sites
hannes08

Put this line on top of your script before compiling it:

#AutoIt3Wrapper_Change2CUI=y

:)


Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post


Link to post
Share on other sites
Sreed

Thanks Hannes for the reply, but it didn't help. It is running as earlier without showing the console.

Share this post


Link to post
Share on other sites
Sreed

Hey it started showing after compiling it with AutoITtoExe Converter tool, earlier I was doing it with the compile option of tools menu from AutoIT editor. But not sure why earlier compile didn't work?

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  

×