Computing.Net > Forums > Windows XP > Close program from CMD or schedule

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Close program from CMD or schedule

Reply to Message Icon

Name: Filip
Date: August 4, 2003 at 08:06:16 Pacific
OS: Win XP Pro
CPU/Ram: P4 1500MHz
Comment:

Hi

1) I need to close a program from the command prompt in win xp. I was not able to find a command that can do that. If the cmd prompt doesn’t have command that can close a program like outlook is there any other way to close it from the cmd promt by calling some outer program?

2) I would also like to be able to schedule a program close from win schedule.



Sponsored Link
Ads by Google

Response Number 1
Name: Everett
Date: August 4, 2003 at 19:55:16 Pacific
Reply:

Filip: have a look at this utility;

PowerOff

http://users.pandora.be/jbosman/applications.html

Poweroff is a small program for Win95/98/NT/W2K/XP

to schedule a shutdown/reboot/logoff/poweroff/Standby/Hibernate/Lock/Wake-On-LAN at a certain time.

also supports command line options that allow poweroff to be used in batch scripts.

it has a built-in scheduler, it allows you to run a program before doing the action.

you can give a warning message to the user, wait for a process to finish before doing the action and full remote control is supported.


0

Response Number 2
Name: Filip
Date: August 5, 2003 at 03:03:16 Pacific
Reply:

Thanks Everett.

It doesn't solve my problem though. I need to close just one program (Outlook) from the command promt (batch prosess).

I also need to close one program on a schedule time. The computer must remain logged on.


0

Response Number 3
Name: Filip
Date: August 5, 2003 at 07:45:24 Pacific
Reply:

Thanks Everett.

It doesn't solve my problem though. I need to close just one program (Outlook) from the command promt (batch prosess).

I also need to close one program on a schedule time. The computer must remain logged on.


0

Response Number 4
Name: Filip
Date: August 5, 2003 at 08:07:38 Pacific
Reply:

Thanks Everett.

It doesn't solve my problem though. I need to close just one program (Outlook) from the command promt (batch prosess).

I also need to close one program on a schedule time. The computer must remain loged on.


0

Response Number 5
Name: Everett
Date: August 6, 2003 at 18:53:35 Pacific
Reply:

Filip: looks like you need to write some script such as Windows Scripting Host (WSH);

WSH is a very useful tool that allows you to directly run VBScript, JScript and XML encoded scripts within the operating system.

to run a VBScript or JScript program. double-click on any file that has the .js or .vbs extension and that file will be executed within the Windows Script Host environment.

after the scripts have been thoroughly tested, you can schedule their execution through the Windows Task Scheduler.

WSH offers a suite of eight objects that can be used for network, registry and shell manipulation.

an interesting aspect of WSH is that it contains two platform-specific executables, cscript.exe and wscript.exe.
the echo (output) for cscript is to a command window (via a Win32 console application). while the echo (output) for wscript is to a graphical message box (via Windows).
the c stands for console and the w for Windows.
for a full list of arguments, enter "cscript /?" or "wscript /?" at the command prompt.

more info available at:

http://www.winguides.com/scripting/reference.php?category=3

this site has some sample scripts:

http://infocenter.cramsession.com/tutorials/categoriesX.asp?pi=S4C19

and this VBScript editor for Windows Scripting Host .VBS files looks useful:
AderSoft VbsEdit 2.0

http://www.adersoft.com/vbsedit/default.htm?adwords=2



0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: Close program from CMD or schedule

XP closes programs without being told www.computing.net/answers/windows-xp/xp-closes-programs-without-being-told/11226.html

Shut down: Error Closing program O www.computing.net/answers/windows-xp/shut-down-error-closing-program-o/104897.html

Programs from one HD don't work www.computing.net/answers/windows-xp/programs-from-one-hd-dont-work/96173.html