Tuesday, 2 September 2008

Caseware Working Papers 2008 - Data Store Error 0x80070035

Most of our accounting firm clients have updated to the newest version of Caseware Working Papers 2008.

Today, we were setting up the remote data/printer sharing package we put together for them and did some last minute checks.

A strange error came out of Caseware which was the critical application for their two or three week stint at their client.

This is what we saw:


Working Papers

Working Papers cannot run because the Data Store is not functioning correctly. Please contact technical support.

Information balloon: Data Store: There was an error creating the Data Store (0x80070035).
All three laptops had the same error when trying to start Caseware 2008. The error happened both before and after hooking them up to the data sharing network.

Since we did not have the install files with us, we needed to talk to Caseware support.

They emailed us the following:
@echo off

rem
rem Constants:

rem
rem Local variables:

set showhelp=n
set deltypelib=n
set batchdir=%~sdp0
set buildname=
set buildversion=
set builddir=
set regdir=

rem
rem Determine the actions to take based on the parameters specified.

:getparam

set curparam=%~1

if /i "%curparam%"=="/?" (
set showhelp=y
)

if /i "%curparam%"=="/deltypelib" (
set deltypelib=y
)

if /i "%curparam%"=="/v" (
set buildversion=%~2
shift
)

if /i "%curparam%"=="/d" (
set builddir=%~sf2
shift
)

shift
if not "%curparam%"=="" (goto getparam)

rem
rem See if we need to display the help.
if "%showhelp%"=="y" goto showhelp

rem
rem Determine the directory we will try to registry the dlls and exes in.

if "%builddir%"=="" (
set regdir=%batchdir%
) else (
set regdir=%builddir%\
)

rem Determine which application we are trying to register.
if exist %regdir%pa.exe (
set buildname=Time
set dlls=cwatl2 cwpproto cwp42 cvp32 foxstore
set exes=cwcs
) else (
if exist %regdir%cwin32.exe (
set buildname=Working Papers
set dlls=cwatl cwascii cwproto cw42 cwdocman foxstore cv32
set exes=cwcs
) else (
echo.
echo Could not determine which application to register in
echo %regdir%
goto fail
)
)

rem
rem Ensure that all cwcs processes are terminated before registering.
echo.
echo Terminating all running cwcs processes:
for /F "skip=3 tokens=1,2*" %%a in ('tasklist') do (
if /i "%%a"=="cwcs.exe" (
echo terminating %%a (%%b^),
taskkill /PID %%b /T /F
)
)
echo.
echo done.

rem
rem Delete the Central Data Store's registry key.
if "%deltypelib%"=="y" (
echo.
echo Deleting the Central Data Store's typelib registry key.
reg delete "HKCR\TypeLib\{D90A9BF8-9429-4124-996C-937EC05C9116}" /f
)

echo.
echo Registering %buildname% components in
echo %regdir%

for %%n in (%dlls%) do (
if not exist %regdir%%%n.dll (echo %%n.dll does not exist.) else (
echo %%n.dll,
regsvr32 /s "%regdir%%%n.dll"
)
)
for %%n in (%exes%) do (
if not exist %regdir%%%n.exe (echo %%n.exe does not exist.) else (
echo %%n.exe,
%regdir%%%n.exe /regserver
)
)

echo.
echo done.

rem
rem Set the Install Dir registry key to the application path. NOTE: The reg add /d parameter needs the backslash
rem before the closing double quote because otherwise the trailing backslash of the regdir combines with the closing
rem double quote to tell reg add to escape the double quote (so the registry key would be saved as d:\combined\run"
rem for example).
echo.
if not "%buildversion%"=="" (
echo Setting "Install Dir" for %buildname%\%buildversion% registry key to
echo %regdir%
reg add "HKLM\Software\CaseWare International\%buildname%\%buildversion%\Directories" /f /v "Install Dir" /d "%regdir%\"
) else (
echo Skipping setting "Install Dir" registry key.
)

:success
echo.
echo Registration successful.
pause
goto end

:fail
echo.
echo Registration failed.
pause
goto end

:showhelp
echo.
echo Registers the Working Papers or Time components.
echo.
echo REGSVRALL [/d path] [/v version] [/deltypelib]
echo.
echo path An absolute or relative path to a directory where either
echo Working Papers' or Time's components exist. If this parameter
echo is not supplied the current directory is assumed.
echo.
echo version The full string value of the version being registered. Used
echo for setting the Install Dir registry key. If empty the
echo registry is not modified.
echo.
echo /deltypelib Use this option to force the Central Data Store's typelib
echo registry key to be deleted.
echo.
echo.

:end

Please copy and paste the above text into a batch file called Regsvrall.bat.

Copy that batch file into the C:\Program Files\Caseware folder. You can then run the batch file via Windows Explorer and a double click or via the command line.

It is our preference to run the batch file via the command line to verify that it does what it is supposed to without a window flash then its done.

It is a good thing that we ran the batch file from the command line because one of the laptops had a DLL registration failure. That presented a bit of a pickle since we did not have the install files.

So, we copied the contents of the Caseware folder off of one of the known good laptops onto the NAS then over top of the Caseware folder on the laptop that was hiccupping. Answering Yes to All, we made sure that all of the files were copied before proceeding to the next step.

We reran the batch file in the affected laptop's Caseware folder, and this time we saw the DLL with the previous error successfully registered.

Caseware 2008 ran fine after that on all three.

Philip Elder
MPECS Inc.
Microsoft Small Business Specialists

*All Mac on SBS posts are posted on our in-house iMac via the Safari Web browser.

3 comments:

  1. I ran the batch file but get the following error:

    cwcs.exe - Application Error
    the instruction at "0x781450d8 reference memory at "0x001db000". The memory could not be "written"

    ReplyDelete
  2. That is a bit of a pickle ...

    We did run into one or two hiccups that required us to reinstall Caseware 2008 altogether.

    Unfortunately, that is where you would be at now. We were fortunate in that the ones that hiccuped did so in the office so access to the install share was available.

    Thanks for the comment,

    Philip

    ReplyDelete
  3. Thank you so much for your advice. I had the same problem but created the .bat file and it worked.

    ReplyDelete

NOTE: All comments are moderated.