1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Close the one note tray icon automatically when one note is closed

Discussion in 'Business Applications' started by new tech guy, Aug 21, 2008.

Thread Status:
Not open for further replies.
Advertisement
  1. new tech guy

    new tech guy Thread Starter

    Joined:
    Mar 27, 2006
    Messages:
    5,178
    Hello folks, simple question here,
    I have one note 2007 installed on my pc and want to just make a small tweak to it that is a nuicannce in my opinion more than an atcual problem. What i want to do is when onenote closes (meaning the main application) i want to have its tray application close itself. Trust me, it is useful and i have been reviewing this application and like it for starting college but find it annoying how i have the tray application open even when the program is closed. If someone could tell me how to do this it would be appreciated. And i do know about disabling the icon but i dont want to do that as the tray application i find has plenty of usefull features.
     
  2. Elvandil

    Elvandil

    Joined:
    Aug 1, 2003
    Messages:
    51,988
    Check its options. Usually applications that do that have a "Close to tray" setting.
     
  3. Courtneyc

    Courtneyc

    Joined:
    Dec 6, 2003
    Messages:
    1,906
    Open OneNote, Tools, Options, Other. Uncheck the first checkbox.

    Courtney
     
  4. new tech guy

    new tech guy Thread Starter

    Joined:
    Mar 27, 2006
    Messages:
    5,178
    I really dont see anything in the options, just really want its service to stop when the application is closed so that i lose the tray. In other words, i want the icon in the tray when its there like it is but when i close onenote down i want the tray gone too. Is there anyway i can maybe make my own addon for it that will kill the tray process with say, a batch script?
     
  5. new tech guy

    new tech guy Thread Starter

    Joined:
    Mar 27, 2006
    Messages:
    5,178
    That works to remove it fine, but i want the icon there only when running though.
     
  6. new tech guy

    new tech guy Thread Starter

    Joined:
    Mar 27, 2006
    Messages:
    5,178
    Maybe a way i could use a script to do this that will check and then i can tell the script that when the application closes to kill the process? That will eliminate the icon. If it helps the process is called ONENOTEM.EXE .
     
  7. new tech guy

    new tech guy Thread Starter

    Joined:
    Mar 27, 2006
    Messages:
    5,178
    UPDATE: I think i figured this out, what i am doing is tieing a script to the exit button in microsoft onenote and making a custom launcher to force the application to do what i want it to. Once i work out the bugs in the code and have it written i will post the code and give setup instructions.
     
  8. new tech guy

    new tech guy Thread Starter

    Joined:
    Mar 27, 2006
    Messages:
    5,178
    Ok folks, the code works, only problem (dont know if this is true in vista or not) but you get security warnings from the application, you atcually get two warnings. Both from office if anyone knows how to turn off the "hyperlink" alerts for customizing buttons please let me know.
     
  9. new tech guy

    new tech guy Thread Starter

    Joined:
    Mar 27, 2006
    Messages:
    5,178
    bump...anyone?
     
  10. caraewilton

    caraewilton

    Joined:
    Nov 7, 2007
    Messages:
    1,349
    Hi. I have onenote 2007 on my vista pc. Somehow I managed to set things up so the tray option closes itself when I close the program. I definitely achieved this without writing any scripts but sadly I can not remember what I did:( I installed the program in December.
     
  11. new tech guy

    new tech guy Thread Starter

    Joined:
    Mar 27, 2006
    Messages:
    5,178
    And the icon would reappear when onenote is started?
     
  12. new tech guy

    new tech guy Thread Starter

    Joined:
    Mar 27, 2006
    Messages:
    5,178
    Ok folks, i have not figured out the security warning stuff yet but figure i could post the code so one could possibly try it and see what im talking about. So here is the code used to launch onenote (because when the process for the tray is killed it will not restart itself with onenote, therefore i had to build a custom launcher):

    Code:
    @echo off
    cd "C:\Program Files\Microsoft Office\office12"
    start ONENOTEM.EXE
    ping -n 5 127.0.0.1 >nul
    taskkill /im onenote.exe >nul
    start ONENOTE.EXE
    exit
    
    This batch assumes you have onenote installed in its default location. You can place the file anywhere but if office is installed anywhere else but the default, go ahead and change the cd line accordingly. The ping line is acting as a delay timer to give the onenote tray a chance to start, it especially needs this after booting and running for the first time after the session start. Your mileage may vary again so if your system is a bit slower and needs more time, all you would need to do is change the number 5 in the 3rd line with whatever seems to work for you.

    This is the achilles heel in the equation, shutting down one note. The code works flawlessly, just has the microsoft office security warnings because it somehow thinks its the end of the world because i link the exit button to a batch file. In any case, here is the code:
    Code:
    @echo off
    echo Shutting down onenote...
    taskkill /im onenotem.exe >nul
    taskkill /im onenote.exe >nul
    exit
    
    To add the batch to the exit buttom instead of the standard exit command, open onenote and you go to tools>customize. Then click the rearrange commands button. Then scroll to your exit button (this is in the file menu, you will need to set the other exit buttons you have in other menus too) then click modify>edit hyperlink>open. Then select the shutdown batch (again can be anywhere in the system and is file location independent). Then if you click exit, ok through the security warnings (which are what im trying to eliminate and it will shut down onenote and take the tray with it.


    In my batch, i went ahead for my startup and disguised it in the office folder to look like the real onenote icon using a shortcut to the batch.
     
  13. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/742362