Jump to content

Quick ? about the sleep.exe - Possible to Hide?


Recommended Posts

Posted

Is it possible to hide the command-prompt looking window it creates when run?Tried using CMDOW @ /HID in the batch that uses this, but all it does is hide the batch window itself and not the one sleep.exe creates....

Thanks.


Posted

Well, basically the sleep.exe wants to have a command-window to run in. So don't use CMDOW if you need sleep.exe to not show up another window of its own.

You'll understand what I mean, if you try this:

1. Type command to sleep.exe from "Run" box. (sleep 5) - this creates a "Sleep" window

2. Open a command-prompt, run the sleep from there. (sleep 5) - no extra sleep window is seen

If you want a real good solution, then I'd say move to using XPlode for your unattended scripts. It allows you to hide specific windows (like what you want) - and does a lot of advanced things.

Posted (edited)

This Doesnt use sleep.exe what it does is make a vbs with the sleep vbs cmd

than it calls the vbs than goes on. Just modify the code to suit your needs.

echo off
cls
mode con: Cols=35 Lines=3
color 9f
title Timing Test
> R875.vbs echo Wscript.sleep 875
>> R875.vbs echo Wscript.quit
> R1970.vbs echo Wscript.sleep 1970
>> R1970.vbs echo Wscript.quit
cls
color F0
echo.
echo        1
start /w R875.vbs
cls
color F9
echo.
echo        2
start /w R875.vbs
cls
color F8
echo.
echo        3
start /w R875.vbs
cls
color F7
echo.
echo        4
start /w R875.vbs
cls
color F6
echo.
echo        5
start /w R875.vbs
cls
color F5
echo.
echo        6
start /w R875.vbs
cls
color F4
echo.
echo        7
start /w R875.vbs
cls
color F3
echo.
echo        8
start /w R875.vbs
cls
color F2
echo.
echo        9
start /w R875.vbs
cls
color F1
echo.
echo        10
start /w R875.vbs
del R875.vbs
CLS
COLOR 5E
ECHO.
echo Did It Work!!!!
start /w R1970.vbs
del R1970.vbs

The Red Highlights are the time varibles

> R875.vbs echo Wscript.sleep 875

>> R875.vbs echo Wscript.quit

> R1970.vbs echo Wscript.sleep 1970

>> R1970.vbs echo Wscript.quit

Here The cmd just edit to your needs

Hope This Helps

Edited by gunsmokingman

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...