Link to home
Start Free TrialLog in
Avatar of ellem52
ellem52

asked on

Script problem

This script should dump a Shortcut on the desktop of any user who activates it, but it does not.  The NET USE map was the only way I could see around the limitation of DOS to deal with UNCs.  Willing to try something else:

REM Makes a shortcut on a Users Desktop

net use E: \\matrix\shortcut\
copy E:\Mercury.lnk "C:\Documents and Settings\%USERNAME%\Desktop"
net use E: /delete /y
Avatar of jimshoe
jimshoe

Change your target folder to C:\documents and settings\all users\desktop).  
Avatar of ellem52

ASKER

Doesn't do it for some reason.  The problem seems to be with the UNC... grrr.
Avatar of ellem52

ASKER

GOT IT

It is the trailing \ on the second line.
Avatar of FishMonger
Is shortcut the name of the share?

I've tested and this works on my computer:

rem syntax is: net use E: \\server_name\share_name

net use E: \\matrix\shortcut
copy E:\mercury.lnk "c:\documents and settings\%username%\desktop"
net use E: /delete
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial