Jump to content
sahinatam

Hide Window in windows 10 - (Moved)

Recommended Posts

We have  autoit code to run and hide some software. It was working on windows 7 successfully. But when we migrate to windows 10, we saw that it didn't  work while hiding window.

ShellExecute("C:\IPMS\NSClient++\nscp.exe", "test",@SW_HIDE)

Sleep(2000);

WinSetState ( "nscp.exe", "", @SW_HIDE)

When i print return code of WinSetState, it is 1 (no error)

Do you have any idea ?

Share this post


Link to post
Share on other sites

I'm sure that it is. It's likely that your WinSetState command isn't working as expected because it is finding a different window than you are targeting. Have you tried supplying some text from the window as the 2nd parameter of WinSetState to assist in finding the correct window?

Share this post


Link to post
Share on other sites

Did you run the exe before ?  Now let's make a full runable script so we can stop guessing :

#include <Array.au3>

Opt ("WinTitleMatchMode", 2)

ShellExecute("C:\IPMS\NSClient++\nscp.exe", "test")
Sleep(2000)
$array = WinList ("nscp.exe")
_ArrayDisplay ($array)

 

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...