bsdaiwa

New Member
Joined
Feb 10, 2010
Messages
2
I found a video that was done by Microsoft that discussed and showed how to use command line instructions to upgrade to Windows 7 using Windows AIK. In the video the presenter created a batch file to automate the process. I followed the video carefully and believe that I created the correct instructions in the batch file but it keeps failing giving the following error message.
" There is no disk in the drive. Please insert a disk into drive \device\Harddisk1\DR1." It goes on to DR2, DR3 and DR4. Can anyone help me correct the problem, here is the batch file.

ECHO OFF
If exist C:\USMT\*.* xcopy C:\USMT\*.* /e /v /y C:\windows\USMT\
If exist D:\USMT\*.* xcopy D:\USMT\*.* /e /v /y C:\windows\USMT\
If exist E:\USMT\*.* xcopy E:\USMT\*.* /e /v /y C:\windows\USMT\
If exist F:\USMT\*.* xcopy F:\USMT\*.* /e /v /y C:\windows\USMT\
If exist G:\USMT\*.* xcopy G:\USMT\*.* /e /v /y C:\windows\USMT\
If exist H:\USMT\*.* xcopy H:\USMT\*.* /e /v /y C:\windows\USMT\
If exist I:\USMT\*.* xcopy I:\USMT\*.* /e /v /y C:\windows\USMT\
If exist J:\USMT\*.* xcopy J:\USMT\*.* /e /v /y C:\windows\USMT\
If exist K:\USMT\*.* xcopy K:\USMT\*.* /e /v /y C:\windows\USMT\

If exist C:\windows\System32\DriverStore\FileRepository\acpi.inf_x86_neutral_3289cf5d0b47d372\acpi.inf Cd c:\windows\usmt\x86
If exist C:\windows\System32\DriverStore\FileRepository\acpi.inf_x86_neutral_3289cf5d0b47d372\acpi.inf scanstate.exe c:\store /v:13 /o /c/ /hardlink /nocompress /efs:hardlink /i:MigApp.xml /i:MigDocs.xml /offlinewinDir:c:\windows.old\windows /l:%windir%\usmt\scanstate.log /progress:%windir%\usmt\progress_scanstate.log
If exist C:\windows\System32\DriverStore\FileRepository\acpi.inf_x86_neutral_3289cf5d0b47d372\acpi.inf loadstate.exe c:\store /c /lac /hardlink /nocompress
If exist C:\windows\System32\DriverStore\FileRepository\acpi.inf_x86_neutral_3289cf5d0b47d372\acpi.inf :EOF

If not exist C:\windows\System32\DriverStore\FileRepository\acpi.inf_x86_neutral_3289cf5d0b47d372\acpi.inf Cd c:\windows\usmt\x86
If not exist C:\windows\System32\DriverStore\FileRepository\acpi.inf_x86_neutral_3289cf5d0b47d372\acpi.inf scanstate.exe c:\store /v:13 /o /c/ /hardlink /nocompress /efs:hardlink /i:MigApp.xml /i:MigDocs.xml /offlinewinDir:c:\windows.old\windows /l:%windir%\usmt\scanstate.log /progress:%windir%\usmt\progress_scanstate.log
If not exist C:\windows\System32\DriverStore\FileRepository\acpi.inf_x86_neutral_3289cf5d0b47d372\acpi.inf loadstate.exe c:\store /c /lac /hardlink /nocompress
If not exist C:\windows\System32\DriverStore\FileRepository\acpi.inf_x86_neutral_3289cf5d0b47d372\acpi.inf

Thanks.
 

The error message you are encountering, "There is no disk in the drive. Please insert a disk into drive \device\Harddisk1\DR1," typically indicates that Windows is trying to access a storage device that either doesn't exist or has failed. This can occur if the system is attempting to access a non-existent network drive, removable drive, or even a virtual drive that was previously mounted. In your batch file, each line begins with an "If exist" check to copy files from specific locations to C:\windows\USMT\. The issue might be related to the checks for drive existence or the subsequent commands being run. Let's break down the potential issues in your batch file and suggest some corrections:
  1. Drive Letter Existence Check: The "If exist" command in batch scripts typically checks if a file exists, not a drive itself. It might be causing unexpected behavior in your script.
  2. Path Handling: Ensure that the paths are correct and that the directories exist before running the copy commands.
  3. Syntax Errors: There are some syntax errors in your batch file. For instance, the Cd command should be cd for changing directories.
  4. Redundant Check: The If exist and If not exist checks following each other might be redundant and can be simplified. Here is a revised version of your batch file with corrections:
    Code:
    @echo off rem Copy USMT files from specified drives to C:\windows\USMT\ for %%i in (C D E F G H I J K) do ( if exist %%i:\USMT\*.* xcopy %%i:\USMT\*.* /e /v /y C:\windows\USMT\) rem Change directory and run scanstate.exe and loadstate.exe if the acpi.inf file exists if exist C:\windows\System32\DriverStore\FileRepository\acpi.inf_x86_neutral_3289cf5d0b47d372\acpi.inf ( cd /d c:\windows\usmt\x86 scanstate.exe c:\store /v:13 /o /c/ /hardlink /nocompress /efs:hardlink /i:MigApp.xml /i:MigDocs.xml /offlinewinDir:c:\windows.old\windows /l:%windir%\usmt\scanstate.log /progress:%windir%\usmt\progress_scanstate.log loadstate.exe c:\store /c /lac /hardlink /nocompress) else ( rem Actions when acpi.inf file doesn't exist) rem Any additional commands can be added as needed pause
    Please replace the placeholder actions inside the else clause in case the acpi.inf file doesn't exist with appropriate actions or leave it as it is. I recommend testing this revised batch file to see if it resolves the issue you were facing. Let me know if you encounter any further problems or need additional assistance!
 

Back
Top