Make shortcuts using a batch file


  1. Posts : 72
    Windows 7 build 7600 64 bit
       #1

    Make shortcuts using a batch file


    Is it possible in any way to make shortcuts (.lnk files) using command prompt/batch files without using any 3rd party apps?
    I did some googling and found this Solutions found on alt.msdos.batch - Creating Shortcuts in NT but cant make anything out of it.

    Appreciate any comments and help.
      My Computer


  2. Posts : 2,685
    Windows 7 Ultimate x86-64
       #2

    You can use the start command:

    @echo off

    start /max "C:\Windows\System32\Notepad.exe" (or another path)
      My Computer


  3. Posts : 72
    Windows 7 build 7600 64 bit
    Thread Starter
       #3

    Thats not exactly what i'm looking for here, the thing is: I've made a little batch script to make it easier for me to get on the EVE Online test server, and other people have found it very useful too. ATM it creates a "shortcut" to the client by writing a batch file on the desktop which launches it, but i want a real shortcut(.lkn), not a .bat file, it looks better
    I have compiled the batch script into an .exe and included a shortcut making program, this works fine but I would prefer it without the shortcut making program, if its possible.
      My Computer


  4. Posts : 1,020
    Windows 7 Ultimate 64 bit
       #4

    Batch file attached


    Hi Hakon,

    It seems that there is no easy way to do this. So I dropped the vb scripting solutions found at the IT Resource Center forums into a batch file for you.

    This batch will create the script, run it, and then delete the script. It will create a shortcut called EVE on your desktop. My example batch copies the %SystemRoot%\System32\CMD.exe file, you'll need to replace this line (each of the 3 times that it occurs) with the path to your *.exe. You may also wish to replace the path to the shortcut (%userprofile%\Desktop\EVE.lnk), if you want it somewhere else such as in your start menu.

    Regards

    Tim
    Make shortcuts using a batch file Attached Files
      My Computer


  5. Posts : 1,614
    Windows 7 Pro & Vista Home Premium
       #5

    You could alos do something like this of you have CCleaner on your system:

    @ECHO OFF
    "C:\Program Files\CCleaner\CCleaner.exe" /AUTO
    ipconfig /flushdns
    Save as Flushdns.bat
      My Computer


  6. Posts : 6,885
    Windows 7 Ultimate x64, Mint 9
       #6

    Hakon said:
    Thats not exactly what i'm looking for here, the thing is: I've made a little batch script to make it easier for me to get on the EVE Online test server, and other people have found it very useful too. ATM it creates a "shortcut" to the client by writing a batch file on the desktop which launches it, but i want a real shortcut(.lkn), not a .bat file, it looks better
    I have compiled the batch script into an .exe and included a shortcut making program, this works fine but I would prefer it without the shortcut making program, if its possible.
    Assuming you installed the Singularity Client into a separate directory (like CCP suggests...), then you can simply go to that directory, find the client, and make a shortcut to the desktop.

    ~Lordbob
      My Computer


  7. Posts : 72
    Windows 7 build 7600 64 bit
    Thread Starter
       #7

    Thanks for the replies, i have decided to use a 3rd party shortcut making program, and ive compiled the .bat along with shortcut.exe, ive attached the program and its contents seperate (you can decompile the program by running it with a /d parameter)

    Lordbob75 said:
    Hakon said:
    Thats not exactly what i'm looking for here, the thing is: I've made a little batch script to make it easier for me to get on the EVE Online test server, and other people have found it very useful too. ATM it creates a "shortcut" to the client by writing a batch file on the desktop which launches it, but i want a real shortcut(.lkn), not a .bat file, it looks better
    I have compiled the batch script into an .exe and included a shortcut making program, this works fine but I would prefer it without the shortcut making program, if its possible.
    Assuming you installed the Singularity Client into a separate directory (like CCP suggests...), then you can simply go to that directory, find the client, and make a shortcut to the desktop.

    ~Lordbob
    The whole things purpose is to do it automatically (copy client to new folder > create shortcut to said client with the /server:singularity parameter )
    I have attached the program, if you play eve, try it out and give me some feedback and comments

    Hi Hakon,

    It seems that there is no easy way to do this. So I dropped the vb scripting solutions found at the IT Resource Center forums into a batch file for you.

    This batch will create the script, run it, and then delete the script. It will create a shortcut called EVE on your desktop. My example batch copies the %SystemRoot%\System32\CMD.exe file, you'll need to replace this line (each of the 3 times that it occurs) with the path to your *.exe. You may also wish to replace the path to the shortcut (%userprofile%\Desktop\EVE.lnk), if you want it somewhere else such as in your start menu.

    Regards

    Tim
    Thanks a lot! i might try it with the vbs instead
    Make shortcuts using a batch file Attached Files
      My Computer


  8. Posts : 1,020
    Windows 7 Ultimate 64 bit
       #8

    VBS


    I would use the vbs too, it's just 'neater'.

    My batch was simply to meet your requirements and it looks like you now have a few solutions to play with. Even better!

    Good luck with your project!
      My Computer


  9. Posts : 1
    win 11
       #9

    thank you so much for this ill be creating other shortcut using this

    - - - Updated - - -

    ill bve getting new ideas using this thread thank you
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 07:27.
Find Us