I'm trying to compact a MS-Access database using JetComp.exe using a powershell script.
Here is the operative lines:
# 4. Run JetComp
LogWrite("Begin: Running JetComp")
.\JETCOMP.EXE -src: $srcDB -dest: $dstDB | Out-Null #Run this command and wait for it to finish...
IfErrorExit("Error Compacting Database")
LogWrite("End: Running JetComp")
The JETCOMP.EXE program seems to complete long before it is actually finished and the $dstDB ends up being smaller than the compact should even make it. Initially ($srcDB) it's about 1.8 GB and by the time the command finishes it's about 300,000 kb (about 0.29 gb) that's a pretty long way off from 1.8 gb which when compacted manually ends up being about 1.6 gb.
Is there some sort of timeout I don't know about in powershell scripts?
P.S. I know that when running JETCOMP.EXE manually, that the system often detects it as "not responding" even though it's actually getting the job done, and waiting long enough will allow it to complete.