I have this batch file which runs correctly on test computer. However on the computer for my client I get this error: ERROR: Description = The executable program that this service is configured to run in does not implement the service. Press any key to continue . . .
The computer it runs correctly on is Windows 7 Pro 64-bit. The computer that is giving me trouble is Windows 7 Pro 32-bit.
Some information from the client’s computer: *Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Northside>path PATH=C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Common Files\Intuit\QBPOSSDKRuntime
C:\Users\Northside>*
This is my batch file that runs without errors on 64-bit Windows 7 Pro but not on 32-bit Windows 7 Pro.
Any help to get this working or to use a Powershell command for the "for /F "skip=2 tokens=2 delims=," %%p in ('wmic logicaldisk where drivetype^=2 get deviceid^,volumename /format:csv') do (if EXIST "%%p\smart04.mdb" (" for this line will be greatly appreciated.
@echo off
rem This batch file is for use with the USb Thumb Drives
rem Save this file as "Upload Frayser.bat"
rem modified for Windows 7 on April 18, 2023
Echo Upload Frayser
echo.
for /F "skip=2 tokens=2 delims=," %%p in ('wmic logicaldisk where drivetype^=2 get deviceid^,volumename /format:csv') do (if EXIST "%%p\smart04.mdb" (
@echo Copying database file
COPY %%pSMART02.MDB n:\SMART\DATA\FRAYSER\SMART1.MDB
@echo Copying automat.in file
copy %%pautomat.in m:\
@echo off
@echo.
rem echo OK to remove USB Stick!
rem powershell write-host -fore Cyan Please eject drive before removing.
start C:\"Program Files"\USB_Disk_Eject.exe /REMOVELETTER %%p
powershell write-host -fore Cyan OK to remove USB Stick!
@echo.
rem pause> nul | set /p "=Click on the X at the top right corner to close after you have removed the USB drive. "
@echo Click on the X at the top right corner to close
pause> nul | set /p "= after you have removed the USB stick."
exit /b
)
powershell write-host -fore Cyan Cannot find frayser database file. Sorry, no files were copied!
rem echo Cannot find database file. Sorry, no files were copied!
start C:\"Program Files"\USB_Disk_Eject.exe /REMOVELETTER %%p
@echo.
powershell write-host -fore Cyan OK to remove USB Stick!
@echo.
rem pause> nul | set /p "=Click on the X at the top right corner to close after you have removed the USB stick. "
@echo Click on the X at the top right corner to close
pause> nul | set /p "= after you have removed the USB stick."
exit /b
)
pause
Expecting the "for /F "skip=2 tokens=2 delims=," %%p in ('wmic logicaldisk " line to run with giving the "The executable program that this service is configured to run in does not implement the service." error.