Announcement

Collapse
No announcement yet.

Copy URL Link to Specific User Desktops

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Copy URL Link to Specific User Desktops

    I am posting very, very tired so there is likely to be missing information galor. Can't even find the bloody script I was using that i save to a USB.

    Created a BAT file and inserted something like:

    Code:
    xcopy \\servername\sharename "The Reading Eggs" c:\users\username\desktop
    I have tried putting quotes round the whole thing but I am missing something really simple. The Reading Eggs is the shortcut I crearted by draging the URL from the browser to the desktop. I have tried to deploy it using a GPO linked to the Machine and NOT the User. I can't check the User end for a result because the previous tech locked the User Desktop and everything down. Can't remove them as it was on a previous DC and I need to replicate what he did and try and reverse it. Is going to be easier to reimage every machine but I want to see how I have screwed the script.

    A simple line and I can't see what I have missed and I have done this successfully on previous ocassions.

    Thanks.
    1 1 was a racehorse.
    2 2 was 1 2.
    1 1 1 1 race 1 day,
    2 2 1 1 2

  • #2
    Re: Copy URL Link to Specific User Desktops

    idk.. when i run what you typed with the corrections to srv names, i get

    Code:
    xcopy \\dcprime\sysvol\testpage.* C:\Documents and Settings\haynesjc\Desktop
    C:\Documents and Settings\haynesjc>xcopy \\dcnonyabiz\sysvol "testpage.*" C:\Documents and Settings\haynesjc\Desktop
    Invalid number of parameters

    but if i use:
    Code:
    start xcopy "\\dcnonyabiz\SYSVOL\testpage.*" "%userprofile%\desktop" /d /y
    ...things work just right.

    for what its worth, hope that helps.
    Last edited by James Haynes; 10th April 2013, 16:55.
    its easier to beg forgiveness than ask permission.
    Give karma where karma is due...

    Comment


    • #3
      Re: Copy URL Link to Specific User Desktops

      Originally posted by biggles77 View Post
      [...]

      Created a BAT file and inserted something like:

      Code:
      xcopy \\servername\sharename "The Reading Eggs" c:\users\username\desktop
      The Reading Eggs is the shortcut I crearted by draging the URL from the browser to the desktop.
      I have tried to deploy it using a GPO linked to the Machine and NOT the User.
      I can't check the User end for a result because the previous tech locked the User Desktop and everything down. Can't remove them as it was on a previous DC and I need to replicate what he did and try and reverse it. Is going to be easier to reimage every machine but I want to see how I have screwed the script.

      A simple line and I can't see what I have missed and I have done this successfully on previous ocassions.

      Thanks.
      the source should be: "\\servername.domain.local\sharename\The Reading Eggs.URL"
      An URL shortcut file has a hidden extension (*.url file or *.website file).
      The source path\filename contains spaces therefore the double quote signs must be added.

      Run xcopy with the /y switch just to be sure that any existing old shortcut file with that name will be overwritten.

      For the network path, I prefer using the fqdn of the server instead of using the netbiosname of the server.
      The distination folder I usually write with a backslash at the end, so there is no confusion that the destination is a folder.
      Code:
      xcopy /y "\\servername.domain.local\sharename\The Reading Eggs.URL" "c:\users\username\desktop\"

      Additionally, you can make it writing a log to the shared folder showing the results:
      Code:
      xcopy /y /f "\\servername.domain.local\sharename\The Reading Eggs.URL" "c:\users\username\desktop\" >"\\servername.domain.local\sharename\%computername%_xcopy_url_file.log"2>&1
      Since the script is launced as Startup script, the computer object should have read permissions (and write permissions if writing the log file) on the share and source folder.

      /Rems


      EDIT
      there actually can be two extensions for website shortcut files. *.url and *.website. See my post below.
      Last edited by Rems; 18th April 2013, 11:39.

      This posting is provided "AS IS" with no warranties, and confers no rights.

      __________________

      ** Remember to give credit where credit's due **
      and leave Reputation Points for meaningful posts

      Comment


      • #4
        Re: Copy URL Link to Specific User Desktops

        FIRE TRUCK!! Thank You Remco. I did the same thing about 7 years ago trying to copy a shortcut and missed the .lnk on the end of it. I am a dumb shit, should have seen that. Moral of story get more than 5 hours sleep a night.

        Thanks James, also appreciate your input. Much appreciated both of you.
        1 1 was a racehorse.
        2 2 was 1 2.
        1 1 1 1 race 1 day,
        2 2 1 1 2

        Comment


        • #5
          Re: Copy URL Link to Specific User Desktops

          Remco, forgot to say thanks for the backslash tip in the script. Hadn't thought of that before. Thanks.
          1 1 was a racehorse.
          2 2 was 1 2.
          1 1 1 1 race 1 day,
          2 2 1 1 2

          Comment


          • #6
            Re: Copy URL Link to Specific User Desktops

            Your welcome Chris.

            btw, just noticed that there actually can be two extensions for website shortcut files.
            *.url and *.website
            The *.website file is new with IE 9 and above. The old url files are also still supported, but they cannot used to pin the site to the taskbar, or to the start screen in Windows 8.

            Explorer seems to include *.url files in the results when you search for *.website files. But for a command line you have to type the exact extension.

            The code James posted would work for both types (infact for any file type) .
            Code:
            xcopy /y "\\servername.domain.local\sharename\The Reading Eggs.*" "c:\users\username\desktop\"

            Both types of files still have a plain text format. A ".url" file is formally called an "Internet Shortcut", and a ".website" file is called a "Pinned Site Shortcut".
            To create an old-style *.URL shortcut file with IE9 or above, hold down the SHIFT key while you drag the site icon from the address bar to the desktop. Another difference when using the shift-key to create a website shortcut is that the current page in IE will not close and opened in a new window.


            \Rems

            This posting is provided "AS IS" with no warranties, and confers no rights.

            __________________

            ** Remember to give credit where credit's due **
            and leave Reputation Points for meaningful posts

            Comment

            Working...
            X