27 replies
by baird_k
Run the cmd with a switch /c. That will terminate the dos prompt. For example:
cmd /c dir
KB
by jshara
by felixenescu
The solution is to use a wrapper utility to
launch your program.
I can send you binaries of two programs
but maybe you prefer a source code.
If you have acces to a C compiler use the
following code:
-------- CUT -------
#include
#include
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
MSG msg;
char prog[] = "my_prog.exe";
WinExec(prog, SW_HIDE);
return (msg.wParam);
}
-------- CUT -------
The unhide program is a little longer.
I'll send it to you if you want.
Also search :
http://www.nettally.com/waldoe/freeware/winutil.html
for window.zip
by jshara
by baird_k
By the way...I assumed that you were running on Windows NT. To make the script a little cleaner run:
%comspec% /c "program"
That will allow the .bat or .cmd file to run on '98, '95 or NT.
KB
by jshara
In a straight scripting environment, you can't hide the CMD window from your users. You can launch it minimized by using the "start /m" command. This will put it in the systray at the bottom of the screen.
All other methods of hiding the CMD prompt require writing a program to accomplish what you want to do.
by jshara
by mrshawng
Have the Schedule Service launch the program, and set it not to be Interactive. However, you must configure the Schedule service on each system properly. You'll also have to get an exe called soon.exe, from the resource kit. SOON is similar to the AT command, except that you don't have to specify a time, it automatically executes the command line in five seconds. Example "soon C:\myscript.bat" would launch myscript.bat in 5 seconds, and would not be interactive, therefore not visible to any users.
Hope this is what you wanted.
by jshara
by blafle
by jshara
by jshara
by jcmarshburn
I have used a small utility to do this with my login scripts on the domain. This will also work for what you have in mind.
Look on this page for HIDE.ZIP http://www.swynk.com/sysapps/sms.asp
Disregard the NT disclaimer. I have used it for over a year with no problems.
by jshara
by rotocron
by jshara
You can use the schedule service which can run a batch file on the console process and the window used is invisible. You can run your console process by inserting the proper command in the batch file
Luck
by jshara
While this addresses the login script specifically, you should be able to modify the idea to work for you:
Create a batch file that calls the actual logon script. Using Notepad, create a
file that has the following entry:
START /MIN LOGON.BAT
Save the batch file and specify this file as the logon script name for the user accounts in User Manager for Domains. Now, when the users log on to Windows NT, they will initially run the above batch file, which, in turn, calls the logon script and starts it minimized. The last entry in the real logon script file must be EXIT so the file will close properly.
This works great and solves the problem of users seeing the commands being
processed in the actual logon script.
Also, theinitial call to the logon script designated in User Manager for Domains
still creates a logon dialog box. The box disappears almost immediately, but may
still cause a problem for the administrator who does not want the user to see
anything out ofthe ordinary when lo
by jshara
by uknow
Use Windows NT Resource Kit:
SRVANY.exe utility can be used.
Try running a application as a NT service.
Everytime you start NT you can have your
Command Shell program run invisible to user.
by jshara
by allen_swain
Within the NT Resource kit, there is a utility that enables you to run a program as a service. This will be transparent to your users, and you can monitor the service via Server manager, then services to ensure that it is running on their PC.
hope this helps,
Allen Swain, MCSE
by jshara
by jshara
This discussion is closed to new replies.
Trending Windows Forum posts
Sort by Trending