Skip to content

Instantly share code, notes, and snippets.

@awran5
Last active August 9, 2026 13:42
Show Gist options
  • Select an option

  • Save awran5/cb167c12446ec26df686b3b9910a45c4 to your computer and use it in GitHub Desktop.

Select an option

Save awran5/cb167c12446ec26df686b3b9910a45c4 to your computer and use it in GitHub Desktop.
Add "Open with Antigravity" in Windows context menu.
@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
@memdufaizan

memdufaizan commented Jul 23, 2026

Copy link
Copy Markdown

For Antigravity IDE

@echo off
:: Automatically determines the program path based on the current user.
:: _C:\Users\x-poss\AppData\Local\Programs\Antigravity IDE - Set this path in following variable_
set "APP_PATH=%LocalAppData%\Programs\Antigravity IDE\Antigravity IDE.exe"

:: First, make sure the file exists.
if not exist "%APP_PATH%" (
    echo Error: Antigravity IDE.exe not found in %APP_PATH%
    pause
    exit
)

echo Adding Antigravity IDE to Context Menu...

:: 1. For Files (*)
reg add "HKCR\*\shell\Antigravity" /ve /d "Open with Antigravity IDE" /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 IDE" /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 IDE" /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