Auto-commit: 2025-10-31 08:58:35
This commit is contained in:
24
Windows-PinShortcut-StartMenu/pinshortcut.vbs
Normal file
24
Windows-PinShortcut-StartMenu/pinshortcut.vbs
Normal file
@@ -0,0 +1,24 @@
|
||||
Const CSIDL_COMMON_PROGRAMS = &H17
|
||||
Const CSIDL_PROGRAMS = &H2
|
||||
Set FSO = CreateObject("Scripting.FileSystemObject")
|
||||
Set Shell = CreateObject("WScript.Shell")
|
||||
|
||||
Dim Destination
|
||||
Destination = Shell.ExpandEnvironmentStrings(("%APPDATA%") & "\Microsoft\Internet Explorer\Quick Launch\User Pinned\StartMenu\Mozilla Firefox.lnk")
|
||||
If FSO.FileExists(Destination) = True Then
|
||||
FSO.DeleteFile Destination
|
||||
Else
|
||||
On Error Resume Next
|
||||
End If
|
||||
|
||||
Set objShell = CreateObject("Shell.Application")
|
||||
Set objAllUsersProgramsFolder = objShell.NameSpace("C:\ProgramData\Microsoft\Windows\Start Menu")
|
||||
strAllUsersProgramsPath = objAllUsersProgramsFolder.Self.Path
|
||||
Set objFolder = objShell.Namespace(strAllUsersProgramsPath)
|
||||
Set objFolderItem = objFolder.ParseName("Mozilla Firefox.lnk")
|
||||
Set colVerbs = objFolderItem.Verbs
|
||||
For Each objVerb in colVerbs
|
||||
If InStr(UCase(objVerb.Name), "MENU") <> 0 And InStr(UCase(objVerb.Name), "MARRER") <> 0 Then
|
||||
objVerb.DoIt
|
||||
End If
|
||||
Next
|
||||
12
Windows-PinShortcut-StartMenu/readme.md
Normal file
12
Windows-PinShortcut-StartMenu/readme.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# 📌 Pin Firefox to Start Menu (VBScript)
|
||||
|
||||
## 🔧 What it does
|
||||
- Removes any existing **pinned Start Menu** shortcut for Firefox from the current user.
|
||||
- Uses Windows Shell verbs to **pin “Mozilla Firefox.lnk”** to the **Start Menu** (All Users Start Menu folder).
|
||||
|
||||
## ✅ Prerequisites
|
||||
- Firefox installed and a shortcut named **`Mozilla Firefox.lnk`** present in
|
||||
`C:\ProgramData\Microsoft\Windows\Start Menu`
|
||||
- Run under the **target user profile** (affects that user’s Start pins).
|
||||
- Works on **French Windows** (relies on shell verb text e.g., “Épingler au menu Démarrer”).
|
||||
For other languages, adjust the verb matching in the script.
|
||||
Reference in New Issue
Block a user