We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
The Forum now has a brand new text editor, adding a bunch of handy features to use when creating posts. Read more in our how-to guide

Setting an application to autorun on startup?

2

Comments

  • Cantdance_2
    Cantdance_2 Posts: 200 Forumite
    Awesome - thanks guys!!!

    Last question (promise!), can I ensure that the processes I add to the startup menu run in a certain order?
    Total Debt: Owe about £19,000 on credit cards plus £24,000 which is my half of joint loans.
  • albertross_2
    albertross_2 Posts: 8,932 Forumite
    you could add the all to the vbs script in order with a loop similar to the code I posted, waiting for them to start in turn.
    Ever get the feeling you are wasting your time? :rolleyes:
  • Chippy_Minton
    Chippy_Minton Posts: 3,339 Forumite
    Or put them in a DOS batch file, e.g. start.bat:

    "C:\Program Files\FileZilla\FileZilla.exe"
    start iexplore
    notepad

    Look at the program shortcut to see the full file path. As shown above, some programs need 'start', others just the name. Type the command from a command prompt to see which one works.
  • Hi again everyone... okay I've been playing with the VBS script but I can't seem to get it to work for some reason - it fails on line two character one saying the system cannot find the file specified.

    Any ideas? Here's my script:

    Set objShell = WScript.CreateObject("WScript.Shell")
    objShell.Run "C:\Program Files\FileZilla\FileZilla.exe"
    Wscript.Sleep 5000
    objShell.AppActivate "Filezilla"
    objShell.SendKeys "%tfr%qu%p"
    Total Debt: Owe about £19,000 on credit cards plus £24,000 which is my half of joint loans.
  • espresso
    espresso Posts: 16,448 Forumite
    Part of the Furniture 10,000 Posts Combo Breaker
    Cantdance wrote:
    Hi again everyone... okay I've been playing with the BBS script but I can't seem to get it to work for some reason - it fails on line two character one saying the system cannot find the file specified.

    Any ideas? Here's my script:

    Set objShell = WScript.CreateObject("WScript.Shell")
    objShell.Run "C:\Program Files\FileZilla\FileZilla.exe"
    Wscript.Sleep 5000
    objShell.AppActivate "Filezilla"
    objShell.SendKeys "%tfr%qu%p"

    So edit your script so that the path to the filezilla program is correct.

    HTH
    :doh: Blue text on this forum usually signifies hyperlinks, so click on them!..:wall:
  • Thanks for that but the problem is, it is correct, as far as I can make out anyway!

    I guess it isn't or it would work...

    Hmm! Does it make a difference where I save and run the script from?

    James
    Total Debt: Owe about £19,000 on credit cards plus £24,000 which is my half of joint loans.
  • Chippy_Minton
    Chippy_Minton Posts: 3,339 Forumite
    Cantdance wrote:
    objShell.Run "C:\Program Files\FileZilla\FileZilla.exe"
    Put 3 pairs of double quotes (!) round it, like this:

    objShell.Run """C:\Program Files\FileZilla\FileZilla.exe"""

    It doesn't matter where you put the script or where you run it from because you've specified an absolute path above.
  • Great, thank you!!

    Now it opens Filezilla but regardless of the length of time I enter in the 'Sleep' command, no keystrokes get sent to Filezilla or anywhere else for that matter.

    Do I need to install anything to get the SendKeys command to work?
    Total Debt: Owe about £19,000 on credit cards plus £24,000 which is my half of joint loans.
  • Total Debt: Owe about £19,000 on credit cards plus £24,000 which is my half of joint loans.
  • albertross_2
    albertross_2 Posts: 8,932 Forumite
    does this work?

    objShell.SendKeys "%tfr%qu%qp"

    this should process the queue and open help, no topics found , if sendkeys is working

    Set objShell = WScript.CreateObject("WScript.Shell")
    objShell.Run """C:\Program Files\FileZilla\FileZilla.exe"""
    objShell.AppActivate "Filezilla"
    Wscript.Sleep 5000
    objShell.SendKeys "%tfr%qu%qp"
    Wscript.Sleep 1000
    objShell.SendKeys "%hc%n%Snaminau 666 gmdvd01%L"
    Ever get the feeling you are wasting your time? :rolleyes:
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 354K Banking & Borrowing
  • 254.3K Reduce Debt & Boost Income
  • 455.3K Spending & Discounts
  • 247.1K Work, Benefits & Business
  • 603.7K Mortgages, Homes & Bills
  • 178.3K Life & Family
  • 261.2K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.1K Discuss & Feedback
  • 37.7K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.