Results 1 to 7 of 7
  1. #1
    Senior Member lilygel's Avatar
    Join Date
    Feb 2014
    Posts
    103
    Thanks
    24
    Thanked 58 Times in 33 Posts
    Points: 1,473, Level: 21
    Points: 1,473, Level: 21
    Overall activity: 0%
    Overall activity: 0%
    Achievements:
    1000 Experience Points1 year registered

    Command Prompt Help

    I use a batch file to launch ITH and TA. Here's my script:

    Code:
    @echo off
    echo Launching ITH 3.0...
    cd /d "F:\Programs EX\ITH 3.0"
    start ITH.exe
    echo Launching Translation Aggregator...
    timeout /t 2 /nobreak > NUL
    echo.
    cd /d "D:\Translation Aggregator 0.4.9.r171\Translation Aggregator 0.4.9.r171"
    "Translation Aggregator.exe" /b
    exit
    When ITH launches, UAC kicks in, I select 'Yes' then TA launches. That's all good, but the command prompt wouldn't exit. I have to manually close the window. So does anyone know what the cause is and what I can do so that the command prompt window would close after performing the commands? By the way, my PC runs on Windows 7.


    And one more thing about UAC. There are occasions when it takes time for a program that requires administrative privileges to launch. For example, ITH...there are times when I start it, and it will take like a few seconds or a minute before the UAC prompt pops up. Does anyone know the reason for this?

  2. # ADS
    Circuit advertisement
    Join Date
    Always
    Posts
    Many
     

  3. #2
    Senior Member kero-kero's Avatar
    Join Date
    Feb 2014
    Posts
    1,474
    Thanks
    0
    Thanked 444 Times in 293 Posts
    Points: 5,256, Level: 46
    Points: 5,256, Level: 46
    Overall activity: 3.0%
    Overall activity: 3.0%
    Achievements:
    1 year registeredThree Friends5000 Experience Points

    Re: Command Prompt Help

    Insert "start" before TA : start "Translation Aggregator.exe" /b

    Unlike launtching ITH.exe, TA is kicked without "start".
    This means the batch file waits to terminate TA.

  4. #3
    Senior Member lilygel's Avatar
    Join Date
    Feb 2014
    Posts
    103
    Thanks
    24
    Thanked 58 Times in 33 Posts
    Points: 1,473, Level: 21
    Points: 1,473, Level: 21
    Overall activity: 0%
    Overall activity: 0%
    Achievements:
    1000 Experience Points1 year registered

    Re: Command Prompt Help

    Quote Originally Posted by kero-kero View Post
    Insert "start" before TA : start "Translation Aggregator.exe" /b

    Unlike launtching ITH.exe, TA is kicked without "start".
    This means the batch file waits to terminate TA.
    Unfortunately, that didn't work. What happens is TA doesn't start, but in the command prompt I see this:
    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.
    All imouto, loli & kouhai reserved.


    D:\Translation Aggregator 0.4.9.r171\Translation Aggregator 0.4.9.r171>


    And stops right there. Window doesn't close either. I wonder if it has something to do with how TA has been coded.

  5. #4
    Senior Member kero-kero's Avatar
    Join Date
    Feb 2014
    Posts
    1,474
    Thanks
    0
    Thanked 444 Times in 293 Posts
    Points: 5,256, Level: 46
    Points: 5,256, Level: 46
    Overall activity: 3.0%
    Overall activity: 3.0%
    Achievements:
    1 year registeredThree Friends5000 Experience Points

    Re: Command Prompt Help

    Sorry for the incorrect information.
    Insert 'start ""' before TA : start "" "Translation Aggregator.exe" /b

    Without "", batch file treats "Translation Aggregator.exe" as a title (not a command).

  6. #5
    Senior Member lilygel's Avatar
    Join Date
    Feb 2014
    Posts
    103
    Thanks
    24
    Thanked 58 Times in 33 Posts
    Points: 1,473, Level: 21
    Points: 1,473, Level: 21
    Overall activity: 0%
    Overall activity: 0%
    Achievements:
    1000 Experience Points1 year registered

    Re: Command Prompt Help

    No issue there. I did enclose Translation Aggregator.exe in quotation marks.

    Anyway, after fiddling with it, I seem to have found a solution. I renamed the exe to TA.exe, so the line became start TA.exe. I also removed the /b parameter (it still works even with /b but it's totally unneeded so I removed it) and it's now working as I want it to. Launch ITH > timeout > launch TA > exit. However, I don't understand why renaming it made a difference. It's not like there was something wrong with the script.

    How does start "Translation Aggregator.exe" differ from start TA.exe? It's just beyond me.

  7. #6
    Senior Member kero-kero's Avatar
    Join Date
    Feb 2014
    Posts
    1,474
    Thanks
    0
    Thanked 444 Times in 293 Posts
    Points: 5,256, Level: 46
    Points: 5,256, Level: 46
    Overall activity: 3.0%
    Overall activity: 3.0%
    Achievements:
    1 year registeredThree Friends5000 Experience Points

    Re: Command Prompt Help

    If first argument of start command enclose double quotation, batch file treats the first argument as a window title.

    For example:
    start calc.exe
    -> open new command window, and execute calc command
    start "calc.exe"
    -> open new command window, and set the window title "calc.exe". (Non-execute calc.exe)

    This rule isn't matter if command name doesn't have space charactor like TA.exe.
    So renaming the command and removing double quotations, you've solved this problem.

  8. #7
    Senior Member lilygel's Avatar
    Join Date
    Feb 2014
    Posts
    103
    Thanks
    24
    Thanked 58 Times in 33 Posts
    Points: 1,473, Level: 21
    Points: 1,473, Level: 21
    Overall activity: 0%
    Overall activity: 0%
    Achievements:
    1000 Experience Points1 year registered

    Re: Command Prompt Help

    Oh-kay. That raises questions on the efficiency of the command in my mind, but I won't delve into that any longer. Thanks for explaining things for me. I might have to rely on your help again in the future. Hehe.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: November 9th, 2013, 02:33 PM
  2. Replies: 0
    Last Post: November 9th, 2013, 08:11 AM
  3. [US][FSN][WU] Oyome-san Kouho ga Arawareta! Command wa?
    By hd4share in forum Hentai CG Packs
    Replies: 0
    Last Post: July 9th, 2011, 07:26 AM

Bookmarks

Posting Permissions

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