MyTechSupport.ca :: Your Computer Technical Resource Headquarters! MyTechSupport.ca :: Your Computer Technical Resource Headquarters!
HOME FORUMS RESOURCES & TOOLS ARTICLES ONLINE STORE ABOUT US
Computer Support Forums arrow Software Support arrow Operating Systems : Microsoft arrow Topic: Windows 2000: How to hide MSTask.exe window ?
December 09, 2019, 03:30:43 PM
 

Home Forum Rules Help Search Mobile Version Login Register

Welcome, Guest. Please login or register.
Did you miss your activation email?
December 09, 2019, 03:30:43 PM

Login with username, password and session length
 Featured Sites:
News
Article Writers We are looking for quality, informational articles to add to our Computer Articles
Please contact us if you are interested in submitting some....
  0 Members and 1 Guest are viewing this topic.
Pages: [1] Go Down Print
Author Topic: Windows 2000: How to hide MSTask.exe window ?  (Read 2232 times)
r017hz
Newbie
*

Karma: +0/-0
Offline Offline

Gender: Male
Posts: 4


Bookmark and Share

View Profile
« on: January 13, 2005, 10:53:38 PM »

PLEASE SUPPLY RELEVANT INFORMATION:
Operating System Version: Windows 2000 Professional

I have some MS-DOS scripts in .bat files.
I am executing the .bat files using Scheduled Tasks
in the Control Panel.  My scheduled executions are
every 5 minutes, 24x7.  Every time one of the .bat
files is executed, Windows 2000 displays an MS-DOS
window for the duration of the .bat file execution.
The MS-DOS window has the title,

Drive:\WINNT\system32\MSTask.exe

Obviously, a Windows 2000 executable with
pathname, Drive:\WINNT\system32\MSTask.exe,
is responsible for executing my Scheduled Tasks.

How can the display of the MS-DOS window
be suppressed ?

Attached is one of the .bat scripts that
is scheduled to execute every 5 minutes.
Note that the script executes a Java class.
I have changed the file extension to .txt
to allow it to be uploaded.

Download Attachment: runPOTax.txt 747 Bytes
Right click and select Save Target As... then rename the file as shown here and save.

Thanks.

randy_hohl@admworld.com
Logged

 
Ageless
Dark Overlord of the Universe
Global Moderator
Hero Member
*****

Karma: +4/-1
Offline Offline

Gender: Male
Posts: 1779



Bookmark and Share

View Profile
« Reply #1 on: January 14, 2005, 03:37:29 PM »

Since you're running DOS commands, you cannot hide this window. You would be able to if you made it a service, but that might be the long way around. Since it's re-running every 5 minutes, it will always open a new window, even if you used an external program to hide the first window.

Logged

Jord.
r017hz
Newbie
*

Karma: +0/-0
Offline Offline

Gender: Male
Posts: 4


Bookmark and Share

View Profile
« Reply #2 on: January 14, 2005, 06:02:51 PM »

Thanks for the response.  I spoke with
Microsoft Tech Support this morning and they provided the same
response, i.e., display of the MS-DOS window is officially
"works-per-design".  This news, of course, takes this thread
to its next task, namely, what is a good replacement scripting
language to use ?  I have done a bit of research on one from
Microsoft named, wsh.  And, of course, there is Perl.
Tcl may also be an option, altho I have not used it on a Windows
platform previously, only on a Unix platform.  My scheduled
scripts are all identical to the script attached to my original
post.  Any suggestions on an easy replacement scripting language ?

Thanks.
Logged

 
r017hz
Newbie
*

Karma: +0/-0
Offline Offline

Gender: Male
Posts: 4


Bookmark and Share

View Profile
« Reply #3 on: January 14, 2005, 06:37:11 PM »

Thanks for the response.  I spoke with
Microsoft Tech Support this morning and they provided the same
response, i.e., display of the MS-DOS window is officially
"works-per-design".  This news, of course, takes this thread
to its next task, namely, what is a good replacement scripting
language to use ?  I have done a bit of research on one from
Microsoft named, wsh.  And, of course, there is Perl.
Tcl may also be an option, altho I have not used it on a Windows
platform previously, only on a Unix platform.  My scheduled
scripts are all identical to the script attached to my original
post.  Any suggestions on an easy replacement scripting language ?

