Last active
January 15, 2026 15:34
-
-
Save awran5/cb167c12446ec26df686b3b9910a45c4 to your computer and use it in GitHub Desktop.
Add "Open with Antigravity" in Windows context menu.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| :: Automatically determines the program path based on the current user. | |
| set "APP_PATH=%LocalAppData%\Programs\Antigravity\Antigravity.exe" | |
| :: First, make sure the file exists. | |
| if not exist "%APP_PATH%" ( | |
| echo Error: Antigravity.exe not found in %APP_PATH% | |
| pause | |
| exit | |
| ) | |
| echo Adding Antigravity to Context Menu... | |
| :: 1. For Files (*) | |
| reg add "HKCR\*\shell\Antigravity" /ve /d "Open with Antigravity" /f | |
| reg add "HKCR\*\shell\Antigravity" /v "Icon" /d "\"%APP_PATH%\"" /f | |
| reg add "HKCR\*\shell\Antigravity\command" /ve /d "\"%APP_PATH%\" \"%%1\"" /f | |
| :: 2. For Folders (Directory) | |
| reg add "HKCR\Directory\shell\Antigravity" /ve /d "Open with Antigravity" /f | |
| reg add "HKCR\Directory\shell\Antigravity" /v "Icon" /d "\"%APP_PATH%\"" /f | |
| reg add "HKCR\Directory\shell\Antigravity\command" /ve /d "\"%APP_PATH%\" \"%%1\"" /f | |
| :: 3. For Background (Directory Background) - Using %V | |
| reg add "HKCR\Directory\Background\shell\Antigravity" /ve /d "Open with Antigravity" /f | |
| reg add "HKCR\Directory\Background\shell\Antigravity" /v "Icon" /d "\"%APP_PATH%\"" /f | |
| reg add "HKCR\Directory\Background\shell\Antigravity\command" /ve /d "\"%APP_PATH%\" \"%%V\"" /f | |
| echo Done! Right click on any file to test. | |
| pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment