Copy MS Access shortcut to desktop with a batch file

  • Thread starter Thread starter Lee
  • Start date Start date
L

Lee

Hi,

I have a batch file that copies files from our server onto all users
computers, these files are the front end for an access database and
it's related files. The problem I have is I also want the batch file to
copy the shortcut for the database onto the users desktop.

The shortcut has the following target:
"C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE"
"N:\ResXP\ResXP.mde" /wrkgrp "M:\Res\RES.mdw"

Any help with this is greatly appreciated. Thanx in advance.

Lee
 
Lee said:
Hi,

I have a batch file that copies files from our server onto all users
computers, these files are the front end for an access database and
it's related files. The problem I have is I also want the batch file to
copy the shortcut for the database onto the users desktop.

The shortcut has the following target:
"C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE"
"N:\ResXP\ResXP.mde" /wrkgrp "M:\Res\RES.mdw"

Any help with this is greatly appreciated. Thanx in advance.

Lee

Create one such shortcut (it will be a .lnk file), then get the
batch file to copy it to the users' desktops.
 
Thanx for your speedy response. Please can you give me the correct
syntax for doing so.

Lee
 
Syntax for what? The copy command? Type

copy /?

at the Command Prompt to see the various options.
 
To copy to the desktop.

I have tried the following previously, but it does not work - none of
the users have admin rights:
copy N:\ResXP\Res C:\Documents and Settings\All Users\Desktop
 
The command

copy N:\ResXP\Res C:\Documents and Settings\All Users\Desktop

won't work - the copy command thinks that "C:\Documents"
is he destination, and it gets confused by the rest. Add double
quotes to make your intentions clear:

copy N:\ResXP\Res "C:\Documents and Settings\All Users\Desktop"

If you want the users' logon scripts to perform the copy command
then you must give them write-access to the "All Users\Desktop" folder.

It would also be a good idea to add the /y switch to prevent the
command from asking irritating questions.
 
Hi,

In the batch file I did have the quotes round the text (I had typed the
line in my post and missed them out for some weird reason - must be
having one of those days). But, thanks to your post I have realised
where I was going wrong. I had forgotton that the users will not be
able to access the "All Users" directory, so I have now amended the
line in my batch file to:

copy N:\ResXP\Res "C:\Documents and Settings\%username%\Desktop"

This works a treat. Many thanks.

Lee
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top