Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

automate running JETCOMP.exe utility to compact an Access db

75 views
Skip to first unread message

JRough

unread,
May 20, 2009, 9:24:23 AM5/20/09
to
I want to automate
running JETCOMP.exe utility to compact an Access database with
vbscript using the .run command however I first need to get the
utility to run before I can automate it. I don't know if I should run
it with CMD /C or without
at the DOS prompt because neither seems to work. I verified the
paths.


CMD /C "c:\Program Files\Microsoft Office\JETCOMP.exe" /s "c:\SwimClub
\acsc_be"

I get the error message 'c\Program' is not recognized as an internal
or external command, operable program or batch file"

If I run it without the CMD /c for example "c:\Program Files\Microsoft
Office\JETCOMP.exe" /s "c:\SwimClub\acsc_be" then I don't get any
messages at all. All I get is the DOS prompt back alone for example
like this:
C:\Documents and Settings\janis>

So I just need to see if one of these commands will work and compact
the database then I can put it either in a batch file or a vbscript
file whichever is easier since I don't know how to do either one but I
think I prefer the vbscript one since I can put the vbscript icon on
the users desktop and the user can run it from there.
thanks,
Janis

Bob Barrows

unread,
May 20, 2009, 10:00:39 AM5/20/09
to
JRough wrote:
> I want to automate
> running JETCOMP.exe utility to compact an Access database with
> vbscript using the .run command however I first need to get the
> utility to run before I can automate it. I don't know if I should run
> it with CMD /C or without
> at the DOS prompt because neither seems to work. I verified the
> paths.
>
>
> CMD /C "c:\Program Files\Microsoft Office\JETCOMP.exe" /s "c:\SwimClub
> \acsc_be"
>
> I get the error message 'c\Program' is not recognized as an internal
> or external command, operable program or batch file"
>
> If I run it without the CMD /c for example "c:\Program Files\Microsoft
> Office\JETCOMP.exe" /s "c:\SwimClub\acsc_be" then I don't get any
> messages at all. All I get is the DOS prompt back alone for example
> like this:
> C:\Documents and Settings\janis>

You need to remove the /s, which does not seem to be a valid
command-line switch for this utility.
See http://www.pcreview.co.uk/forums/thread-1072504.php

--
HTH,
Bob Barrows


Bob Barrows

unread,
May 20, 2009, 10:07:26 AM5/20/09
to
JRough wrote:
> I want to automate
> running JETCOMP.exe utility to compact an Access database with

Here is someone who says he got it working (see last message):
http://forums.devx.com/archive/index.php/t-51812.html

--
HTH,
Bob Barrows


Richard Mueller [MVP]

unread,
May 20, 2009, 10:30:43 AM5/20/09
to

"Bob Barrows" <reb0...@NOyahoo.SPAMcom> wrote in message
news:ey3SPRV2...@TK2MSFTNGP02.phx.gbl...

Assuming the command line in the link above works, you would run it in a
VBScript program as follows:
===========
Set objShell = CreateObject("Wscript.Shell")
strCmd = "%comspec% /c ""C:\Downloads\JETComp\JETCOMP.exe"" " _
& """-src:C:\Jetcomp\Bad.Mdb"" ""-dest:C:\Jetcomp\Good.Mdb"""
Wscript.Echo strCmd
objShell.Run strCmd
========
The Wscript.Echo command is to verify that the command looks correct. Note
that quote characters imbedded in the string must be doubled. When the
command is echoed to the command console, it should look exactly like the
command you would enter yourself manually. For testing, comment out the
objShell.Run command. After verifying the command, uncomment the
objShell.Run and comment out (or remove) the Wscript.Echo command.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


0 new messages