techieBrandon
asked on
Looking to make use of Win32 ShowWindow from Java (looking at using JACOB, JAva-COm Bridge)
My goal is from my java program to hide a program that is already started. I have the proccess id already but I am not certain that will be much use for me. From my research it looks like I can either work very hard on some custom JNI hooks or I can take the easier route and use an open source API like JACOB (I looked at a number of other API projects but JACOB seemed most reliable and widely endorsed, please correct me if I am wrong ). I am not able to modify how the program initial program starts.
So I have the idea and I am now looking through the javadocs... but I don't have any clear examples...so I am googling and soon to be ramming code down the jvm's throat to see what it spits back... If anyone has any insight that they can share with me about using JACOB or any other Java to COM open-source API please help.
My thoughts are this (psuedo'ish):
//Find window of Oracle installer proccess
myWin = FindWindow("setup.exe", NULL);
//Force minimize
ShowWindow( myWin, SW_FORCEMINIMIZE);
That is my start... how to impliment this in JACOB is a good guess. I also have a feeling that I could be completely off base here (the main reason for this post would be for reassurance that I am not headed into a deadend)
So I have the idea and I am now looking through the javadocs... but I don't have any clear examples...so I am googling and soon to be ramming code down the jvm's throat to see what it spits back... If anyone has any insight that they can share with me about using JACOB or any other Java to COM open-source API please help.
My thoughts are this (psuedo'ish):
//Find window of Oracle installer proccess
myWin = FindWindow("setup.exe", NULL);
//Force minimize
ShowWindow( myWin, SW_FORCEMINIMIZE);
That is my start... how to impliment this in JACOB is a good guess. I also have a feeling that I could be completely off base here (the main reason for this post would be for reassurance that I am not headed into a deadend)
Are you sure the Oracle installer doesn't have a silent install option? ;-)
ASKER
It does have a silent option, however it still spawns a cmd window from the setup.exe even if the silent flag is used. I actually have another post on here prior to this one about just that. Having spoke with one other person that has dealt with the Oracle installer, he had same issue as I.
https://www.experts-exchange.com/questions/23879795/Silent-install-not-really-silent.html
Regards,
https://www.experts-exchange.com/questions/23879795/Silent-install-not-really-silent.html
Regards,
Why use Oracle btw?
ASKER
I don't get to choose, I just get the task. ;o)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.