[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 168
  • Last Modified:

Popup message to user if defrag running?

I currently have a Windows 2003 server scheduled to perform a defrag each week under user NT AUTHORITY\SYSTEM. The defrag is scheduled during the middle of the night, but our employees work at all hours (who doesn't?). I am wondering if there is a way for me to have a message display (only if while defrag is taking place) to a user when they logon to the server using a RDC? Maybe a batch file that would display a message if user logs on between such and such times?
*Edit* - To clarify, my objective is to notify the user why his or her experience might be really slow if they log on during defrag--not necessarily to cancel or pause the process while the user is logged on.
0
nicholasjwolf
Asked:
nicholasjwolf
2 Solutions
 
KCTSCommented:
I'm sort of thinking aloud here... the only option that comes to mind is to use a NET SEND command - problem is that the Windows Messanger service is probably disabled as a security precaution so you will have to devise some way of enabling it and then disabling it again afterwards.
0
 
thenoneCommented:
a message to let the person know that the server is defragmenting?
0
 
nicholasjwolfAuthor Commented:
Yes, a message to let the person know that the server is defragmenting. In other words, instead of me saying, "Boss, everything is really slow right now because you're working at 2am and I need to defrag right now or it won't ever get done" it would be really cool if a popup message (even just a notepad message!) could said something to this effect. Make sense?
0
Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

 
Farhan KaziSystems EngineerCommented:
:: Copy and paste following batch code into notepad and save it with any name having .cmd extension.
:: Put this .cmd file into all users Startup folder.
:: C:\Documents and Settings\All Users\Start Menu\Programs\Startup

@ECHO OFF
TList.exe |FIND /I "dfrgntfs.exe" >NUL
IF NOT ERRORLEVEL 1 (
      ECHO MsgBox "Disk Defragmenter is Running",vbCritical,"WARNING" >VBMsg.vbs
      cscript //nologo VBMsg.vbs)
IF EXIST VBMsg.vbs DEL /F /Q VBMsg.vbs
EXIT /B /0

Hope this helps!
Farhan
0
 
thenoneCommented:
Save this as time.vbs. In the login script for admins add time.vbs to a new line at the end of the login script. Add this vbs to the scripts share. You can change the time to read 2 or 3 so on in the if statement.

dim mytime,current
current = Time()
mytime = Left(current,1)
if mytime = 3 then
msgbox ("The computer is currently defragmenting. Please excuse the computer from running slow.")
end if
0
 
nicholasjwolfAuthor Commented:
Thank you both! -Nick
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now