Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

.vbs MsgBox help

Featured Replies

Here my script so far

x=MsgBox("Run New Process Notifier",vbYesNo+vbDefaultButton2, "New Process Notifier")

Its a simple msgbox with yes or no, How do i add commands to the answer?

I would like no to just exit and yes to start/open a app.

Please advise.

Cheers, James

Take a look at this example:

Sub Append
Dim Answer
Answer = MsgBox("Do you want to calculate?",1,"calculate")
If Answer = 1 Then
objshell.run("calc.exe"),0
Else
Exit Sub
End If
End Sub

So you need to determine what all the return values are and put them in the else if you want something "else" to happen if you click Cancel.

  • Author

Im running this straight from the .vbs off my desktop, would this make a difference??

Cheers, James

Or another way of doing it, with code only for yes


If MsgBox( _
"Would You Like To Open Notepad?",4132,"Yes No Notepad") = 6 Then
CreateObject("Wscript.Shell").Run("Notepad"),1,False
End If

Msgbox with a timer to close after 5 seconds with code only for yes


Dim Act :Set Act = CreateObject("Wscript.Shell")
If Act.Popup( _
"Would You Like To Open Notepad?" & vbCrLf & _
"If Nothing Is Selected In Five" & vbCrLf & _
"Seconds This Dialog Will Close", 5,"Yes No Self Close", 4132) = 6 Then
Act.Run("Notepad"),1,False
End If

  • Author

Yea thats working great!!!

I stead of opening 'Notepad' how can i change it???

If MsgBox( _
"Run New Process Notifier?",4132,"New Process Notifier") = 6 Then
CreateObject("Wscript.Shell").Run("C:\Program Files\New Process Notifier\NewProcessNotifier.exe"),1,False
End If

The above is not working.

Cheers, James

EDIT- So now ive got the app opening with 'yes' because i put the .vbs in the same folder as the app [school boy error]

Msgbox.jpg

With this code

If MsgBox( _
"Run New Process Notifier?",4132,"New Process Notifier") = 6 Then
CreateObject("Wscript.Shell").Run("NewProcessNotifier"),1,False
End If

As you can see from the picture ive got a 'startup.reg' file thats adds the .vbs file to windows startup [this is done with winrar sfx], the only thing is when windows startsup the box comes up which is great but the .vbs finds an error

MsgboxError.jpg

If i go and run the .vbs file everything works great, Just cant get my head round why when it start from startup it fails its the same file that opens!!! Ahh

Cheers, James

Edited by jamesbebby

I thnk the problem is you need a full path to app and it full name

Run("NewProcessNotifier")

This might work

Run("DriveLetter\FolderName\NewProcessNotifier.exe")

This only ways this would work if the app in \Windows Folder Or \Windows\System32 folder

Run("Notepad")

Or the VBS file is in the same location as the app.

  • Author

This is not working.....

If MsgBox( _
"Run New Process Notifier?",4132,"New Process Notifier") = 6 Then
CreateObject("Wscript.Shell").Run("C:\Program Files\New Process Notifier\NewProcessNotifier.exe"),1,False
End If

Cheers, James

Try this:

If MsgBox( _
"Run New Process Notifier?",4132,"New Process Notifier") = 6 Then
CreateObject("Wscript.Shell").Run("""C:\Program Files\New Process Notifier\NewProcessNotifier.exe"""),1,False
End If

Spaces in the path/file names require additional quotes.

  • Author

Try this:

If MsgBox( _
"Run New Process Notifier?",4132,"New Process Notifier") = 6 Then
CreateObject("Wscript.Shell").Run("""C:\Program Files\New Process Notifier\NewProcessNotifier.exe"""),1,False
End If

Spaces in the path/file names require additional quotes.

You have just live up to your name 'Scr1ptW1zard'!!! [with-me anyway lol]

Thanks, James

Edited by jamesbebby

As a result of the formatting error on the above post, I thought I'd post it again, this time concatenating the line which required it.

If MsgBox("Run New Process Notifier?",4132,"New Process Notifier") = 6 Then
CreateObject("Wscript.Shell").Run(Chr(34) & "C:\Program Files\" & _
"New Process Notifier\NewProcessNotifier.exe" & Chr(34)),1,False
End If

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.