As a linux administrator I always prefer CLI mode than GUI. But at work I also have to manage windows machines. Most boring task in windows is Printer Installation. If you don’t have active directory at your place you can’t automate the task & you have to go to user’s desk for installation. But windows have some in built script which can help you in installing printer from command line mode.
(more…)
Installing Printer from Command Line
Configure TCP/IP from the Command Prompt using Netsh
Most of the time user use same laptop at home as well as at office. At home most probebly they have different network and in office if the system administrator is smart, he will be using DHCP server to allocate IP address. While working from home they have to set IP address manually as per their ISP. To make this task easier we can use netsh.
(more…)
Enabling Thunderbird’s logging
Most of the time we have to troubleshoot mail clients for numerous reason. For the same Thunderbird provides session logging. Below mention methods are only useful for investigating problems that occur after Thunderbird establishes a connection to a server. If Thunderbird cannot connect to the server, then it is pointless trying to log the connection.
On Windows
Create a batch file to start Thunderbird & place it on desktop
set mydate=%date:~-4,4%%date:~-7,2%%date:~-10,2% set mytime=%time:~0,2%%time:~+3,2% set NSPR_LOG_MODULES=IMAP:5 set NSPR_LOG_FILE=%USERPROFILE%\thunderbird_%mydate%_%mytime%.log start /d "c:\program files\mozilla thunderbird" thunderbird.exe |
Adjust log file location (NSPR_LOG_FILE) as per your need
On linux
Create a bash script to start the Thunderbird
#!/bin/sh TB_PATH="/home/vidyadhar/thunderbird" MYDATE=`date "+%Y%m%d_%H%M%S"` NSPR_LOG_MODULES=IMAP:5 NSPR_LOG_FILE=/tmp/thunderbird_${MYDATE}.log export NSPR_LOG_MODULES NSPR_LOG_FILE $TB_PATH & exit $? |
Adjust thunderbird path (TB_PATH) as per your installation.
If you want to log all modules instead of just IMAP (SMTP, e.g.) then replace “IMAP” above with “all”
Windows command prompt tips
Filed under howto, Microsoft Windows, Script, Server, Software, System, Windows 7, Windows Vista, Windows XP by Vidyadhar on December 29, 2010 at 3:43 pm {no comments}Following tips are useful while scripting in Windows
TIP1:
Everybody likes comments to there scripts. In win32 shell any line starting with :: is a comment
:: This is a comment(more…)