Saturday 29 September 2012

The SQL Server System Configuration Checker cannot be executed due to WMI configuration on the machine Error:2147749896 (0×80041008).

A couple of days back I  had my computer formatted. I reinstalled it with Vista SP1 32bit. Subsequent to installing other indispensable software  I tried to install SQL Server 2005 .  However, it instantly displayed the following error message.
The SQL Server System Configuration Checker cannot be executed due to WMI configuration on the machine Error:2147749896 (0×80041008).
It was a bit frustrating for me as it was pretty late and I ardently wanted to install SQL Server 2008 right after I was done  with installing SQL Server 2005. I pinged my friend James Locazicoski with the above error message. James came to my rescue with a batch file. I immediately ran the batch file on my server;  it took a while and when it was done it closed itself on vista. I kept my fingers crossed and ran my SQL Server installer right after that.   There was no WMI error to wreck my nerve. I was able to successfully install SQL Server right after that.
Well, this bat file is certainly a life savior. While searching online I found this script at several places, which reflects its popularity and usability. I need help from my readers regarding the following information


1) Where is the original source of this script?
2) What is this script actually doing?
Once I receive response to both the above questions, I will post the answers  on my blog with due credit to my readers.

    @echo on
    cd /d c:\temp
    if not exist %windir%\system32\wbem goto TryInstall
    cd /d %windir%\system32\wbem
    net stop winmgmt
    winmgmt /kill
    if exist Rep_bak rd Rep_bak /s /q
    rename Repository Rep_bak
    for %%i in (*.dll) do RegSvr32 -s %%i
    for %%i in (*.exe) do call :FixSrv %%i
    for %%i in (*.mof,*.mfl) do Mofcomp %%i
    net start winmgmt
    goto End

    :FixSrv
    if /I (%1) == (wbemcntl.exe) goto SkipSrv
    if /I (%1) == (wbemtest.exe) goto SkipSrv
    if /I (%1) == (mofcomp.exe) goto SkipSrv
    %1 /RegServer

    :SkipSrv
    goto End

    :TryInstall
    if not exist wmicore.exe goto End
    wmicore /s
    net start winmgmt
    :End


Vikram Bariya

Friday 25 May 2012

How to Display, Use, and Clear "My Recent Documents" on the Start Menu in Windows XP

  1. Right-click Start, and then click Properties. Or, if the Start menu is already displayed, right-click an empty area of the Start menu, and then click Properties.
  2. Click Customize.
  3. Click the Advanced tab.
  4. Under Recent documents, click to select the List my most recently opened documents check box, click OK, and then click OK. The next time you click Start, the My Recent Documents command is displayed on the Start menu.
Thank You...............
Vikram Bariya

Friday 6 April 2012

How to run Control Panel tools by typing a command

  Control panel tool             Command
   -----------------------------------------------------------------
   Accessibility Options          control access.cpl
   Add New Hardware               control sysdm.cpl add new hardware
   Add/Remove Programs            control appwiz.cpl
   Date/Time Properties           control timedate.cpl
   Display Properties             control desk.cpl
   FindFast                       control findfast.cpl
   Fonts Folder                   control fonts
   Internet Properties            control inetcpl.cpl
   Joystick Properties            control joy.cpl
   Keyboard Properties            control main.cpl keyboard
   Microsoft Exchange             control mlcfg32.cpl
      (or Windows Messaging)
   Microsoft Mail Post Office     control wgpocpl.cpl
   Modem Properties               control modem.cpl
   Mouse Properties               control main.cpl
   Multimedia Properties          control mmsys.cpl
   Network Properties             control netcpl.cpl
                                  NOTE: In Windows NT 4.0, Network
                                  properties is Ncpa.cpl, not Netcpl.cpl
   Password Properties            control password.cpl
   PC Card                        control main.cpl pc card (PCMCIA)
   Power Management (Windows 95)  control main.cpl power
   Power Management (Windows 98)  control powercfg.cpl
   Printers Folder                control printers
   Regional Settings              control intl.cpl
   Scanners and Cameras           control sticpl.cpl
   Sound Properties               control mmsys.cpl sounds
   System Properties              control sysdm.cpl 
 
 
NOTE: The Scanners and Cameras applet (sticpl.cpl) cannot be run 
in Windows Millennium. It has been replaced by the Scanners and Cameras 
Folder, which is similar in function to folders like Printers and 
Dial-up Networking.



Windows substitutes the name of the tool you want to run for %1%. For example:
"rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl".
To run the Users tool in Control Panel, type control Ncpa.cpl users, and then press ENTER.

To run the Users tool for Windows 95/98/Me, type "control inetcpl.cpl users" (without the quotation marks) and then press ENTER.
 

Monday 2 April 2012

