PDA

View Full Version : External Application not SW_MAXIMIZE


nobody
12-13-2007, 12:28 PM
i am totally new to setup factory 7
i am trying to run amon.exe in maximized state from my setup.exe.

my code is :

result1 = File.Run ("%ProgramFilesFolder%\\CA\\HIPS Toolkit Test Harness\\amon.exe", "","%ProgramFilesFolder%\\CA\\HIPS Toolkit Test Harness",
SW_MAXIMIZE, false);

this starts amon.exe but in normal state, not in SW_MAXIMIZE

so i did this

result1 = File.Run("%ProgramFilesFolder%\\CA\\HIPS Toolkit Test Harness\\amon.exe", "", "%ProgramFilesFolder%\\CA\\HIPS Toolkit Test Harness", SW_SHOWNORMAL, false);

handle = Application.GetWndHandle(SessionVar.Expand("%ProgramFilesFolder%\\CA\\HIPS Toolkit Test Harness\\amon.exe"))

Window.Maximize(handle);


please tell me what did i do wrong ?

nobody
12-13-2007, 12:31 PM
amon.exe start in normal start but not in SW_MAXIMIZE from the second code snippet ...

how do i control external windows from setup.exe, specially SW_MAXIMIZE and SW_MINIMIZE

Adam
12-13-2007, 01:42 PM
Application.GetWndHandle() is used to get the handle of the calling application which is in this case the Setup Factory runtime.

The SW_MAXIMIZE command should work. Are you using the latest version of Setup Factory?

Adam Kapilik