Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

wshshell.popup with no button?

Status
Not open for further replies.

bookouri

IS-IT--Management
Feb 23, 2000
1,464
0
0
US
I have a wshshell.popup that comes up and waits for a few seconds before going away.... I need to stop users from clicking the ok button to dismiss the messagebox. Can I eliminate the buttons from the popup? or is there another object that I can use instead of popup...

thanks for any suggestions
 
If you subtract 1 from some of the button/icon-code combinations you get just the Icon and no buttons, or neither (e.g. 7 gives no buttons no icon), BUT ONLY USE IN TIMEOUT MODE!(AND DON'T USE CODE 6, CAN'T BE DISMISSED!)
 
wshshell.Popup "Stand by while I set up your drives....", 2, "Wait...",64

This is my standard popup.. Ive tried all kinds of combinations of nattype numbers but cant find a combination that will get rid of all buttons....

 
So if you had tried my suggestion :-

wshShell.popup "message",2,"caption",63

will give popup with exclamation icon but no buttons.
 
i tried with 63 but the popup doesnt show up at all with that. Apparently, if you put in a number that it doesnt recognize the whole popup just doesnt show.

 
Whatever version is in win2k pro. My wscript.exe on my win2k client is dated 6/26/2001.
 
Put this into a text file and save it as WSHver

msgbox "WSH vesrion: " & ScriptEngineMajorVersion & "." & ScriptEngineMinorVersion

Then double-click on the file, this will tell you the version.

Try this -:

SET objWshShell = createObjext("WScript.shell")
objWshShell.popup "testing",3,"no button, no icon",7
SET objWshShell = Nothing

Save as poptest.vbs and try it
 
broadthought;

I just tried using

wshShell.popup "message",2,"caption",63

and no popup occurs.

I have a W2K Professional workstation and WSH 5.6


fengshui_1998
 
Slight mis-type in my foregoing!

SET objWshShell = createObject("WScript.shell")
objWshShell.popup "testing",3,"no button, no icon",7
SET objWshShell = Nothing

Very perplexing! If I save the above as a '.vbs' file then go to [Start] select Documents, then double-click on the filename I've just saved it as, it works!

I have WSH 5.6 running under Win98.

 
I created a vbs file with your script. When I run it nothing happens....

the vbs is associated with "microsoft windows based script host" it doesnt say what version.


 
FWIW, I'm using WSH 5.6 & VBS Engine 5.6 Build 6914 on both my Win98 & Win2K machines.

On Win98, you get the desired popup w/ NO buttons, nor icons & it times out accordingly.
On Win2K, you get NO output. The script appears to skip the line of code, or else times out immediately. When run thru the debugger, it appears to simply bypass the line of code. Jon Hawkins
 
thats exactly what's happening to me.
 
The fact that the same version of WSH with different OS versions don't behave the same, indicates that-:

1) the version of WSH is pretty meaningless if scripts don't all behave the same for a given version of WSH.

2) either the script components and/or the shell objects are not the same/don't work consistently for differing OS versions.

Not very useful!

The subtract 1 from Icon codes to get no buttons is not specifically listed in the documentation on MSDN, but conversely it states that the list it gives is not exhaustive.
So as to whether values 7, 63 etc are 'legal' or not?
 
Its still hard to believe. When I started researching this I never imagined it would be so difficult to do what should be so simple a task.
 
can someone please provide me with the full script?
i dont care about the X's i just beed the script

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top