Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to map short cuts?

Posted on 2004-09-20
9
495 Views
Last Modified: 2010-04-10
I have an old FOX PRO progam that we use often.  How we have been using it was to give users access to the folder where the program is and to copy the short cut onto the users desk top.

Is there a way to auto map a short cut like you do when you map drives in logon.bat file?
0
Comment
Question by:mrchaos101
9 Comments
 
LVL 8

Expert Comment

by:Marakush
ID: 12104023
mrchaos101,

Yes you can put this in a batch file and use it to map a drive.


Use the Net Use command to map or disconnect a drive
You can use the net use command for batch files and scripts. To use the net use command to map or disconnect a drive:

    * To map a network drive:
         1. Click Start, and then click Run.
         2. In the Open box, type cmd.
         3. Type net use x: \\computer name\share name, where x: is the drive letter you want to assign to the shared resource.
    * To disconnect a mapped drive:
         1. Click Start, and then click Run.
         2. In the Open box, type cmd.
         3. Type net use x: /delete, where x: is the drive letter of the shared resource.

Source:

http://support.microsoft.com/default.aspx?scid=kb;en-us;308582&sd=tech

Marakush
0
 
LVL 1

Author Comment

by:mrchaos101
ID: 12104107
I have drive mapping down.

Im using windows server 2003 on the server.

What I want  is  on \\server\shared\something.exe

On boot up I want the clinet to place a short cut to that exe file on their c:\documens and settings\user\desktop

So that when they click that short cut on thier desk top it runs that exe file on the server.
0
 
LVL 1

Expert Comment

by:BungeIT
ID: 12104638
This would probably be your simplest solution.  

Make a shortcut in the \\server\share folder to the Foxpro application.  If you name the shortcut "foxpro", windows will add a hidden ".lnk" extension to it, so you can add it as a line in a login script.

Add this line to your login script:

copy \\server\share\foxpro.lnk "%userprofile%\desktop"

I just tested it here, and it worked fine.
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 2

Expert Comment

by:DiCeR
ID: 12104896
Kixtart ( kixtart.org ) can script creation of shortcuts, but that seems to be the long way around for you.

I'd try something along these lines:
* Use the same driveletter when you map your drive in the logon-script. This way you can use the same shortcut for all users, all over.
* Create a shortcut on a desktop to the neccesary EXE where the desired drive is mapped with the right properties. Etc. etc.
* Copy the shortcut to a location on your server
* Copy this shorcut to the users desktop when they log in, after the drive has been mapped:

copy X:\path\to\shortcut\shortcut.lnk "C:\documents and settings\%USERNAME%\Desktop"

where X is the drive-letter to the server where the shortcut is stored. Echo it to NUL if you want a quiet copy.

I do this myself in a semi-static multi-user environment and it works nicely very nearly all of the cases.

Hope this helps
0
 
LVL 1

Author Comment

by:mrchaos101
ID: 12105504
Ok  now wth the copy file command... I see how that would work and be easy

What happens if that short cut is already On the desk top?  How can I make it over write it with out aksing for any prompts?
0
 
LVL 1

Expert Comment

by:BungeIT
ID: 12105728
In my example, you could use xcopy (with /Y to supress prompting) instead of copy.  That would overwrite the shortcut if it was already there.

xcopy /Y \\server\share\foxpro.lnk "%userprofile%\desktop"

0
 
LVL 1

Author Comment

by:mrchaos101
ID: 12105929
BungeIT,

I get an invalid number of parapmeters error when using:

xcopy /y \\Server2003\Altek\FOX\Short Cuts\*.lnk "%userprofile%\desktop"

that is the actual path Im using

any ideas?
0
 
LVL 1

Accepted Solution

by:
BungeIT earned 500 total points
ID: 12106040
You'll have to put quotes around any path that has white space in it. You have a space in "Short Cuts".

Try this:

xcopy  /y  "\\Server2003\Altek\FOX\Short Cuts\*.lnk"  "%userprofile%\desktop"
0
 
LVL 1

Author Comment

by:mrchaos101
ID: 12106879
WOOT thanks BungeIT :)
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Unauthorized Network Devices Appearing on Home Network 20 137
IPv6 NAT to IPv4 28 66
MSSQL server connection  forced closed 3 38
Cisco WRVS4400N 11 36
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
I had an issue with InstallShield not being able to use Computer Browser service on Windows Server 2012. Here is the solution I found.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question