[AccessD] this should be an easy one -- on Windows shortcuts

MartyConnelly martyconnelly at shaw.ca
Tue Aug 19 00:37:01 CDT 2003


Try this method it works for me by  double clicking on the batch file 
from explorer.
Should work from shortcut by calling trycompress.bat.

Create two batch files in notepad. The first runs the second, since the 
second batch file has executed in a separate task, the first batch file 
can move to the exit  command and close the cmd window, leaving the 
access window open from the execution of the second batch. If you don't 
like the flickering windows there is a minimize check box on the short 
cut along with the echo command.

 trycompress.bat
----------------------------------------------
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE"  "C:\xml\RSS 
xml.mdb" /compact
call  "C:\xml\tryaccess.bat"
Exit

--------------------------------------------
tryaccess.bat

start "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" 
"C:\xml\RSS xml.mdb"



Jim Lawrence (AccessD) wrote:

>Hi Susan:
>
>You can change the some of the lines in the statement and then you will have
>a text file to view progress results. Like this:
>
>  
>
>>@Echo Off
>>"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE"  "C:\xml\Access
>>XML tests\RSS xml.mdb" /compact > c:\temp.txt
>>"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\xml\Access
>>XML tests\RSS xml.mdb" >> c:\temp.txt
>>@cls
>>    
>>
>
>When the batch file runs the results will be placed in a text file called
>'temp.txt', at the root of your 'c' drive. This you can view in your note
>pad.
>
>HTH
>Jim
>
>-----Original Message-----
>From: accessd-bounces at databaseadvisors.com
>[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Susan Harkins
>Sent: Monday, August 18, 2003 4:46 PM
>To: Access Developers discussion and problem solving
>Subject: Re: [AccessD] this should be an easy one -- on Windows
>shortcuts
>
>
>Thanks Marty, but it just flashes and that's it -- can't tell a thing. I did
>delete the @Echo Off statement too.
>
>Shold the statement I used work as I expected, with Access remaining open?
>Right now, the compact does take place, but Access shuts down when it's
>done. Is there a switch for "remain open?"
>
>Susan H.
>
>
>  
>
>>You could put this code below in a notepad file call it try.bat and
>>execute the batch file from the shortcut.
>>You can remove the echo command to see what is happening
>>However this has the annoying habit of leaving the cmd window open or
>>minimized in the systray
>>until you exit Access.
>>
>>@Echo Off
>>"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE"  "C:\xml\Access
>>XML tests\RSS xml.mdb" /compact
>>"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\xml\Access
>>XML tests\RSS xml.mdb"
>>@cls
>>
>>Susan Harkins wrote:
>>
>>    
>>
>>>"C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE" C:\a\topics.mdb
>>>/compact
>>>
>>>I tried the above as a shortcut's Target property to open a database and
>>>compact and repair it -- problem is, the database doesn't stay open. I
>>>      
>>>
>want
>  
>
>>>it to stay open.
>>>
>>>Susan H.
>>>
>>>_______________________________________________
>>>AccessD mailing list
>>>AccessD at databaseadvisors.com
>>>http://databaseadvisors.com/mailman/listinfo/accessd
>>>Website: http://www.databaseadvisors.com
>>>
>>>
>>>
>>>      
>>>
>>_______________________________________________
>>AccessD mailing list
>>AccessD at databaseadvisors.com
>>http://databaseadvisors.com/mailman/listinfo/accessd
>>Website: http://www.databaseadvisors.com
>>
>>
>>    
>>
>
>
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com
>
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com
>
>  
>




More information about the AccessD mailing list