Results 1 to 20 of 20

Thread: Fixed Vista ICONS in System Tray

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Target Butt IronBits's Avatar
    Join Date
    Dec 2001
    Location
    Morrisville, NC
    Posts
    8,619

    Fixed Vista ICONS in System Tray

    I finally figured out away to control the ICON that is used when you start a client in Vista.
    Vista likes to use the last ICON it saw in the System Tray, don't know why, but that's what it does, so to make it use an icon you like, I run task manager first, then start the clients
    This also works in Windows XP 64bit to.

    I'll share my script that I use to run 8 cores, can be edited for less cores easily.

    @echo off
    start taskmgr.exe
    sleep 3
    start "NPLB-1" /D D:\dcprojects\NPLB\Port8000\NPLB1 /I /AFFINITY 1 cmd.exe /C llrnet.exe
    start "NPLB-2" /D D:\dcprojects\NPLB\Port8000\NPLB2 /I /AFFINITY 2 cmd.exe /C llrnet.exe
    start "NPLB-3" /D D:\dcprojects\NPLB\Port8000\NPLB3 /I /AFFINITY 4 cmd.exe /C llrnet.exe
    start "NPLB-4" /D D:\dcprojects\NPLB\Port8000\NPLB4 /I /AFFINITY 8 cmd.exe /C llrnet.exe
    start "NPLB-5" /D D:\dcprojects\NPLB\Port8000\NPLB5 /I /AFFINITY 10 cmd.exe /C llrnet.exe
    start "NPLB-6" /D D:\dcprojects\NPLB\Port8000\NPLB6 /I /AFFINITY 20 cmd.exe /C llrnet.exe
    start "NPLB-7" /D D:\dcprojects\NPLB\Port8000\NPLB7 /I /AFFINITY 40 cmd.exe /C llrnet.exe
    start "NPLB-8" /D D:\dcprojects\NPLB\Port8000\NPLB8 /I /AFFINITY 80 cmd.exe /C llrnet.exe
    taskkill /im taskmgr.exe

    By doing this, I get 8 task manager icons in the System Tray.
    I also spend the few minutes to change the window size for each one, drag it where I want it, then save it. (you only have to do this once)
    75 wide 8 tall - allows me to fit them all on the screen 1280x1024, one on top of the other.
    If you use grouping, you can minimize the group, or, close the group to terminate them.

  2. #2
    What does the "/I" do in this line?
    Quote Originally Posted by IronBits View Post
    start "NPLB-1" /D D:\dcprojects\NPLB\Port8000\NPLB1 /I /AFFINITY 1 cmd.exe /C llrnet.exe

  3. #3
    Target Butt IronBits's Avatar
    Join Date
    Dec 2001
    Location
    Morrisville, NC
    Posts
    8,619
    The new environment will be the original environment passed to the cmd.exe and not the current environment.

    PHP Code:
    start /?

    Starts a separate window to run a specified program or command.

    START ["title"] [/D path] [/i] [/MIN] [/MAX] [/SEPARATE | /SHARED]
          [/
    LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
          [/
    AFFINITY <hex affinity>] [/WAIT] [/b] [command/program]
          [
    parameters]

        
    "title"     Title to display in  window title bar.
        
    path        Starting directory
        B           Start application without creating a 
    new windowThe
                    application has 
    ^C handling ignoredUnless the application
                    enables 
    ^C processing, ^Break is the only way to interrupt
                    the application
        I           The 
    new environment will be the original environment passed
                    to the cmd
    .exe and not the current environment.
        
    MIN         Start window minimized
        MAX         Start window maximized
        SEPARATE    Start 16
    -bit Windows program in separate memory space
        SHARED      Start 16
    -bit Windows program in shared memory space
        LOW         Start application in the IDLE priority 
    class
        
    NORMAL      Start application in the NORMAL priority class
        
    HIGH        Start application in the HIGH priority class
        
    REALTIME    Start application in the REALTIME priority class
        
    ABOVENORMAL Start application in the ABOVENORMAL priority class
        
    BELOWNORMAL Start application in the BELOWNORMAL priority class
        
    AFFINITY    The new application will have the specified processor
                    affinity mask
    expressed as a hexadecimal number.
        
    WAIT        Start application and wait for it to terminate
        command
    /program
                    
    If it is an internal cmd command or a batch file then
                    the command processor is run with the 
    /switch to cmd.exe.
                    
    This means that the window will remain after the command
                    has been run
    .

                    If 
    it is not an internal cmd command or batch file then
                    it is a program 
    and will run as either a windowed application
                    
    or a console application.

        
    parameters  These are the parameters passed to the command/program

    NOTE
    The SEPERATE and SHARED options are not supported on 64-bit platforms.

    If 
    Command Extensions are enabledexternal command invocation
    through the command line 
    or the START command changes as follows:

    non-executable files may be invoked through their file association just
        by typing the name of the file 
    as a command.  (e.g.  WORD.DOC would
        launch the application associated with the 
    .DOC file extension).
        
    See the ASSOC and FTYPE commands for how to create these
        associations from within a command script
    .

    When executing an application that is a 32-bit GUI applicationCMD.EXE
        does not wait 
    for the application to terminate before returning to
        the command prompt
    .  This new behavior does NOT occur if executing
        within a command script
    .

    When executing a command line whose first token is the string "CMD "
        
    without an extension or path qualifierthen "CMD" is replaced with
        the value of the COMSPEC variable
    .  This prevents picking up CMD.EXE
        from the current directory
    .

    When executing a command line whose first token does NOT contain an
        extension
    then CMD.EXE uses the value of the PATHEXT
        environment variable to determine which extensions to look 
    for
        and 
    in what order.  The default value for the PATHEXT variable
        is
    :

            .
    COM;.EXE;.BAT;.CMD

        Notice the syntax is the same 
    as the PATH variablewith
        semicolons separating the different elements
    .

    When searching for an executable, if there is no match on any extension,
    then looks to see if the name matches a directory name.  If it doesthe
    START command launches the Explorer on that path
    .  If done from the
    command line
    it is the equivalent to doing a CD /D to that path
    If you have spaces in your directory structure, then something like this should work for you to
    start "NPLB-1" /D "C:\NPLB\Port 8000\NPLB1" /I /AFFINITY 1 cmd.exe /C llrnet.exe

    If you want to start it minimized you can use this
    start "NPLB-1" /D "C:\NPLB\Port 8000\NPLB1" /I /MIN /AFFINITY 1 cmd.exe /C llrnet.exe

    /AFFINITY only works with Vista 64bit or Windows XP 64bit.

    To run it on 32bit windows/Vista, you should use something like this
    start "NPLB-1" /D "C:\NPLB\Port 8000\NPLB1" /I /MIN cmd.exe /C llrnet.exe

  4. #4

  5. #5
    Are you using Affinity 1, 2, 4, 8 because of the hypthreading on your core i7 or what would us regular Core2 people be using for a quad-core?

  6. #6
    Target Butt IronBits's Avatar
    Join Date
    Dec 2001
    Location
    Morrisville, NC
    Posts
    8,619

    Setting Affinity for Vista 64bit and Windows XP 64bit

    Cores are cpus to the OS, HT is done by the cpu to fool the OS into seeing more than there really is.
    If you have 8 real cores or 4 real cores + 4 HT cores, they both have 8 CPUs to the OS.
    Use as many of the lines you need to match the cores the OS finds.

    2 cores worth
    start "NPLB-1" /D D:\dcprojects\NPLB\Port8000\NPLB1 /I /AFFINITY 1 cmd.exe /C llrnet.exe
    start "NPLB-2" /D D:\dcprojects\NPLB\Port8000\NPLB2 /I /AFFINITY 2 cmd.exe /C llrnet.exe

    4 cores worth
    start "NPLB-1" /D D:\dcprojects\NPLB\Port8000\NPLB1 /I /AFFINITY 1 cmd.exe /C llrnet.exe
    start "NPLB-2" /D D:\dcprojects\NPLB\Port8000\NPLB2 /I /AFFINITY 2 cmd.exe /C llrnet.exe
    start "NPLB-3" /D D:\dcprojects\NPLB\Port8000\NPLB3 /I /AFFINITY 4 cmd.exe /C llrnet.exe
    start "NPLB-4" /D D:\dcprojects\NPLB\Port8000\NPLB4 /I /AFFINITY 8 cmd.exe /C llrnet.exe

    6 cores worth
    start "NPLB-1" /D D:\dcprojects\NPLB\Port8000\NPLB1 /I /AFFINITY 1 cmd.exe /C llrnet.exe
    start "NPLB-2" /D D:\dcprojects\NPLB\Port8000\NPLB2 /I /AFFINITY 2 cmd.exe /C llrnet.exe
    start "NPLB-3" /D D:\dcprojects\NPLB\Port8000\NPLB3 /I /AFFINITY 4 cmd.exe /C llrnet.exe
    start "NPLB-4" /D D:\dcprojects\NPLB\Port8000\NPLB4 /I /AFFINITY 8 cmd.exe /C llrnet.exe
    start "NPLB-5" /D D:\dcprojects\NPLB\Port8000\NPLB5 /I /AFFINITY 10 cmd.exe /C llrnet.exe
    start "NPLB-6" /D D:\dcprojects\NPLB\Port8000\NPLB6 /I /AFFINITY 20 cmd.exe /C llrnet.exe

    8 cores worth
    start "NPLB-1" /D D:\dcprojects\NPLB\Port8000\NPLB1 /I /AFFINITY 1 cmd.exe /C llrnet.exe
    start "NPLB-2" /D D:\dcprojects\NPLB\Port8000\NPLB2 /I /AFFINITY 2 cmd.exe /C llrnet.exe
    start "NPLB-3" /D D:\dcprojects\NPLB\Port8000\NPLB3 /I /AFFINITY 4 cmd.exe /C llrnet.exe
    start "NPLB-4" /D D:\dcprojects\NPLB\Port8000\NPLB4 /I /AFFINITY 8 cmd.exe /C llrnet.exe
    start "NPLB-5" /D D:\dcprojects\NPLB\Port8000\NPLB5 /I /AFFINITY 10 cmd.exe /C llrnet.exe
    start "NPLB-6" /D D:\dcprojects\NPLB\Port8000\NPLB6 /I /AFFINITY 20 cmd.exe /C llrnet.exe
    start "NPLB-7" /D D:\dcprojects\NPLB\Port8000\NPLB7 /I /AFFINITY 40 cmd.exe /C llrnet.exe
    start "NPLB-8" /D D:\dcprojects\NPLB\Port8000\NPLB8 /I /AFFINITY 80 cmd.exe /C llrnet.exe

Posting Permissions

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