+ Post New Thread
Results 1 to 8 of 8
Coding Thread, calling a file in Coding and Web Development; Hi there How can I call a .lnk file (shortcut of a bat file) inside a bat file. Regards...
  1. #1

    Join Date
    Aug 2013
    Posts
    39
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    calling a file

    Hi there

    How can I call a .lnk file (shortcut of a bat file) inside a bat file.

    Regards

  2. #2

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,824
    Thank Post
    372
    Thanked 544 Times in 507 Posts
    Rep Power
    184
    Not really sure what you're trying to do, as there's no reason to use a shortcut if you're using a bat file to start a program, but literally just use:

    Code:
    start NameOfShortcut.lnk
    Steve

  3. #3

    sparkeh's Avatar
    Join Date
    May 2007
    Posts
    7,230
    Thank Post
    1,446
    Thanked 1,859 Times in 1,252 Posts
    Blog Entries
    22
    Rep Power
    559
    Can't you just call the bat file directly?

  4. #4

    Join Date
    Aug 2013
    Posts
    39
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hello

    I solved my problem if any one interesting, I used the following in my bat file:

    call "shortcut file path"
    and you can get the path by shift_right click on the shortcut file > select "copy as path" then past it.

  5. #5

    Join Date
    Aug 2013
    Posts
    39
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hello

    I solved my problem if any one interesting, I used the following in my bat file:

    call "shortcut file path"
    and you can get the path by shift_right click on the shortcut file > select "copy as path" then past it.


    The reason of using the shortcut file because when I run the shortcut file the network drive is coming hidden so I need to create a bat file as the following:

    1. A mount network drive.
    2.Call the short cut file (I use it to set "Run as administrator", which is disable in the original bat file)
    3. Delete the amounted network drive.

    and that's it.

    Cheers

  6. #6

    Dos_Box's Avatar
    Join Date
    Jun 2005
    Location
    Preston, Lancashire
    Posts
    9,436
    Thank Post
    701
    Thanked 2,302 Times in 1,063 Posts
    Blog Entries
    23
    Rep Power
    678
    Are you trying to get around network security measure in place where you are?

  7. #7

    3s-gtech's Avatar
    Join Date
    Mar 2009
    Location
    Wales
    Posts
    3,104
    Thank Post
    161
    Thanked 655 Times in 588 Posts
    Rep Power
    169
    Ha, it certainly looks like it! Always makes me paranoid if this will work here - I think I have dealt with similar before so hopefully.

  8. #8

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,374
    Thank Post
    906
    Thanked 1,811 Times in 1,559 Posts
    Blog Entries
    12
    Rep Power
    468
    I reckon its just something to make his life easier.



SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 0
    Last Post: 1st March 2013, 05:07 PM
  2. Replies: 4
    Last Post: 9th July 2012, 10:45 AM
  3. Website to call a file and update at regualr intervals
    By pettit87 in forum Internet Related/Filtering/Firewall
    Replies: 1
    Last Post: 14th July 2010, 08:42 PM
  4. Nasty hobbit files!
    By Ric_ in forum Scripts
    Replies: 16
    Last Post: 2nd September 2005, 12:39 AM
  5. Local HOSTS file ignored on a domain
    By eejit in forum Windows
    Replies: 19
    Last Post: 24th June 2005, 03:10 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •