+ Post New Thread
Results 1 to 7 of 7
Scripts Thread, Batch File to run a shortcut in Coding and Web Development; help need to run a shortcut from login script because its easier than sticking the shortcut in every pc's startup ...
  1. #1
    tommccann's Avatar
    Join Date
    Jun 2009
    Posts
    252
    Thank Post
    46
    Thanked 39 Times in 31 Posts
    Rep Power
    0

    Batch File to run a shortcut

    help need to run a shortcut from login script because its easier than sticking the shortcut in every pc's startup folder.

    tried call /k "\\server\folder\shortcut", and call /k \\server\folder\shortcut,
    call /k "\\server\folder\shortcut.ink", call /k \\server\folder\shortcut.ink

    also tried
    start "\\server\folder\shortcut.ink", start \\server\folder\shortcut.ink,
    start "\\server\folder\shortcut", and start \\server\folder\shortcut,


  2. #2

    LosOjos's Avatar
    Join Date
    Dec 2009
    Location
    West Midlands
    Posts
    5,492
    Thank Post
    1,451
    Thanked 1,197 Times in 812 Posts
    Rep Power
    711
    don't know if it's just a typo above, but the shortcut extension is .lnk, not .ink, so I'd check that.

    Also, why don't you just execute the same command line that the shortcut does rather than trying to execute the shortcut itself?

  3. Thanks to LosOjos from:

    tommccann (13th September 2010)

  4. #3

    vikpaw's Avatar
    Join Date
    Sep 2006
    Location
    Saudi Arabia
    Posts
    6,008
    Thank Post
    680
    Thanked 1,397 Times in 1,157 Posts
    Rep Power
    353
    shouldn't the shortcut file extension be .lnk i.e. .LNK

  5. Thanks to vikpaw from:

    tommccann (13th September 2010)

  6. #4

    vikpaw's Avatar
    Join Date
    Sep 2006
    Location
    Saudi Arabia
    Posts
    6,008
    Thank Post
    680
    Thanked 1,397 Times in 1,157 Posts
    Rep Power
    353
    what he said ^ . Look at the properties of the shortcut and run the target itself.

  7. Thanks to vikpaw from:

    tommccann (13th September 2010)

  8. #5
    tommccann's Avatar
    Join Date
    Jun 2009
    Posts
    252
    Thank Post
    46
    Thanked 39 Times in 31 Posts
    Rep Power
    0
    right i copied the lines to a test.bat and ran it with success!! (and yes i was using Lnk not ink)

    for some reason it just wont run from the login script!?! maybe a wait command may fix this

  9. #6
    tommccann's Avatar
    Join Date
    Jun 2009
    Posts
    252
    Thank Post
    46
    Thanked 39 Times in 31 Posts
    Rep Power
    0
    Problem solved!!
    moved the code line to the very to of the script and SUCCESS!! yippee

  10. #7

    vikpaw's Avatar
    Join Date
    Sep 2006
    Location
    Saudi Arabia
    Posts
    6,008
    Thank Post
    680
    Thanked 1,397 Times in 1,157 Posts
    Rep Power
    353
    my next thought was whether or not the shared drive was accessible yet. glad it's sorted

SHARE:
+ Post New Thread

Similar Threads

  1. Copy Batch file
    By spider6986 in forum Windows
    Replies: 10
    Last Post: 8th February 2010, 04:15 PM
  2. Batch File (select random file) help
    By fil_b in forum Windows Server 2000/2003
    Replies: 5
    Last Post: 5th November 2009, 04:13 AM
  3. Block users running a batch file to run command.com?
    By reggiep in forum Windows Server 2008
    Replies: 3
    Last Post: 1st August 2009, 03:44 PM
  4. run a batch file on logon with a CC3 Network
    By new-2-this in forum How do you do....it?
    Replies: 5
    Last Post: 17th July 2008, 07:57 PM
  5. batch file help
    By beeswax in forum Scripts
    Replies: 9
    Last Post: 3rd March 2006, 07:48 PM

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 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
  •