Supress windows cmd when executing vbscripts?

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
wetwired
Member
Posts: 85
Joined: Thu Jun 19, 2003 7:33 am

Supress windows cmd when executing vbscripts?

Post by wetwired »

When I execute a vbscript in Housebot that interacts with windows the cmd console runs ontop of my swremote. Is there a way to have the vbscript run minimized?
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

I am on holiday right now with some stupid internet datalimit. So no time to give the answer, but I can tell you that this should not be a problem to solve. Lots of my scripts interact with windows com objects, WMI etc etc and non of them pop the cmd window or whatever. So if nobody else gives the answer here, I will back to this when I am home form holiday. In the meantime you can look at the PC information script in the scripts section somewhere. That interacts a lot with windows and doesn't pop a thing. So if you get that working or you look at it, you will get an idea of what your are doing wrong..
roussell
Advanced Member
Posts: 268
Joined: Wed Dec 15, 2004 9:07 am
Location: Pelham, AL

Post by roussell »

It sounds like your default scripting engine has changed from Wscript to Cscript. As the names might suggest; Cscript is command line based and Wscript is Windows based. Try the following at a command prompt on the SWremote PC:

cscript //h:wscript

That should change the default to Wscript. Running either Wscript /? of Cscript/? at a prompt will present you with the program options for each.

Terry
wetwired
Member
Posts: 85
Joined: Thu Jun 19, 2003 7:33 am

Post by wetwired »

Ok, sorry, it wasn´t the scripts that caused the popups, its the execute program device that caused it. I was executing it from a script.

What I want to do to is run a batfile, but I want it to run minimized. How do I do that. Use a command line argument?
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

OK, that's something different and that is something that is bugging me also. I even tried starting a shortcut to the batchfile where the shortcut options would have the "start minimized" enabled, but to no luck. So if anybody figures this one out, I would be interested as well. Didn't put much time in it since it doesn't bother me that much, but I have some of these pop ups that I could do without. When my CID pops (interaction between answering machine software and HB) and when my Meedio setup starts and kills I see this too.
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Re: Supress windows cmd when executing vbscripts?

Post by Richard Naninck »

I finally figured out how to run a bat file from the execute program device without having to look at the silly black DOS window. If the bat file takes long enough so you can press some buttons in the DOS window, you can fix it.
Run the bat file and rightclick the upperleft closing button in the window and select properties for that window. Not sure what it is called in English since my setup is Dutch, but click on the third tab from the left and you can set the window dimension and position on screen. After having done that, press OK and you will be asked if you want these settings to run for all DOS windows or just for the ones using the same name. The name will always be the same for the same bat file running from the execute program device, so select the one only for the applicable name. My DOS window is positioned outside my screen dimensions and if I want to see it, I right click the button in the bottom bar and select maximize. Works like a charm...
Post Reply