You Choose What to Pay

How much do you think the help you received is worth? Click below to pay what ever you think is fair. 

 

Contact Tim

Use the module below to place a free call to Tim directly:

(Standard carrier rates apply)
Q/A Archive
« I can't access certain websites! | Main | PLEASE ADVISE, MOST APPRECIATIVE »
Thursday
Mar112010

Backup software doesn't show my hard drive to back up to

(This question was originally posed to a co-worker who asked me to write the script for it. I am posting it here so others can find the solution as well.)
Question:

My backup software is not showing my hard drive as a valid source or destination for backups. I can see them in "My Computer" but my doesn't see them. What gives? 

Answer: 

Hey there, Anon.
It sounds like your LDM (Logical Disk Manager) is not reporting to your backup software. You may need to reinstall Windows Management Instrumentation (WMI). This process is not as simple as it may seem, however, so we've provided a modified batch script which you can run, in order to perform the re-installation for you.
(See below)

Click "show" to view the script, or scroll down to download it:

@echo off


echo.




echo This tool will rebuild the Windows Management Instrumentation installation. 
echo Please close any programs that aren't currently in use. 
echo.
pause
if exist c:\wmilog.txt del c:\wmilog.txt
echo.
echo Backing up registry...
echo.


regedit.exe /e c:\registry_backup.reg & echo Registry backed up to c:\registry_backup.reg
echo.
echo Stopping Windows Management Console
echo.


net stop winmgmt /yes >> c:\wmilog.txt


cd \
cd %systemroot%\system32\wbem


if exist "repository.old" echo Deleting old 'repository.old' directory... & rmdir "repository.old" /s /q


if exist "repository" echo Renaming directory: 'Repository', in '\system32\wbem' to 'repository.old'. & rename "repository" "repository.old"
echo.


echo Registering scecli.dll and userenv.dll
echo. 


regsvr32 /s %systemroot%\system32\scecli.dll
regsvr32 /s %systemroot%\system32\userenv.dll


echo Managed Object Format (MOF) compiler now re-installing WMI components.
echo This may take several minutes. Please do not close this window. Errors will be logged to c:\wmilog.txt.
echo.
pause
echo.


mofcomp cimwin32.mof >> c:\wmilog.txt
mofcomp cimwin32.mfl >> c:\wmilog.txt
mofcomp rsop.mof >> c:\wmilog.txt
mofcomp rsop.mfl >> c:\wmilog.txt


echo Registering additional DLLs.
echo This may take several minutes...
echo.


for /f %%s in ('dir /b /s *.dll') do regsvr32 /s %%s >> c:\wmilog.txt


echo Compiling and processing additional MOF entries.
echo This might also take several minutes...
echo.


for /f %%s in ('dir /b *.mof') do mofcomp %%s >> c:\wmilog.txt
for /f %%s in ('dir /b *.mfl') do mofcomp %%s >> c:\wmilog.txt


echo ~DONE!~
echo.
echo The computer will automatically restart 10 seconds after you continue. 
pause
shutdown -r -c "Restarting in 10 seconds to complete WMI reinstall." -t 10
reg.exe add HKLM\software\microsoft\windows\currentversion\runonce\ /t REG_SZ /v "wmilog" /d "c:\wmilog.txt"
pause  


To save and run this file:
Open NOTEPAD (start->programs->accessories)
Copy the ENTIRE script into Notepad, starting with "@echo off" and ending with "pause".
Go to "File->Save As..."
Save the file to your desktop. Name it "wmiscript.cmd", and in the drop-down below the name, select "All files".
Close the Notepad window and all other programs, and double-click on the .CMD file.
(If a notepad window opens up when you double-click it, make sure the extension is ".cmd", NOT ".txt".)

 

Follow the instructions on your screen, and accept any prompts or requests it throws at you. Once it's finished, it will warn you about an impending restart, and have you press any key to continue. Once you do so, it will wait ten seconds, and then restart the system. When it boots back up, your problem should hopefully be solved!

If not, a temporary work-around would be to create a directory in the drive you want to back up to, then share that drive over your local network with the permissions restricted so that only you have access. Once you've set that up, just open "my computer" (or "computer") and go to Tools-> Map network drive. Then, select your workgroup, and computer name (both of which you can find by right-clicking 'my computer' and clicking on properties, then going to the computer name tab) - then select the folder you shared out. That should bypass the logical disk management service entirely.

EDIT: If you're using Vista, or 7; make sure you run the file as Administrator. 

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>