startup scripting

Discussion in 'Scripting' started by SBS user, Feb 16, 2009.

  1. SBS user

    SBS user Guest

    I have a script that I want to run at login, but only from the console. I
    don't want it to run if logged into a terminal session. Is there a way to
    use the startup folder in this fassion?
     
    SBS user, Feb 16, 2009
    #1
    1. Advertisements

  2. AFAIR you can test %ClientName%. It is defined for terminal sessions only.
     
    Pegasus \(MVP\), Feb 16, 2009
    #2
    1. Advertisements

  3. SBS user

    SBS user Guest

    Can you give me some sample options for that? Basically I want to start an
    app when logging into the console.

     
    SBS user, Mar 4, 2009
    #3
  4. SBS user

    FNL Guest

    if "%ClientName%"=="" start /b "Application" "c:\program files\...\..."

     
    FNL, Mar 5, 2009
    #4
  5. SBS user

    SBS user Guest

    Thanks for the update I will give that a try

     
    SBS user, Mar 13, 2009
    #5
  6. SBS user

    SBS user Guest

    I am not familiar with VB scritping. Is there a way that this can be done
    with a batch file? If not what do I need to do to get the VB script
    working?

     
    SBS user, Mar 24, 2009
    #6
  7. The example I gave you (while posting under my "FNL" alias) is a batch file
    command, not a VB Script line of code. Why don't you give it a try?
     
    Pegasus [MVP], Mar 24, 2009
    #7
  8. SBS user

    SBS user Guest

    Sorry I thought you said it was VB, I will give that a try
     
    SBS user, Apr 8, 2009
    #8
  9. SBS user

    SBS user Guest

    Okay, I have put this off for awhile but want to get it figured out. So if
    I create a batch file and put the following line in it

    if "%ClientName%"=="" start /b "Application" "c:\program files\...\..."

    then I just need to change the "c:\program files\...\..." section to the
    location of the app I want to run and it will only run when logged in from
    the console and will not run when logged in from a terminal session?
     
    SBS user, Jun 3, 2009
    #9
  10. This thread appears to be about 10 weeks old and most of it has disappeared
    from the horizon of my newsreader. As I said before: Why don't you give it a
    try and watch what happens?
     
    Pegasus [MVP], Jun 3, 2009
    #10
  11. SBS user

    SBS user Guest

    Looks good, Thanks

     
    SBS user, Jun 3, 2009
    #11
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.