![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | automate running JETCOMP.exe utility to compact an Access db 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 |
My System Specs![]() |
| | #2 (permalink) |
| | Re: automate running JETCOMP.exe utility to compact an Access db JRough wrote: Quote: > 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> command-line switch for this utility. See http://www.pcreview.co.uk/forums/thread-1072504.php -- HTH, Bob Barrows |
My System Specs![]() |
| | #3 (permalink) |
| | Re: automate running JETCOMP.exe utility to compact an Access db JRough wrote: Quote: > I want to automate > running JETCOMP.exe utility to compact an Access database with http://forums.devx.com/archive/index.php/t-51812.html -- HTH, Bob Barrows |
My System Specs![]() |
| | #4 (permalink) |
| | Re: automate running JETCOMP.exe utility to compact an Access db "Bob Barrows" <reb01501@xxxxxx> wrote in message news:ey3SPRV2JHA.1644@xxxxxx Quote: > JRough wrote: Quote: >> 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 > > 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 -- |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| JETCOMP.exe utility switch to path to database to compact | VB Script | |||
| vb script to compact Access database, how to add login & pw | VB Script | |||
| Type mismatch:'alert' vbscript to compact access db | VB Script | |||
| WMUtil -- New Free utility to compact and repair the Windows Mail database in Windows Vista | Vista mail | |||