Sign in to follow this  
Followers 0
NadOo

Can't display GUI when a windows service call the complied script.

5 posts in this topic

I have wrote a script with GUI and complied it to exe file, I can run it correctly by double clicking it in the windows explorer.

Now I have another situation to ues the exe file, that is:

I have a windows service running with the system account, and alow service to interact with desktop. The service can call and run other program correctly, but when I use it to call and run the AutoIt complied exe file, I can see nothing in the deskop and in the task manager, what is the problem? who can help me? Thanks!

Share this post


Link to post
Share on other sites



Ive done some service research not to long ago.

From your text I understand that u start a service that starts your own program.

From what I understand is that programs started as a service can't show gui's. Maybe the program inbetween rigs your prog so that it can't show gui's as well...

Try to service-start an .bat that calls your program.

Share this post


Link to post
Share on other sites

Hi Triblade, Thanks for your quickly reply! I'm very sorry for my poor English.

Now I have found my problem:

My complied script file is a.exe , and it has a configuration file named a.ini. I make the script to show nothing when the configuration file is missed.

the problem is when the windows service program call and run a.exe, the a.exe program can't find the configuration file , but in fact the configuration file is in the same folder with a.exe.

I know what the problem is , but I don't know why it can't find the ini file. Why?

Share this post


Link to post
Share on other sites

Hi Triblade, Thanks for your quickly reply! I'm very sorry for my poor English.

Now I have found my problem:

My complied script file is a.exe , and it has a configuration file named a.ini. I make the script to show nothing when the configuration file is missed.

the problem is when the windows service program call and run a.exe, the a.exe program can't find the configuration file , but in fact the configuration file is in the same folder with a.exe.

I know what the problem is , but I don't know why it can't find the ini file. Why?

Change the line in your script for reading the ini file to IniRead(@scriptdir & "\myfile.ini", etc, etc,)

Share this post


Link to post
Share on other sites

Yes! Now it worked. Thank you very much!

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  
Followers 0