I use Outlook Express as my mail client, and a POP3 interpreter YPOPS to give OE access to my Yahoo accounts. It works like a dream. But it's two clicks too many to open YPOPS and OE both, so i changed the OE shortcut to point to a .cmd file [...batch file if u like...] dropped into the OE folder which opens YPOPS and then OE. Ohyazzz...! Now, is there any way i can stop the cmd window from opening for a split second as it does this simple thing? There must be a cmd somewhere..... any ideas? [..and i do not mean @ECHO OFF... I do not wish for the window to open at all]. It's just a neatness thing.. on the bothersome scale of 1-10 it doesn't even rate... it's just that i like to learn stuff.

Recommended Answers

All 3 Replies

I haven't found a strictly OS solution, but a very, very, very small script program (3 lines of code, actually) can overcome this problem. If you build a .vbs file (VbScript file, that runs using WSH [Windows Scripting Host]) you can have it execute a program, and set it's window style to hidden.... just follow these steps:
1) launch notepad
2) Enter The Code Below, Changing The Third Line So It Is The Path To Your cmd file.
3) Click file, save as.
4) Change "Save As Type:" to "All Files"
5) Name the file whatever you want (and save it wherever you want) but make sure you end the name with .vbs

Just remember to change the last line of code, where it says "c:\runme.bat" to whatever the path and filename is of your .cmd file. Here is the code I have:

dim Wsh
set Wsh = WScript.createobject("WScript.Shell")
wsh.run "c:\runme.bat", 0, 0

EDIT: Truth be told, you could probably completely remove the .cmd file, and do everything you do in it, in the .vbs file, and that too would solve the window opening problem.

comatose, thank you for that reply.... you've opened a new door for me. Strangely, the script did not recognize the path of my little cmd file, so i'm looking into that, learning the basics of WSH... cscript and wscript, plus a bit of vbs. I'll drop the file into a script and get it to tell me what it sees for the path. By the way, the .cmd file is just this:-

@ECHO OFF
START /DE:\"Program Files\YPOPs" ypops.exe
%HOMEDRIVE%%HOMEPATH%
START /DE:\"Program Files\outlook express" msimn.exe

..simple as.. but all it needed to be.

One other thing, outlook express behaves strangely. As you may note from the above post my default program files for apps is in E:\ Program Files; windows has C:\ all to itself. When i first installed XPSP2 i deliberately broke OE. To get it back some time ago i had to reinstall msoe50.inf and wab50.inf from the cd. Fine, but it rebuilt OE in C:\ Program Files, and also in E:\ Program Files folder!! It will run from either folder. Further, if i rename an exe file in E:\ P..F... it will write in a new one and go on working, but if i make it inoperable in C: it stays that way. Since it's pretty much a core part of XP i would have preferred it to be just in C: along with the rest of Windows. It looks like it is where it wants to be, in E:. I am not going to change my default %programfiles% from E: just to please it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.