PDA

View Full Version : Prevent Message from Displaying in Windows Explorer


NitLions
01-12-2007, 02:06 PM
I have a third party install that I'm running from a button. At the end of this process, an Internet Explorer window is displayed indicating some files need to be copied manually.

I can handle the moving of these files from the AutoPlay browser, but my question is....

Are there any actions I can call immediately before firing the installation, which would prevent the Internet Explorer window from opening to prevent the display of this message.

i would then revert the action immediately following completion of the installation process.

I've asked the third party if there is any way to supress this, but I'm not too optimistic.

Any help, points to info, guidance is GREATLY APPRECIATED!

RizlaUK
01-12-2007, 02:15 PM
you could use this pice of code from the manual, i use this to stop users from getting to the temp folder while my app is running

the window will open but this code will close it stright away, put it in the page timer

-- Get the titles and window handles of all open windows.
windows = Window.EnumerateTitles();

-- A variable containing text in the title you want to search for.
window_name = "Notepad";

-- Loop through the table of windows.
for handle, title in windows do

-- Check if the window title has the target text.
result = String.Find(title, window_name, 1, false);

-- if the string was found in the title, send the window a close message.
if (result ~= -1) then
Window.Close(handle, CLOSEWND_SENDMESSAGE);
end
end

hope it helps

NitLions
01-12-2007, 03:27 PM
Do you mean to put it in the Page -> Properties -> Script -> On Timer area? I put it in there, changed the search text to "sp_readme.html" as that appears in the title bar when I run the service pack manually. It didn't work, however.

Could it be a problem if I have a wait on the File.Run action?

RizlaUK
01-12-2007, 03:36 PM
did you enable the timer in page on show ?

Page.StartTimer(100);

NitLions
01-12-2007, 03:55 PM
That is AWESOME!

It worked like a champ!

THANKS SO MUCH!

RizlaUK
01-12-2007, 03:56 PM
no problem, glad to help