Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Make shortcuts using a batch file


30 Nov 2009   #1

Windows 7 build 7600 64 bit
 
 
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 System SpecsSystem Spec
.

30 Nov 2009   #2

Windows 7 Ultimate x86-64
 
 

You can use the start command:

@echo off

start /max "C:\Windows\System32\Notepad.exe" (or another path)
My System SpecsSystem Spec
01 Dec 2009   #3

Windows 7 build 7600 64 bit
 
 

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 System SpecsSystem Spec
.


01 Dec 2009   #4

Windows 7 Ultimate 64 bit
 
 
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


Attached Files
File Type: bat CREATE_SHORTCUT_VBS_BATCH.bat (2.6 KB, 5849 views)
My System SpecsSystem Spec
01 Dec 2009   #5

Windows 7 Pro & Vista Home Premium
 
 

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

Quote:
@ECHO OFF
"C:\Program Files\CCleaner\CCleaner.exe" /AUTO
ipconfig /flushdns
Save as Flushdns.bat
My System SpecsSystem Spec
01 Dec 2009   #6

Windows 7 Ultimate x64, Mint 9
 
 

Quote   Quote: Originally Posted by Hakon View Post
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 System SpecsSystem Spec
02 Dec 2009   #7

Windows 7 build 7600 64 bit
 
 

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)

Quote   Quote: Originally Posted by Lordbob75 View Post
Quote   Quote: Originally Posted by Hakon View Post
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

Quote:
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


Attached Files
File Type: bat EVE Client copier 2.0.bat (1.6 KB, 668 views)
My System SpecsSystem Spec
03 Dec 2009   #8

Windows 7 Ultimate 64 bit
 
 
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 System SpecsSystem Spec
Reply

 Make shortcuts using a batch file




Thread Tools




Our Sites

Site Links

About Us

Find 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 11:43 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33