Jump to content

Creating lnk files other than manual


kukris

Recommended Posts

Hello,

how can I create lnk files via script or command?

Say I want to create a lnk file which points to C:\Prog\Prog.exe.

Normally I have to do it manually by right clicking on Prog.exe and

select Create Shortcut.

1.) Can this be done by a script or command?

2.) Is it possible to use system variables like %systemdrive& instead of fixed paths?

Link to comment
Share on other sites


Thanks, but I can't it get to work. I checked the help and tried this:

shortcut -s -t D:\Progs\Test\test.exe -n Test -d h:\prog-w2k\system -i D:\Progs\Test\test.exe -x 0 -l test.log

I put shortcut.exe in c:\temp and execute it from there via a cmd file and get the following error:

Error: unable to find D:\Progs\Test\test.lnk

Are there maybe some examples or further documentation?

Link to comment
Share on other sites

Hi,

example on how to create a shortcut on the user's desktop:

shortcut -f -t C:\SysTools\ProcExp.exe -n "%USERPROFILE%\Desktop\Process Explorer"

This will create a shortcut to C:\SysTools\ProcExp and place the corresponding .lnk File on your Desktop.

Bye, Egon

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...