Your best source of information and news about hardware, windows and hardware on the internet

Vista ARTICLES TOP 50 Spyware Virus Vista SOFT Vista HELP

Tools

You are currently browsing the articles from MS Windows Vista Compatible Software matching the category Tools.

Send email from the command line

Two weeks ago, I wrote about backing up a remote windows machine using Remote Desktop.

One thing lacking from this solution is email notification. How do we know if the backup job started? Or finished?

There is a free and open source tool that can be used to solve this problem, it is called blat. It consists of an executable, and a DLL.

You can find it at http://www.blat.net/

Send Mail Command Line

Download it, and extract the files to a place where your scripts run. In my case, I put it in c:\backups

To start, you will need an SMTP server that you have access to. That is probably the most difficult part of getting it to work – which means it is very easy to use.

If I just want to send a simple email that tells me a batch script has started, I could call it like this:

blat.exe -f batch@intelliadmin.com -to support@intelliadmin.com -server 192.168.1.1 -subject "Batch file started" -body "The very important batch script has started"

You have five required options to get your email to send:

-f [FROM] (This is the email address that the message will come from)
-to [TO] (This is the email address the message will be sent to)
-subject [SUBJECT] (Subject of the email. Uses quotes if you have spaces)
-body [BODY] (Body of email. Use quotes if you have spaces)
-server [SERVER] (IP Address or host name of the server)

That is for a simple message. Blat is filled with powerful options. For example, I could run a robocopy in my script, and redirect the output to a text file like this:

robocopy c:\backup \\server\c\backup >> output.txt

Then, when I send my notification I could attach the output text file to my email like this:

blat.exe -f batch@intelliadmin.com -to support@intelliadmin.com -server 192.168.1.1 -subject "Batch file started" -body "The very important batch script has completed" -attach c:\backup\output.txt

Once the command runs, the output will show up as an attachment in my inbox:

Send email cmd prompt

Like I said, it is loaded with options. Check it out, and when you do just type blat.exe -help to get the entire list of command line parameters.

Original Article from www.networksteve.com

Written by Steve Wiseman on November 17th, 2009 with no comments.
Read more articles on BAT Files and otherSoftware and Tools and Utility.

Date and time stamp in your batch files

There has been some activity recently in an old 2007 post I wrote about creating a date and time stamp in your batch files.

Well, the funny part was that I said ‘Date and Time’ in the subject, but I only talked about pulling out the current date.

Sue asked “What if I need both date, and time?”

Good question. What if you want to create a file that has the current date and time for each execution of the script?

In my old article I was creating zip files, using an imaginary command line based zip program. So in my article here I am going to make our goal to zip up a folder and name it:

YYYYMMDDHHMMSS_DATA.zip

If it were run today, our script should create a file by this name:

20091111143900_DATA.zip

To accomplish this, you need to use substring batch codes. If you want more detail on how these work, I explain it in the original article:

Create a date and time stamp in your batch files

To get the current time we use the %TIME% environment variable, and %DATE% for the date.

Using the substring batch codes from my old article, this is how we would pull out the year, month and day:

%date:~-4,4%%date:~-10,2%%date:~-7,2%

How about the time? That can be a little more difficult since the numbers returned from the time are not always the same length. For example, if it is 9 o’clock, it will say 9:00 – not 09:00. This will cause trouble when using the value for our filename.

Before we deal with that space, let me show you the substring codes to pull out the time:

Milliseconds: %time:~-2,2%
Seconds: %time:~-5,2%
Minutes: %time:~-8,2%
Hours: %time:~-11,2%

So naturally, if we wanted HHMMSS we could take those values above and put them side by side:

%time:~-11,2%%time:~-8,2%%time:~-5,2%

But like I said before, the hours can give you trouble because of the space. I came up with this code to pull off the space:

SET HOUR=%time:~-11,2%
Call :TRIM %HOUR%
GOTO :EOF
:TRIM
Set HOUR=%*
:EOF
REM You would use your trimmed hour right here
@echo %HOUR%

So, pulling it all together, how would we get an environment variable filled with a good date and time stamp filename?

Here is the code:
REM Get the hour first and put in an environment var

SET HOUR=%time:~-11,2%
Call :TRIM %HOUR%
GOTO :EOF
:TRIM
Set HOUR=%*
:EOF

REM Create our timestamp filename variable
SET DATESTMP=%date:~-4,4%%date:~-10,2%%date:~-7,2%%HOUR%
SET FILENAME=%DATESTMP%%time:~-8,2%%time:~-5,2%_DATA.ZIP

REM This is just an example call using our new filename
REM -=The real PKZIP program probably uses a different command line syntax
pkzip.exe c:\ImportantFolder\*.* c:\ZIPFILES\%FILENAME%

Using the code above, you can easily generate new files using the date and time in your batch script.

Original Article from www.networksteve.com

Written by Steve Wiseman on November 15th, 2009 with no comments.
Read more articles on BAT Files and Command Line and otherSoftware and Tools and Utility.

Network Administrator 3.0 Update

It has been less than two weeks since we released Network Administrator 3.0.

One of the things we did miss in that release was new icons – we actually used the same icon as Remote Control 4

