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%\Deskto p"
net use E: /delete /y
REM Makes a shortcut on a Users Desktop
net use E: \\matrix\shortcut\
copy E:\Mercury.lnk "C:\Documents and Settings\%USERNAME%\Deskto
net use E: /delete /y
Change your target folder to C:\documents and settings\all users\desktop).
ASKER
Doesn't do it for some reason. The problem seems to be with the UNC... grrr.
ASKER
GOT IT
It is the trailing \ on the second line.
It is the trailing \ on the second line.
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%\deskto p"
net use E: /delete
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%\deskto
net use E: /delete
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.