Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Modifying Internet Shortcut URL Path  (Read 5706 times)

0 Members and 1 Guest are viewing this topic.

nfin8rider

    Topic Starter


    Rookie

    • Experience: Beginner
    • OS: Windows 7
    Modifying Internet Shortcut URL Path
    « on: November 28, 2012, 11:33:14 AM »
    I have a .bat file that removes an existing shortcut, then creates a new shortcut.  The problem is that the old URL path doesn't change.  If there is no existing shortcut, the path is correct.  I'm not sure why this is happening.


    patio

    • Moderator


    • Genius
    • Maud' Dib
    • Thanked: 1769
      • Yes
    • Experience: Beginner
    • OS: Windows 7
    Re: Modifying Internet Shortcut URL Path
    « Reply #1 on: November 28, 2012, 03:15:52 PM »
    Without seeing what you've written it would be sheer guesswork...
    " Anyone who goes to a psychiatrist should have his head examined. "

    nfin8rider

      Topic Starter


      Rookie

      • Experience: Beginner
      • OS: Windows 7
      Re: Modifying Internet Shortcut URL Path
      « Reply #2 on: November 28, 2012, 03:42:43 PM »
      Thanks for you reply...so this is what I have.  To see what I'm experiencing, you will have to create a shortcut from https://repair.alldata.com, take a look at the url, then run this script.  You will see that your shortcut url will be the same as the original url, but is suppose to be https://repair.alldata.com.


      ------------------------------------------------------------
      del /Q "%userprofile%\Desktop\ALLDATA Repair - Login.url"

      ping 127.0.0.1 -n 10 > nul
      ping 127.0.0.1 -n 30 > nul

      START https://repair.alldata.com

      ping 127.0.0.1 -n 30 > nul

      echo [InternetShortcut] > "%userprofile%\Desktop\ALLDATA Repair - Login.url"
      echo URL=https://repair.alldata.com >> "%userprofile%\Desktop\ALLDATA Repair - Login.url"
      echo IconFile=https://repair.alldata.com/alldata/brand?fileName=img/favicon.ico >> "%userprofile%\Desktop\ALLDATA Repair - Login.url"
      echo IconIndex=0 >> "%userprofile%\Desktop\ALLDATA Repair - Login.url"

      echo [InternetShortcut] > "%userprofile%\Favorites\ALLDATA Repair - Login.url"
      echo URL=https://repair.alldata.com >> "%userprofile%\Favorites\ALLDATA Repair - Login.url"
      echo IconFile=https://repair.alldata.com/alldata/brand?fileName=img/favicon.ico >> "%userprofile%\Favorites\ALLDATA Repair - Login.url"
      echo IconIndex=0 >> "%userprofile%\Favorites\ALLDATA Repair - Login.url"

      ping 127.0.0.1 -n 30 > nul

      START https://repair.alldata.com/

      -----------------------------------------------


      foxidrive



        Specialist
      • Thanked: 268
      • Experience: Experienced
      • OS: Windows 8
      Re: Modifying Internet Shortcut URL Path
      « Reply #3 on: November 28, 2012, 06:14:36 PM »
      This should erase and recreate the desktop .url file as the single > in the second line overwrites any existing file.
      Then it copies it into the favorites folder.

      Code: [Select]
      set file="%userprofile%\Desktop\ALLDATA Repair - Login.url"

       >%file% echo [InternetShortcut]
      >>%file% echo URL=https://repair.alldata.com
      >>%file% echo echo IconFile=https://repair.alldata.com/alldata/brand?fileName=img/favicon.ico
      >>%file% echo echo IconIndex=0

      copy /y %file% "%userprofile%\Favorites\"


      nfin8rider

        Topic Starter


        Rookie

        • Experience: Beginner
        • OS: Windows 7
        Re: Modifying Internet Shortcut URL Path
        « Reply #4 on: November 29, 2012, 09:45:47 AM »
        Thank you for the reply Foxidrive, but unfortunately it didn't resolve my issue.  The url path still shows the existing bad url that I'm trying to remove.  Also, the icon doesn't appear.

        nfin8rider

          Topic Starter


          Rookie

          • Experience: Beginner
          • OS: Windows 7
          Re: Modifying Internet Shortcut URL Path
          « Reply #5 on: November 29, 2012, 09:51:18 AM »
          I take that back Foxidrive, I retested again w/ the other script you gave me to delete the file and added it with this script and it worked!  Thank you very much for you help!