View Full Version : Very simple popup window
07-06-2010, 01:01 PM
What I want is to be able to execute a file from a batch file that will pop up a little window that says something like "installation complete" and then "close this window to continue" and that's it. Not fancy like resizeable or scroll bars or menu bars or anything like that.
07-06-2010, 09:10 PM
Then you can put any content on the page you'd like including that text. The scrollbars would actually be easy since window.open supports these features (or at least suggests them to the browser), if you did want that also. (But of course you can leave that blank and not get them too.)
However, I don't know what you mean about a "batch file" because the only thing I know by that name is something that executes like an .exe on your computer and NEVER from a website. That would be way too much of a security risk and no browser allows it, and that's a very good thing. If they did, it would be just that simple to install a virus on someone's computer.
If you are simulating this (maybe?), you can use the method above, and if you require that this actually works, then I suggest:
1. Rethink the entire website and try to find a better way. For example, you can just allow users to download the .exe if they want and run it. But it won't do that from your page.
2. Something like this may be possible using ActiveX, a component of internet explorer. It won't work in any other browser, but if this is for a very specific purpose (an office, for example) that may not be a problem. Of course even ActiveX won't give you full access: you'll need to have the user allow you full access to the computer, and there's no reason to think anyone would do that (unless, again, it is for an office or something).
07-07-2010, 01:05 PM
djr33, Thank you for your reply.
I'm sorry, I think I might not have been very clear. This isn't running from a web page, in fact, these computers aren't even connected to the internet. I am using a batch file to automate the installation and modification of some programs on the PCs. At times, I will need to give notice to the installer, like "plug in adapter now" or "installation complete". I don't want to just display the message in the console window because the users are (very, very) dumb. So they need a simple window that shows up that just gives the message.
I was thinking of making a .html file that sits on the installation disk that when the installation gets to a certain point it just executes the .html file. It's not linked from an internet page or anything like that. The page that pops up will just give the message. That is why I mentioned not having menu bars or anything like that, just to make it simple.
So how do I make a .html file that disables the menus when I double click it (or execute it from a batch file)?
Or if there is a better way to get a message across that would be good too.
07-07-2010, 01:28 PM
Creating a popup window is easy...
Maybe what I want is called a message box?
07-07-2010, 07:38 PM
Ah, I see what you mean. That makes a lot more sense now.
First, be aware that this isn't really a forum for anything aside from web design (and a few things peripherally related to web design), so you may get a much better answer at a forum for programming in whatever language you are using (C#, Java, etc).
Second, popup windows are created on the linking page, not on the popped up page. So there isn't any code you can add to a page that makes it open as a popup, but rather code that you add to a link that creates a new window as a popup (completely unrelated to whatever content may be on that page).
I believe that you could popup a new window of the command prompt that would say this, and that would be easier. And surely there must be a way to do a windows dialog box. I just haven't done anything with this.
07-07-2010, 09:06 PM
Thanks again for the reply. Here is what I have come up with:
> usermessage.vbs ECHO Set wshShell = CreateObject( "WScript.Shell" )
>>usermessage.vbs ECHO wshShell.Popup "Put Text Here", 0, "Title", 0
Just putting that in the batch file works great. Thanks again.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.