Page 1 of 1
Supress windows cmd when executing vbscripts?
Posted: Fri Aug 17, 2007 4:43 am
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?
Posted: Fri Aug 17, 2007 6:20 am
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..
Posted: Fri Aug 17, 2007 6:48 am
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
Posted: Fri Aug 17, 2007 11:24 am
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?
Posted: Sat Aug 18, 2007 5:10 am
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.
Re: Supress windows cmd when executing vbscripts?
Posted: Mon Nov 03, 2008 5:53 pm
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...