Normally, this would not be a problem, since you can easily see what program you are running in the task bar. This all changed with Windows 7

In Windows 7, there are no captions by the icons. When both programs are running side by side, it can get annoying trying to figure out which one to click:

Network Administrator Next To Remote Control

We had new icons designed for Network Administrator, and released a new version that uses them:

Network Administrator New Icon

Now when you are using these two programs together under Windows 7, it is easy to see which one to click:

Remote Control and Network Administrator Icons

You can download your update from here:

http://www.intelliadmin.com/NetworkAdministrator.exe

Written by Steve Wiseman on November 11th, 2009 with no comments.
Read more articles on Network Administrator and otherSoftware and windows 7 and Tools and Utility.

Change Power Save Settings Remotely

We have been working hard on Network Administrator 3.

It was just released – You can download it from here:

http://www.intelliadmin.com/NetworkAdministrator.exe

Network Administrator allows you to make tweaks and changes to computers across your network, and in version 3 we have an extensive plugin system that allows us to add functionality quite quickly.

One of the requests we keep getting is a plugin to change power management settings. It turns out that this is actually much harder than it seems. There are different ways in each version of windows – and some of them don’t even work all the time.

We worked around the clock to work around all of the quirks and issues, and finally built a plugin that allows you to change these settings on Windows 2000, XP, 2003, Vista, 2008, and Windows 7.

Power Management Plugin

These settings are not even available with group policy, or any specific registry settings – so this is a huge time saver.

The settings for the plugin are packed with power management options:

Power Management Settings

In a few clicks you can change the power management options for multiple computers across your network.

Best of all, Network Administrator is a free tool to use on up to 3 computers at a time.

Give it a spin and let us know what you think.

Need to use Network Administrator 3.0 on more than 3 computers? Get an unlimited copy for only $199 Click here to purchase

Written by Steve Wiseman on October 23rd, 2009 with no comments.
Read more articles on windows 7 and otherSoftware and windows 2008 and Network Administrator and Windows 2000 and Tools and Beta and Windows XP and Utility and Windows Vista.

Network Administrator – Beta 3

Network Administrator Beta 3 has been released. If you never have used it before, Network Administrator allows you to perform actions on any number of machines across your network. You can reboot 100 computers with the press of a button, disable USB flash drives, or set Microsoft Word to save in 2003 format. These are just a few of things you can do with it.

You can get a copy of the beta from here:

Network Administrator Beta 3

If you purchase 2.9 today, you will get 3.0 free when it is released on October 27th – Best of all, you get it for 50% off as a regular reader of my blog. Just use this special link when ordering:

Purchase Today

In the 3.0 we have built a core system that supports plugins. This allows us to now add new actions quickly. Last time I spoke about the beta I promised 10 new plugins (in addition to the standard list of actions in 2.9) would be added before the final release.

So far we have added 4 of them. Here they are:

Mass Folder Copy – This plugin allows you to pick a folder on your hard drive, and copy it to many machines across your network. Perfect way to copy a set of shortcuts to everyone’s desktop.

Offline Files Disabler – Disables the annoying offline files setting in Windows XP, and 2003.

Logon Disclaimer – Allows you to set a logon disclaimer that is displayed to a user before they login.

Wallpaper Set – You can set a common background wallpaper image, and set options such as tile, stretch, and center.

All of these have been suggested by beta testers. We have had other great ones, like resetting the local admin password, or pushing out MSI files silently. We are still working on the remote execution engine, and once that is complete we will be able to implement some of those ideas. Get your suggestion in by mailing us at plugins@intelliadmin.com We cannot answer all of the emails sent, but we do read them all.

Give it a spin, and let us know what you think.

Written by Steve Wiseman on September 30th, 2009 with no comments.
Read more articles on Network Administrator and otherSoftware and Tools and Utility and Windows.

Free Tool – Suspend from the command line

I have a system task schedule that wakes up my system at night, runs a few backup processes…and then shuts the computer down.

What I really wanted it to do was to suspend, or hibernate. That way I can get back into my computer quick when I come back in the morning.

After searching around, I found that this little VB Script command can be used to suspend a computer:

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "RunDll32.exe powrprof.dll,SetSuspendState"

Unfortunately this does not work on all versions of Windows. For my task, I wanted something I could use on anything from Windows 2000, to the 64 bit version of Windows 7.

After many fruitless searches on Google, I had the IntelliAdmin team build one for me.

It is called System Suspend, and you can download it from here: SystemSuspend.exe

If you run the program with no options, it will immediately suspend the computer. There are two optional arguments you can use when calling it:

/Hibernate:[TRUE|FALSE] – Defaults to false. If you set Hibernate to true the computer will totally power off and save the state to disk. If Hibernate is set to false, then the system will go into a low power state that will allow you to resume quickly

/Force:[TRUE|FALSE]- Applications are notified of the suspend/hibernate by default. If you set the force option to true, then it will skip this step and perform the action immediately

We have tested it on Windows 2000, XP, 2003, Vista, Windows 7, and 2008 – including 64 bit versions…and it works great on all of them.

Written by Steve Wiseman on September 22nd, 2009 with no comments.
Read more articles on BAT Files and otherSoftware and Tools and Utility and Windows.

« Older articles

No newer articles