Results 1 to 10 of 10
  1. #1
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Hatsukaichi, Hiroshima, Japan
    Posts
    904
    Thanks
    0
    Thanked 0 Times in 0 Posts

    lnk Batfile mess (Pro)

    Well, I finally got a batch file with links to work, sort of. One thing I discovered was that changing the name of shortcuts is unreliable. It's better to delete the shortcut and make a brand new one. For example, I changed the name 'tiki tiki flets.lnk' to 'tikiflets.lnk' and it wouldn't work in the batchfile but when I deleted the old shortcut and made anew one called 'tikiflets.lnk' it worked just fine. Here's the batchfile. It launches the network and then the ADSL connection and Internet Explorer:

    ----------------------

    Start K:ShortcutslinksRealtek.lnk /wait
    delay 5
    Start K:Shortcutslinkstikiflets.lnk
    call "c:Program FilesInternet Exploreriexplore.exe"
    -----------------------

    I originally tried it without the /wait switch and the delay 5 (seconds). I was getting an error because the ADSL connection was trying to connect before the network was running. By itself the /wait switch didn't seem to do anything, but I'm sure the delay command doesn't do anything - but for whatever reason this batch file sort of works. However I can't make the batch file terminate - it keeps running until I close Explorer. I'd like it to set up the connection, launch explorer and then quit. Also, sometimes the ADSL connection won't connect on the second or more use of the batfile. To get it working again I need to log out or reboot. I can't work out why. Moreover, the first two start commands don't seem to work unless I include the run Explorer command that only works in quotes. Basically I don't understand what's going on. Can anyone help out?

    Thanks

    Chris

  2. #2
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: lnk Batfile mess (Pro)

    What happens if you replace the "call" with a "start" to a shortcut to IE?

  3. #3
    Plutonium Lounger
    Join Date
    Oct 2001
    Location
    Lexington, Kentucky, USA
    Posts
    12,107
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: lnk Batfile mess (Pro)

    Also, although it's been awhile for me and I'm not sure of this, but doesn't the CALL leave the batch file open, pending a return?

  4. #4
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Hatsukaichi, Hiroshima, Japan
    Posts
    904
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: lnk Batfile mess (Pro)

    Thanks Leif, that was an interesting idea - I hadn't thought of using start with a shortcut to IE - I'd tried it directly to the program and it didn't work. Meatloaf sung about two out of three not being bad and that seems to be what I get with your suggestion. The order of the commands changes the results: Keeping the same order Tikiflets.lnk doesn't work. If I start the shortcut to IE first then only that works, if it's in the middle then again the tikiflets.lnk doesn't work. I don't get it - it seems I need the call command at the end but then the batch file won't terminate.

    Chris

  5. #5
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: lnk Batfile mess (Pro)

    Meatloaf still sings it in my house - maybe the subject line should be Batfile out of Hell? <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    Can you create a (simple) batchfile to start IE and terminate? - or does it always wait until IE has closed before terminating?

  6. #6
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Hatsukaichi, Hiroshima, Japan
    Posts
    904
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: lnk Batfile mess (Pro)

    Yes! But I'm not sure what good it does me! Big Al is quite right about call - I can use start with a shortcut to launch IE as follows:

    start K:Shortcutslinksiexplore.exe.lnk

    I can launch the network and IE as follows:

    Start K:ShortcutslinksRealtek.lnk
    start K:Shortcutslinksiexplore.exe.lnk

    But the ADLS lnk won't play with this - I don't know why. It's definitely the flaky line in my original batch file. Also I noticed that sometimes the message window while it is connecting reads "Registering your connection with the network" and sometimes it reads "Calling Win ( PPPOEP)" (or something like that - it's from memory as it doesn't always do it.)

    So at the moment I have a place to go but I'm not all revved up. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    Chris

  7. #7
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: lnk Batfile mess (Pro)

    >> Yes! But I'm not sure what good it does me!

    So what happens if you replace the last Call to directly open IE, with a Call to the (new) BATchfile that opens IE?

  8. #8
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Hatsukaichi, Hiroshima, Japan
    Posts
    904
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: lnk Batfile mess (Pro)

    What a cunning idea! I never thought of that - it deserves to work - but it didn't! Once again the tikiflets.lnk wouldn't cooperate. I don't get it.

    Chris

  9. #9
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: lnk Batfile mess (Pro)

    Try extending the idea - create a separate batch for each process . . . ?

  10. #10
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Hatsukaichi, Hiroshima, Japan
    Posts
    904
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: lnk Batfile mess (Pro)

    Thanks Leif - another nice idea - but still the ADSL tikiflets.lnk won't work. Since it is always the one that won't work I wonder if there is another way to launch the connection?

    Chris

Posting Permissions

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