Windows Tip: Shutdown Your Computer With The Command Prompt

How To:

Open the command prompt: Windows Key + R then type the command below and hit OK:
cmd
This will open the command prompt. Now we can play!
Note: You could type the shutdown command directly into the Run dialog. I don’t advise this. If there is a typo or error, you won’t know. There is no information given!

Shutdown Local Machine

This only takes a couple of keystrokes. Type the code below and hit OK:
shutdown -s
“shutdown” tells the computer what command we want to execute and the “-s” switch tells it what to do, which is to shutdown!

Specify Time

shutdown -s -t 60
Now we have added the “-t” switch and a variable, which in this case is “60″. This number is the number of seconds before the computer is shutdown. A dialog will open and display a count down timer!

Give Us Some Info!

shutdown -s -t 120 -c "You better finish, because I shut you down foo!"
The “-c” switch will allow you to give the user some information for the reason of the shutdown.

Shutdown A Remote Computer

shutdown -s -m \\desktop -t 45
I really like this one! The “-m” switch will allow you to shutdown a remote machine, in this case, a computer named “desktop”. For this to work, you must have administrative access to the computer! To see of you do, hit Windows Key + R then type the computer’s name, i.e.:
\\desktop
If you can connect to it, you will be asked to log into the machine with a user name and password. Once confirmed, a window will open displaying the directories available to you. Now you know you can shut it down remotely.

Cancel Shutdown

Let’s say that you need to cancel a shutdown in progress. Go to the computer in question, hit Windows Key + R then type command below:
shutdown -a
This will abort the shutdown, assuming there is a counter and it hasn’t reached zero yet!

What is using port XXX on my computer ?

1. Open a command prompt window. From Start / Run enter: cmd

2. From the command prompt enter : netstat -ano

How to print to a network printer from an MS-DOS-based program in Windows XP

Use the net.exe command to establish a persistent connection. To do this, use the following syntax at a command prompt
net use lptx \\printserver\sharename /persistent:yes
where x is the number of the printer port that you want to map, where printserver is the print server that is sharing the printer, and where sharename is the name of the printer share.

For example, to map LPT2 to a printer shared as Laser1 on a print server that is named Pserver, follow these steps:
  1. Click Start, and then click Run.
  2. In the Open box, type cmd, and then click OK.
  3. Type net use lpt2 \\pserver\laser1 /persistent:yes, and then press ENTER.
  4. To quit the command prompt, type exit, and then press ENTER.
Note In Windows XP, non-administrative users cannot map an LPT port to a network printer path when the LPT port exists on the computer as a physical parallel port.

Commands to delete virus

am using ms-dos commands in deleting any viruses. Please copy the code below in a text editor (notepad would be enough) and save it to anyname.bat
One of my MS_DOS Program Codes are coded below.
Note: Put the saved bat file in any drive or directory that you want to access. These batch of line of codes will display all the files inside the directory where it is present. And as it was made to do, it can delete any file or folder. For more information, Please never hesitate to e-mail me. Here is my e-mail address(Email Id removed for security). Your questions will be appreciated.
Operation:
1. Copy the below codes
2. Open notepad and paste it.
3. Save the file as Anyname with a ".bat" file extension
4. Copy the bat file in any drive you wish to access.
5. Execute the file by doubleclicking it.
6. The files of the directory will be displayed
7. Press the TAB key on your keyboard to Select the file that you want to delete.
CAUTION: Any file deleted that way will never go at the RECYCLE BIN, and will never be recovered.


@ECHO OFF
prompt $p$g
title algeeroidbiletdoux System FlashX
:Shredder
color 02
CLS
ECHO.
ECHO algeeroidbilletdoux System FlashX
ECHO DRIVE SHREDDER
ECHO.
dir /a/w
ECHO.
ECHO "PRESS THE TAB KEY IN YOUR KEYBOARD TO SELECT ON THE DIRECTORY"
ECHO.
SET /P M= SHREDD
IF NOT EXIST %M% GOTO :driveShredderERROR
attrib -s -h -r %M%
del /f /q %M%
IF NOT EXIST %M% GOTO :SHREDCOMP
RD /S %M%
:SHREDCOMP
COLOR 0A
echo MyBox = MsgBox("File/Folder has been Shredded. File/Folder deleted this way will never go at the recycle bin.", 6000, "algeeroidbilletdoux System FlashX") >driveshredder.vbs
start /w driveshredder.vbs
del /f /q driveshredder.vbs
GOTO :Shredder
:driveShredderERROR
COLOR 0A
echo MyBox = MsgBox("The File/Folder you type does not exist and match in the directory.", 6000, "algeeroidbilletdoux System FlashX") >folderatt.vbs
start /w folderatt.vbs
del /f /q folderatt.vbs
GOTO :Shredder