How can I use a bat/vbs file to pop up a message just above the notification area?












1















CreateObject("WScript.Shell").PopUp "The CPU is hot.", 5


The above is used in a vbs file. The message box will appear in the center of the screen.

Is it possible to make it appear just above the notification area?










share|improve this question

























  • Please note that superuser.com is not a free script/code writing service. If you tell us what you have tried so far (include the scripts/code you are already using) and where you are stuck then we can try to help with specific problems. You should also read How do I ask a good question?.

    – DavidPostill
    Nov 21 '16 at 18:09











  • You haven't included pop-up_message.vbs :/

    – DavidPostill
    Nov 22 '16 at 10:51











  • I'm not going to download some unknown code from dropbox. Questions should be self-contained. Please edit and add it to the question.

    – DavidPostill
    Nov 22 '16 at 11:34






  • 1





    No it's not. Questions should be self-contained.

    – DavidPostill
    Nov 22 '16 at 11:41






  • 1





    No cmd/vbscript but powershell can show a notification balloontip works nicely in Win10

    – LotPings
    Nov 23 '16 at 21:48
















1















CreateObject("WScript.Shell").PopUp "The CPU is hot.", 5


The above is used in a vbs file. The message box will appear in the center of the screen.

Is it possible to make it appear just above the notification area?










share|improve this question

























  • Please note that superuser.com is not a free script/code writing service. If you tell us what you have tried so far (include the scripts/code you are already using) and where you are stuck then we can try to help with specific problems. You should also read How do I ask a good question?.

    – DavidPostill
    Nov 21 '16 at 18:09











  • You haven't included pop-up_message.vbs :/

    – DavidPostill
    Nov 22 '16 at 10:51











  • I'm not going to download some unknown code from dropbox. Questions should be self-contained. Please edit and add it to the question.

    – DavidPostill
    Nov 22 '16 at 11:34






  • 1





    No it's not. Questions should be self-contained.

    – DavidPostill
    Nov 22 '16 at 11:41






  • 1





    No cmd/vbscript but powershell can show a notification balloontip works nicely in Win10

    – LotPings
    Nov 23 '16 at 21:48














1












1








1


1






CreateObject("WScript.Shell").PopUp "The CPU is hot.", 5


The above is used in a vbs file. The message box will appear in the center of the screen.

Is it possible to make it appear just above the notification area?










share|improve this question
















CreateObject("WScript.Shell").PopUp "The CPU is hot.", 5


The above is used in a vbs file. The message box will appear in the center of the screen.

Is it possible to make it appear just above the notification area?







windows-10 batch-file vbscript popups code






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 23 '16 at 6:13







Matthew Wai

















asked Nov 21 '16 at 11:05









Matthew WaiMatthew Wai

3211418




3211418













  • Please note that superuser.com is not a free script/code writing service. If you tell us what you have tried so far (include the scripts/code you are already using) and where you are stuck then we can try to help with specific problems. You should also read How do I ask a good question?.

    – DavidPostill
    Nov 21 '16 at 18:09











  • You haven't included pop-up_message.vbs :/

    – DavidPostill
    Nov 22 '16 at 10:51











  • I'm not going to download some unknown code from dropbox. Questions should be self-contained. Please edit and add it to the question.

    – DavidPostill
    Nov 22 '16 at 11:34






  • 1





    No it's not. Questions should be self-contained.

    – DavidPostill
    Nov 22 '16 at 11:41






  • 1





    No cmd/vbscript but powershell can show a notification balloontip works nicely in Win10

    – LotPings
    Nov 23 '16 at 21:48



















  • Please note that superuser.com is not a free script/code writing service. If you tell us what you have tried so far (include the scripts/code you are already using) and where you are stuck then we can try to help with specific problems. You should also read How do I ask a good question?.

    – DavidPostill
    Nov 21 '16 at 18:09











  • You haven't included pop-up_message.vbs :/

    – DavidPostill
    Nov 22 '16 at 10:51











  • I'm not going to download some unknown code from dropbox. Questions should be self-contained. Please edit and add it to the question.

    – DavidPostill
    Nov 22 '16 at 11:34






  • 1





    No it's not. Questions should be self-contained.

    – DavidPostill
    Nov 22 '16 at 11:41






  • 1





    No cmd/vbscript but powershell can show a notification balloontip works nicely in Win10

    – LotPings
    Nov 23 '16 at 21:48

