Thanks.
Logged

 
Ageless
Dark Overlord of the Universe
Global Moderator
Hero Member
*****

Karma: +4/-1
Offline Offline

Gender: Male
Posts: 1779



Bookmark and Share

View Profile
« Reply #4 on: January 14, 2005, 08:55:25 PM »

I'll ask a friend of mine what would be best and thus will come back to you. Smiley
Logged

Jord.
r017hz
Newbie
*

Karma: +0/-0
Offline Offline

Gender: Male
Posts: 4


Bookmark and Share

View Profile
« Reply #5 on: January 14, 2005, 09:21:18 PM »

I've done some research about scripting languages
that are built-in to Windows 2000 Professional,
my OS platform.  JScript and VBScript are both
built-in.  I prefer Perl, but my company will
definitely prefer a built-in language rather than
a third-party download.  I've looked at JScript and
VBScript, and they are very cryptic.
Logged

 
Ageless
Dark Overlord of the Universe
Global Moderator
Hero Member
*****

Karma: +4/-1
Offline Offline

Gender: Male
Posts: 1779



Bookmark and Share

View Profile
« Reply #6 on: January 15, 2005, 05:24:02 PM »

My friend got back to me, he's written a VBscript for you that should do exactly what you want.

Download Attachment: SchedTask.txt 1.58 KB
Right click and select Save Target As... then rename the file as shown here and save.
Logged

Jord.
r017hz
Newbie
*

Karma: +0/-0
Offline Offline

Gender: Male
Posts: 4


Bookmark and Share

View Profile
« Reply #7 on: January 18, 2005, 08:31:50 PM »

This was an unexpectedly robust response.
An actual replacement script in VBScript that uses all the logic in my
original DOS script !!  Amazing.
Unfortunately, my execution of the script using the command,
'cscript com\scheduler\SchedTask.vbs',
consistently fails in the Run Function at the time of the
'Sh.Exec(cmd)' execution with the error message,
'Microsoft VBScript runtime error: Object doesn't support this property
or method: 'sh.Exec''
My research on msdn.com reveals that Exec is a valid method
for the WshShell object.
Any ideas ?  A configuration issue on my machine ?

Thank you.
Logged

 
Ageless
Dark Overlord of the Universe
Global Moderator
Hero Member
*****

Karma: +4/-1
Offline Offline

Gender: Male
Posts: 1779



Bookmark and Share

View Profile
« Reply #8 on: January 20, 2005, 12:46:25 AM »

Hi there,

I've asked my friend to take a further look into your VBScript query, here's what he had to say:

I have no idea why he is using 'cscript' to run the command - it should just run.

Has he tried running the script by just double clicking on it to test that it works before trying to run it as a scheduled task?

Safe to say the script works under XP and I would have thought Win2K too. However, I do not have access to a Win2K machine.

I have attached an amended version of the script which uses some VBS
straight off Microsoft's website for Win2K ->
http://www.microsoft.com/resources/documentation/windows/2000/server/scriptguide/en-us/sas_wsh_pkoy.mspx


If you have further trouble with it, just let me know.
Else I'll bring you two into email contact. Should be faster that way. Wink

Download Attachment: SchedTask.vbs.txt 1.6 KB
Right click and select Save Target As... then rename the file as shown here and save.
Logged

Jord.
Pages: [1] Go Up Print 
 
Jump to:  

Powered by MySQL Powered by PHP

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS!

Disclaimer
This site is NOT responsible for any damage that the information on this site may cause to your system. Everything you try, whether inspired by the response given from this site or not, is entirely at your own risk. All product names and company names used herein are for identification purpose only and may be trademarks or registered trademarks of their respective owners. We are in no way affiliated or representing any of the companies on this site unless specified.
Back to Top
Stop Spam Harvesters, Join Project Honey Pot Fight Back Against Spammers! Get Firefox! Get Thunderbird! View Sylvain Amyots profile on LinkedIn
Back to Top
Google visited last this page August 31, 2018, 04:26:25 AM