≡ Menu

A security heads-up to bloggers

Today in my blog post, I am not going to write anything technical, tips and tricks. But I am going share few information with other bloggers for whom this information is very important in computer security perspective.

This afternoon I got a short and sweet email from a mail ID asking me to write product review for one of their product and they provided me a link to the software. In return to my review they offered me a free license for the software on which I have to write the product review. Well, everything looks fine so far and I gave a confirmation in email that I will check it a bit later in day. I opened the link they provided me in email and it’s like a company which is selling their products online. As I haven’t received any confirmation from other side about the license part they promised me, I just did a brief search over internet with the email ID and landed in Sara’s blog. I have seen a professional way of spreading virus after reading the blog entry where sara also got email like me but luckily came out of that crap because of her good antivirus (that’s what she says in her blog!).

The actual story is that, few people over internet are targeting bloggers and asking them to write review for their products and offering % or free licenses in return. The links they are providing in emails are downloading virus into your computer which in turn suffer your system in many ways if you don’t have proper Antivirus software. I know, there are many companies which ask people to write review for their products to increase their sales, but for the first time I have seen people misusing this channel to spread virus. Now I am in dilemma whether to respond to such emails or not. If I skip, I might miss some good chances and if I accept I will waste my time in fixing AV issues.

I will find-out the precautions to be taken against these scams and come up with another blog post pretty soon.

Happy Learning…,
Sitaram Pamarthi

{ 0 comments }

This post confirms my ownership of the site and that this site adheres to Google AdSense program policies and Terms and Conditions.

{ 0 comments }

While installing cluster instance, it is failing at the initial stage of setup with unexpected error message pop-up. I reviewed the “C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGsummary.txt” log file and it has the below error.


Microsoft SQL Server 2005 9.00.4035.00
==============================
OS Version : Microsoft Windows Server 2003 family, Enterprise Edition Service Pack 2 (Build 3790)
Time : Fri Oct 16 12:53:22 2009


NODE1 : To change an existing instance of Microsoft SQL Server 2005 to a different edition of SQL Server 2005, you must run SQL Server 2005 Setup from the command prompt and include the SKUUPGRADE=1 parameter.
NODE1 : There was an unexpected failure during the setup wizard. You may review the setup logs and/or click the help button for more information.

There can be two reasons here…

1) Improper directory structure in SQL installation source
2) You are trying to install different version of SQL than what you have on cluster.

If you find both the above are not applicable in your case, then go to “C:\Program Files\Microsoft SQL Server90\Setup\Bootstrap\LOGFiles\SQLSetup0018__Core(Patched).log” log file and see what it says. In my case, I have below error message in the logs which is indicating problems with reading one of the shared drive Q:. Sometime back I have moved system databases from one drive to another for a cluster instance and deleted the old drive. But the regkey(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.9SetupSetupDataRoot) is still containing the old drive letter. Cluster setup is trying to read this key and failing because it cannot find the cluster drive Q: which I deleted some time back.

———————————————————————
Failed to find property “ComputerList” {“SqlComputers”, “”, “”} in cache
Source File Name: datastoreclusterinfocollector.cpp
Compiler Timestamp: Mon Nov 17 17:05:55 2008
Function Name: ClusterInfoCollector::collectClusterVSInfo
Source Line Number: 888
———————————————————-
Failed to detect VS info due to datastore exception.
Source File Name: datastoreclustergroupsproperties.cpp
Compiler Timestamp: Mon Nov 17 17:05:55 2008
Function Name: ClusterGroupScope.SharedDisks
Source Line Number: 56
———————————————————-
Failed to find a cluster group that owned shared disk:Q:
WinException : 2
Error Code: 0x80070002 (2)
Windows Error Text: The system cannot find the file specified.
———————————————————————


Now I went ahead and changed the registry key value to new drive name in all cluster nodes and restarted the setup. It worked like a champ and I continued with my work. I am posting here it to help others who stuck with same problem. This may not be the cause always but I am just outlining the procedure for troubleshooting.

Happy learning…,
Sitaram Pamarthi

{ 3 comments }

Eject CD drive in windows using powershell

I have seen some page hits to my blog where people are searching for “power shell code for ejecting CD drive” and landing at my post which describes the procedure using VBscript. So, posting the powershell equivalent code here for such peoples reference.

$items = (New-Object -com "WMPlayer.OCX.7").cdromcollection.item(0)            
$items.eject()            

The above code ejects a CD drive. If you have want to close the CD drive repeat the second statement again. If you have multiple CD drives, you need to play with array object in second line to eject/close a specific CD drive.

