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
Hakon

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
Frostmourne

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
Hakon

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
TimStitt

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, 5950 views)
My System SpecsSystem Spec
01 Dec 2009   #5
reghakr

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
Lordbob75

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
Hakon

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, 694 views)
My System SpecsSystem Spec
03 Dec 2009   #8
TimStitt

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




Similar help and support threads
Thread Forum
Advanced Disk Cleanup - Create Shortcuts Without A Batch File!
Hello 7, This is how to create shortcuts for the Advanced Disk Cleanup feature. I keep mine in my Start Menu :geek: These shortcuts do not require batch files or command window, and they execute immediately. Just follow the steps below! NOTE: You MUST be logged in as an administrator to...
Performance & Maintenance
Batch File that grabs file names from folder to insert into batch file
Ok I'm totally at a loss on how to word this so I'm just going to write it out the best that I can... :confused: First I have a batch file that I'm writing that will convert mp4 files to mp3 files (I have a lot) for a buddies band using ffmpeg. Here's the code that I'm using: ffmpeg -i...
General Discussion
Make GPO changes from a batch file?
Hi I'm confused and seeking guidance. I physically manage well over 100 systems on a hardware level and very little on a software level. Yet, there are many tiny modification I've install to keep things running for the end users. The only time I actually interact with the system on a...
System Security
How to make a multible copy batch file
Below is a batch file I created to copy all the files from a program called A5V5. This batch file works to copy the files to two different drives What I want to do is if the J: Directory is not availble (This is a flash drive) that it will copy to the E:\ directory which is a second HDD and not...
Software
Can you tell me what I need to make this batch file run?
I run a batch file to do image backups. It will only run if I am in the built- in-admin account. When I saw the command line option I thought I had it made. Because the batch file runs in C:\windows\system32\cmd I figured I was already at an elevated commandprompt so I merely added 'net user...
General Discussion
cant make a batch file:)
hello i need help making .bat file from .txt Windows 7 wont make it for me when i rename the thing to .bat i just see it as .bat.txt thx
General Discussion


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 16:39.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App