Hide Run Menu With Visual Basic Script

I’ve written an article about Manage Registry with Visual Basic Script and this time I want to modified the script to make it to manage Run menu. As you know Run menu is a great menu, with Run you may can go everywhere easier. So, I call it gateway. Yup it’s a gate to go every corner your computer.

So, if you want make your computer be more secure you can hide it when you leave your computer and show it again if you use the computer.

And if you edit it through Registry Editor, I think that’s not a efficient way. But if you want do to that just look here to get the trick. But if you want make it easier just write several script line but after write it you’ll get a shorter way to hide/show it.

  1. Open Notepad with click Start -> Run and then type notepad in box.
    Open notepad
  2. And type this script in notepad:
    write in notepad
  3. Dim otakatik
    ShowHideRun()
    Sub ShowHideRun()
    Set otakatik=WScript.CreateObject("WScript.Shell")
    describe="Type 0 or 1 : " & VbCrLf &_
    "[0] -> Show Run Menu." & VbCrLf &_
    "[1] -> Hide Run Menu."
    
    question=InputBox(describe, "Manage Run Menu",0)
    
    otakatik.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion" &_
    "\Policies\Explorer\NoRun",question,"REG_DWORD"
    
    If question=1 Then
    MsgBox "Run menu has hidden.",VbInformation, "Hide"
    Else
    If question=0 Then
    Msgbox "Run menu has shown",VbInformation, "Show"
    otakatik.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion" &_
    "\Policies\Explorer\NoRun"
    Else
    Msgbox "Input 0 or 1 only !",VbInformation, "Wrong Input"
    ShowHideRun()
    End If
    End If
    End Sub
  4. Save it with click File -> Save As menu and then give it file name: managerun.vbs (you may change it with your favorite name and don’t forget to change Save as type combo to All Files), choose your favorite folder then click OK button.
    save as
  5. Open the folder where the managerun.vbs was put.
    open managerun.vbs
  6. Double click the file, and Manage Run Menu window will opened.
    open managerun.vbs
  7. Give it value 0 to show your Run menu.
    0 to show
    0 to show
  8. Or give it value 1 to hide it.
    1 to show
  9. Restart your computer and try to click Start menu, if you was hid it so, Run menu will hid.
    Run has gone
  10. And if you try to press Windows key + R to force open Run menu, you’ll get a noticed message box.
    error message
  11. To show it again, just open your script and give it value 0.

(article no:0093)

2 Comments

pravieen  on June 29th, 2011

Run Block also not working
after run the vb script it’s asking the value to be entered 1 or 0, I gave 1 still I can Access run program so check me and help me to block it

luis del campo  on September 7th, 2011

nice job man!
thank you

Leave a Comment