Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Sep 2002
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Launch access from shortcut in win2000 and xp (2002-sp2)

    I have a shortcut on my desktop which runs an Access db, and ties in the security.
    The 'Target' box is this :-

    "C:Program FilesMicrosoft Office <font color=blue>Office10</font color=blue> MSACCESS.EXE" "C:Program FilesDL.mdb" /wrkgrp "Socument Librarysystem.mdw" /user /pwd

    now, one of things i have created is a batch file, to run every time the pc runs, to copy over the most recent version from the server, to the local machine.
    The problem comes when the machine is upgraded to windows xp. because the the link is no longer valid, the bit highlighted on an xp machine is now Office11

    My first idea, was to make 2 different shortcuts and then test for the directory in the batch file, and copy over the appropriate shortcut.... BUT,
    on a win2000 machine, when you change the target on a shortcut, as above, it won't let you do it, because the path isn't valid.

    So, i need a way to launch Msaccess.exe, from a shortcut on either a win2000 machine, or a winxp machine.

    the only thing i can think of, is to copy the whole msaccess.exe program to another folder in the batch file. but that seems a bit drastic, and im not sure what other effects it may have.

    Here is the batch file as is:-

    <font color=red>copy "Socument LibraryDOCDL.mdb" "C:Program FilesDL.mdb"

    IF EXIST C:Program FilesMicrosoft OfficeOffice11 Goto winxp

    '----------------- win2000 version here ------------------------

    copy "Socument LibraryDOCDL.lnk" "Cocuments and Settings%Username%Desktop"

    goto endbit

    :winxp

    'copy "Socument LibraryDOCDL.lnk" "Cocuments and Settings%Username%Desktop" /Y /I /E /H



    :endbit

    exit</font color=red>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Launch access from shortcut in win2000 and xp (2002-sp2)

    I suspect that the difference is not caused by different Windows versions, but by different Office versions. The default installation folders are:

    Access 2000: C:Program FilesMicrosoft OfficeOffice
    Access 2002: C:Program FilesMicrosoft OfficeOffice10
    Access 2003: C:Program FilesMicrosoft OfficeOffice11

    You certainly shouldn't move or copy MSAccess.exe to another folder, that will cause no end of problems.

    What you should do is:
    - Create a shortcut for the Access 2000 version on a machine with Access 2000, then copy the shortcut to a network folder.
    - Create a shortcut (with a different name) for the Access 2002 version on a machine with Access 2002, then copy the shortcut to a network folder.
    - Create a shortcut (with a different name) for the Access 2003 version on a machine with Access 2003, then copy the shortcut to a network folder.
    - Use the technique used in your batch file to test which installation folder is present, and copy the appropriate shortcut to the user's desktop, renaming it to the standard name.

  3. #3
    3 Star Lounger
    Join Date
    Sep 2002
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Launch access from shortcut in win2000 and xp (2002-sp2)

    Ahhh so obvious....


    Thanks Hans.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •