Results 1 to 9 of 9
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Copy Desktop Shortcut from One Computer to Another

    Copy Desktop Shortcut from One Computer to Another?

    I

  2. #2
    Banned Member
    Join Date
    Jul 2002
    Location
    Newport Richey, Florida, USA
    Posts
    2,149
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Copy Desktop Shortcut from One Computer to Another

    My understanding is, that a shortcut only takes you to the program that created it. So if that shortcut is transported to a different computer I'm not sure what good it would do. Or maybe i'm just not understanding what it is your trying to accomplish. Is it just the Icon that you like and you want to use it somewhere else? The reason I say this is, I have copied a couple things to a floppy and downloaded them on another computer, clicked on them and found out they were just short cuts ,then it gave me a message telling me in so many words" hey stupid this shortcut points to a program thats not on this computer" So I know make sure I am not copying just the shortcut. I suppose it might work if you had the exact same program on the other computer you were moving it to, but i'm not sure. If you don't mind me asking, what is it your trying to accomplish?

  3. #3
    Uranium Lounger
    Join Date
    Mar 2001
    Location
    New Jersey
    Posts
    6,684
    Thanks
    1
    Thanked 11 Times in 11 Posts

    Re: Copy Desktop Shortcut from One Computer to Another

    Howdy John.
    I'm not sure any of these shortcut copies will work the way you want them to or not. But to Physically move the shortcuts...

    1. Go to My Computer / 3 1/2 Floppy A: and minimize or shrink the window and drag the shortcut from the floppy to the desktop.
    2. Go to the server, navigate to the workstation where the shortcut you want resides, and copy it to the location you want to save it on the server.
    3. Again, go to the server and copy or move the shortcut back to the workstation it came from or any other workstatiion on the network.

    Shortcuts generally work best when they are created in the location that they will be used from. That way the shortcut uses the correct path to find the target. If you start moving shortcuts around to different machines, servers and workstations that's just going to get confusing. You didn't say what these shortcuts point to. If they point to locations on your network or individual machines, then you probably shouldn't move them around. If they point to a webpage or a universal location then it shouldn't cause any problems. A little more detail about the intended use or situation would help here.
    <IMG SRC=http://www.wopr.com/w3tuserpics/DocWatson_sig.gif>

  4. #4
    Banned Member
    Join Date
    Jul 2002
    Location
    Newport Richey, Florida, USA
    Posts
    2,149
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Copy Desktop Shortcut from One Computer to Another

    I agree with DOC. I have copied shortcuts for Webb pages to a floppy to use to access those webb pages again later from a different computer. But like Doc said It's best to create the shortcut from the program on the work station that your using it on. that way there's no problem with the path to the target.

  5. #5
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Copy Desktop Shortcut from One Computer to Another

    I have 'copied' shortcuts before, and the situation where I was doing so was when I had made a 'custom' shortcut, like a shortcut to a secured Access mdb file, that had command line arguments in it, to point to the correct workgroup file, and possibly even a username and password.

    Just a little warning. I know this is the Windows 98 lounge, but when you start copying shortcuts in Windows 2000, it's a whole new ball of wax. Windows 2000 'marks' its shortcuts, so that if the file they are pointing to moves, the shortcuts adapt. It's slick, but it has issues if you send someone a shortcut. One issue, is that the shortcut actually points to the machine that made the shortcut. Not a problem if you have access to that machine, but if it is off, the shortcut won't work.

  6. #6
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Copy Desktop Shortcut from One Computer to Another

    Hi Guys

    Thanks for the Information

    In my case I

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

    Re: Copy Desktop Shortcut from One Computer to Another

    John,

    If you are sure that the targets of the shortcuts are in identically named paths on all PC's, you should be able to store master copies of the shortcuts on a network drive and copy these down to the individual PC's. I have done this succesfully in Windows NT4; I think Window 98 should be OK too. Take note of Drew's precaution about Windows 2000.

  8. #8
    Uranium Lounger
    Join Date
    Mar 2001
    Location
    New Jersey
    Posts
    6,684
    Thanks
    1
    Thanked 11 Times in 11 Posts

    Re: Copy Desktop Shortcut from One Computer to Another

    John,
    Have to agree with Hans here. If all paths & targets are in fact the same <img src=/S/bullseye.gif border=0 alt=bullseye width=45 height=15>, a master folder or a .zip archive that you can copy on each client machine or on a network server or drive, would enable you to reinstall the icons yourself over the network, allow the client access to the network drive or folder on their system or e-mail the .zip file to a remote client in the event of an unintended deletion.
    <IMG SRC=http://www.wopr.com/w3tuserpics/DocWatson_sig.gif>

  9. #9
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Copy Desktop Shortcut from One Computer to Another

    FWIW, this is modified example of VBA sub that copies updated files (including desktop shortcut) from network server to local PC, using FileSystemObject (FSO) methods. To use FSO (assuming it hasn't been disabled by your friendly IT Dept) set a reference to Microsoft Scripting Runtime (scrrun.dll) or Windows Script Host (WSH) Object Model library (wshom.ocx)). (This is for secured Access database, where the shortcut has to point to correct workgroup information file in addition to target database):

    Private Sub RunSetup()
    On Error GoTo Err_Handler

    Dim strpathUNC As String
    Dim strPathNet As String
    Dim strPathLocal As String
    Dim strPathDesktop As String
    Dim strFile As String
    Dim strFolder As String

    Dim fso As New Scripting.FileSystemObject

    strpathUNC = "SERVERNAMEGLOBALDEPTACCESSMYAPP"
    strPathNet = "G:ACCESSMYAPP"
    strPathLocal = "C:ACCESSMYAPP"
    strPathDesktop = GetDesktopPath

    ' Create local folder if doesn't already exist:
    strFolder = Left(strPathLocal, Len(strPathLocal) - 1)
    If Not fso.FolderExists(strFolder) Then
    fso.CreateFolder (strFolder)
    End If

    ' CopyFolder method will copy folder & all files in folder to destination folder:
    strFolder = "ICONS"
    fso.CopyFolder strPathNet & strFolder, strPathLocal, True 'Overwrite files
    ' CopyFile method will copy all files fm source folder to target folder:
    fso.CopyFile strPathNet & "SETUP*.*", strPathLocal, True 'Overwrite files
    strFile = "Shortcut to MyApp.LNK"
    fso.CopyFile strPathLocal & strFile, strPathDesktop, True

    Exit_Sub:
    Set fso = Nothing
    Exit Sub
    Err_Handler:
    ' Error handling here
    Resume Exit_Sub
    End Sub

    WIN API functions are used to get correct path for target PC's Desktop folder, as shown in this example:

    Option Compare Database
    Option Explicit

    Public Type ShortItemId
    cb As Long
    abID As Byte
    End Type

    Public Type ItemIDList
    mkid As ShortItemId
    End Type

    ' Use one of these constants for specified folder:
    Const CSIDL_TEMPLATES = &H15
    Const CSIDL_STARTMENU = &HB
    Const CSIDL_FAVORITES = &H6
    Const CSIDL_DESKTOPDIRECTORY = &H10

    Public Declare Function SHGetPathFromIDList Lib "shell32.dll" _
    (ByVal pidl As Long, ByVal pszPath As String) As Long

    Public Declare Function SHGetSpecialFolderLocation Lib "shell32.dll" _
    (ByVal hwndOwner As Long, ByVal nFolder As Long, pidl As ItemIDList) As Long

    Function GetSpecialFolder(ByVal CSIDL As Long) As String
    On Error GoTo Err_Handler

    'NOTE: Added ByVal to CSIDL argument or get ByRef argument type mismatch error
    Dim lngIDL As Long
    Dim strPath As String
    Dim IDL As ItemIDList
    Const NOERROR = 0
    Const MAX_LENGTH = 260

    lngIDL = SHGetSpecialFolderLocation(Application.hWndAccessA pp, CSIDL, IDL)
    If lngIDL = NOERROR Then
    strPath = Space(MAX_LENGTH)
    lngIDL = SHGetPathFromIDList(ByVal IDL.mkid.cb, ByVal strPath)
    If lngIDL Then
    GetSpecialFolder = Left$(strPath, InStr(strPath, Chr$(0)) - 1) & ""
    End If
    End If

    Exit_Sub:
    Exit Function
    Err_Handler:
    MsgBox Err.Description, vbCritical Or vbOKOnly
    Resume Exit_Sub
    End Function

    Public Function GetDesktopPath() As String
    GetDesktopPath = GetSpecialFolder(CSIDL_DESKTOPDIRECTORY)
    End Function

    Note that this code is used in an Access .MDE file used to update actual application files; thus the Access application hWndAccessApp function is used to provide SHGetSpecialFolderLocation hwndOwner argument. If not using Access to run this, modify code accordingly. At work we use both WIN 98 & WIN 2K and function works correctly on both. On home computer (WIN XP Home Ed) function also returns correct desktop folder for currently logged in user. Ex: Cocuments and SettingsMARK DDesktop

    Note: The API code based in part (with the usual corrections, like missing ByVal's) on MSKB Article 182606 - ODE: How to Create a Shortcut on the Desktop with ODE

    HTH

Posting Permissions

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