Happy Learning..,
Sitaram Pamarthi

{ 2 comments }

Download RSAT for Windows 7

I couldn’t find any MS link directly in Google search when I searched for it. I found link in few blogs/forums but that never worked. Fortunately, I got a working link from one of the blog and posting it help visitors of my blog.

http://www.microsoft.com/downloads/details.aspx?FamilyID=7d2f6ad7-656b-4313-a005-4e344e43997d&displaylang=en#filelist

Happy Learning..,
Sitaram Pamarthi.

tags: RSAT for windows7, Windows7 RSAT

{ 0 comments }

How to eject and close CD Drive using VBscript

After reading labnol post, I felt why only Unix and why not windows. I did some search over internet and finally could able to tailer this script.

It works fine if you have only one CD-Drive. If you have multiple CD drives, then explore the options of the Object I am using in this script.

Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set ArrCDROM = oWMP.cdromCollection
while (1)
wscript.sleep 3000
ArrCDROM.Item(0).Eject
wscript.sleep 3000
ArrCDROM.Item(0).Eject
wend

Write in comments section if you need any more clarity.

Happy learning..,
Sitaram Pamarthi

Tags: Vbscript for ejecting CD-Drive, CD-Drive eject command, eject CD drive from command prompt.

{ 1 comment }

WMI is a wonderful tool for remote administration!!!

Today in this post, I will demonstrate on how to query and terminate processes in remote machine using wmi command line utility (wmic). Ofcourse, you need have administrator rights on remote machine to run these command(may be a domain admin account is a right choice here).

In all these below examples, “myremote” is my remote machine name against which I am performing these operations.

To query all processes in remote machine use below command..

wmic /node:myremote process

To query a specific process(outlook.exe) in remote machine…

wmic /node:myremote process where name="outlook.exe"

If you are not sure of exact process name but know only few letters of it, then use this…

wmic /node:myremote process where "name like '%outlo%'" get name

To terminate(kill) a process…

wmic /node:myremote process where name="outlook.exe"  call terminate

To query the owner of a process…

wmic /node:myremote process where name="outlook.exe"  call getowner

Enough for today.. 🙂 I will post more command lines when I get some time…

If you want a command for any specific requirement, please leave a note below in comments section. I will get back to you ASAP.

Happy Learning..,
Sitaram Pamarthi

{ 1 comment }

Use below command if you want to get the CPU utilization of remote machine from command prompt. It’s very useful if you don’t want to spend time in logging on to the server to verify the stats. Needless to say, replace RemoteMachine with your remote machine name in below command.

typeperf “\RemoteMachineprocessor(_Total)% Processor Time”

Refer to my old article to know more about typeperf

Happy Learning…,
Sitaram Pamarthi

{ 9 comments }

Read-only USB drives

Do you want to make your USB drive as read-only? That means you want to disable write operations to USB?. There is a way to do this if your desktop has windows XP with SP2.

Procedure:
Open regedit and navigate to HKEY_LOCAL_MACHINESystemCurrentControlSetControlStorageDevicePolicies registry key, and change the value of WriteProtect setting to 1 from 0

If you don’t find this registry key in your machine, copy the below code into a text file and save as DisableUSB.reg and execute it with admin rights.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlStorageDevicePolicies]
"WriteProtect"=dword:00000001

The above code does nothing but creating the required registry keys if they are not already present. You can disable write protection on USB device by setting the value back to ‘0‘. You will get a pop-up like below if you are trying to copy data to a write protected USB drive.

Refer to http://technet.microsoft.com/en-us/library/bb457157.aspx#EAAA for more information

Happy Learning,
Sitaram Pamarthi

Comments and Questions are welcome……!!!

{ 0 comments }

Unable to copy files more than 4GB to USB drive

This is a general problem one will face when they use external USB storage. Most of the USB mass storage vendors, packs their disks with FAT32 formatting (not sure why). This limits us from copying a file which is more than 4GB. It’s a limitation with FAT32 partition. Another thing I noticed is, we cannot copy more than 100GB into a FAT32 formatted USB drive though the drive capacity is more than 100GB.

So, if your USB storage disk of any size more than 100GB, I prefer formatting it with NTFS before you really use it. If you already have some data in it, and cannot really copy it to somewhere for formatting, you can give a try with “covert” command which coverts your USB drive to NTFS from FAT32 without losing data. Try at your own risk, I cannot guarantee. Chose this utility if you really don’t care or don’t have a place to back up your data

Happy Learning,
Sitaram Pamarthi

{ 1 comment }