Please note that superuser.com is not a free script/code writing service. If you tell us what you have tried so far (include the scripts/code you are already using) and where you are stuck then we can try to help with specific problems. You should also read How do I ask a good question?.

– DavidPostill
Nov 21 '16 at 18:09





Please note that superuser.com is not a free script/code writing service. If you tell us what you have tried so far (include the scripts/code you are already using) and where you are stuck then we can try to help with specific problems. You should also read How do I ask a good question?.

– DavidPostill
Nov 21 '16 at 18:09













You haven't included pop-up_message.vbs :/

– DavidPostill
Nov 22 '16 at 10:51





You haven't included pop-up_message.vbs :/

– DavidPostill
Nov 22 '16 at 10:51













I'm not going to download some unknown code from dropbox. Questions should be self-contained. Please edit and add it to the question.

– DavidPostill
Nov 22 '16 at 11:34





I'm not going to download some unknown code from dropbox. Questions should be self-contained. Please edit and add it to the question.

– DavidPostill
Nov 22 '16 at 11:34




1




1





No it's not. Questions should be self-contained.

– DavidPostill
Nov 22 '16 at 11:41





No it's not. Questions should be self-contained.

– DavidPostill
Nov 22 '16 at 11:41




1




1





No cmd/vbscript but powershell can show a notification balloontip works nicely in Win10

– LotPings
Nov 23 '16 at 21:48





No cmd/vbscript but powershell can show a notification balloontip works nicely in Win10

– LotPings
Nov 23 '16 at 21:48










1 Answer
1






active

oldest

votes


















1














By googling, I found the following way to display a balloon tip:



[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$objNotifyIcon = New-Object System.Windows.Forms.NotifyIcon
$objNotifyIcon.Icon = "D:folderimage.ico"
$objNotifyIcon.BalloonTipIcon = "None"
$objNotifyIcon.BalloonTipText = "The CPU is hot!"
$objNotifyIcon.BalloonTipTitle = "Warning"
$objNotifyIcon.Visible = $True
$objNotifyIcon.ShowBalloonTip(10000)


Save the above in a .ps1 file and use the following in a .bat file to run the .ps1 file.



powershell -executionpolicy bypass -file "D:folderBalloonTip.ps1"
PING -n 10 LOCALHOST
"D:folderNoTrayOrphans.exe"


The .bat file can be run without a command window via the following code in a .vbs file:



Set WshShell = CreateObject("WScript.Shell") 
WshShell.Run chr(34) & "D:folderBalloonTip.bat" & Chr(34), 0
Set WshShell = Nothing





share|improve this answer

























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1148113%2fhow-can-i-use-a-bat-vbs-file-to-pop-up-a-message-just-above-the-notification-are%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    By googling, I found the following way to display a balloon tip:



    [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
    $objNotifyIcon = New-Object System.Windows.Forms.NotifyIcon
    $objNotifyIcon.Icon = "D:folderimage.ico"
    $objNotifyIcon.BalloonTipIcon = "None"
    $objNotifyIcon.BalloonTipText = "The CPU is hot!"
    $objNotifyIcon.BalloonTipTitle = "Warning"
    $objNotifyIcon.Visible = $True
    $objNotifyIcon.ShowBalloonTip(10000)


    Save the above in a .ps1 file and use the following in a .bat file to run the .ps1 file.



    powershell -executionpolicy bypass -file "D:folderBalloonTip.ps1"
    PING -n 10 LOCALHOST
    "D:folderNoTrayOrphans.exe"


    The .bat file can be run without a command window via the following code in a .vbs file:



    Set WshShell = CreateObject("WScript.Shell") 
    WshShell.Run chr(34) & "D:folderBalloonTip.bat" & Chr(34), 0
    Set WshShell = Nothing





    share|improve this answer






























      1














      By googling, I found the following way to display a balloon tip:



      [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
      $objNotifyIcon = New-Object System.Windows.Forms.NotifyIcon
      $objNotifyIcon.Icon = "D:folderimage.ico"
      $objNotifyIcon.BalloonTipIcon = "None"
      $objNotifyIcon.BalloonTipText = "The CPU is hot!"
      $objNotifyIcon.BalloonTipTitle = "Warning"
      $objNotifyIcon.Visible = $True
      $objNotifyIcon.ShowBalloonTip(10000)


      Save the above in a .ps1 file and use the following in a .bat file to run the .ps1 file.



      powershell -executionpolicy bypass -file "D:folderBalloonTip.ps1"
      PING -n 10 LOCALHOST
      "D:folderNoTrayOrphans.exe"


      The .bat file can be run without a command window via the following code in a .vbs file:



      Set WshShell = CreateObject("WScript.Shell") 
      WshShell.Run chr(34) & "D:folderBalloonTip.bat" & Chr(34), 0
      Set WshShell = Nothing





      share|improve this answer




























        1












        1








        1







        By googling, I found the following way to display a balloon tip:



        [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
        $objNotifyIcon = New-Object System.Windows.Forms.NotifyIcon
        $objNotifyIcon.Icon = "D:folderimage.ico"
        $objNotifyIcon.BalloonTipIcon = "None"
        $objNotifyIcon.BalloonTipText = "The CPU is hot!"
        $objNotifyIcon.BalloonTipTitle = "Warning"
        $objNotifyIcon.Visible = $True
        $objNotifyIcon.ShowBalloonTip(10000)


        Save the above in a .ps1 file and use the following in a .bat file to run the .ps1 file.



        powershell -executionpolicy bypass -file "D:folderBalloonTip.ps1"
        PING -n 10 LOCALHOST
        "D:folderNoTrayOrphans.exe"


        The .bat file can be run without a command window via the following code in a .vbs file:



        Set WshShell = CreateObject("WScript.Shell") 
        WshShell.Run chr(34) & "D:folderBalloonTip.bat" & Chr(34), 0
        Set WshShell = Nothing





        share|improve this answer















        By googling, I found the following way to display a balloon tip:



        [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
        $objNotifyIcon = New-Object System.Windows.Forms.NotifyIcon
        $objNotifyIcon.Icon = "D:folderimage.ico"
        $objNotifyIcon.BalloonTipIcon = "None"
        $objNotifyIcon.BalloonTipText = "The CPU is hot!"
        $objNotifyIcon.BalloonTipTitle = "Warning"
        $objNotifyIcon.Visible = $True
        $objNotifyIcon.ShowBalloonTip(10000)


        Save the above in a .ps1 file and use the following in a .bat file to run the .ps1 file.



        powershell -executionpolicy bypass -file "D:folderBalloonTip.ps1"
        PING -n 10 LOCALHOST
        "D:folderNoTrayOrphans.exe"


        The .bat file can be run without a command window via the following code in a .vbs file:



        Set WshShell = CreateObject("WScript.Shell") 
        WshShell.Run chr(34) & "D:folderBalloonTip.bat" & Chr(34), 0
        Set WshShell = Nothing






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 27 '16 at 15:56

























        answered Nov 27 '16 at 15:50









        Matthew WaiMatthew Wai

        3211418




        3211418






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1148113%2fhow-can-i-use-a-bat-vbs-file-to-pop-up-a-message-just-above-the-notification-are%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Probability when a professor distributes a quiz and homework assignment to a class of n students.

            Aardman Animations

            Are they similar matrix