Overview
The installer automatically creates a convenient desktop shortcut named “Gemini CLI.lnk” that allows you to launch Gemini CLI with a single double-click. This shortcut is created during Step 3/3 of the installation process.Shortcut Creation
The installer creates the shortcut automatically (lines 105-109 of the batch file):You’ll see a confirmation message when the shortcut is created successfully:
Shortcut Location
The shortcut is placed on your desktop:YourUsername is your Windows username.
How to Use the Shortcut
Locate the Shortcut
Find the “Gemini CLI” shortcut icon on your desktop.Icon: The shortcut uses the PowerShell icon (blue/white design)
Double-Click to Launch
Double-click the shortcut to launch Gemini CLI.What happens:
- A new PowerShell window opens
- The window title is “Gemini CLI”
- The
geminicommand executes automatically - The window stays open for you to interact with Gemini CLI
Shortcut Properties
The desktop shortcut is configured with these properties:| Property | Value | Description |
|---|---|---|
| Target | powershell.exe | Launches PowerShell |
| Arguments | -ExecutionPolicy Bypass -NoExit -Command "gemini" | Runs gemini with bypass policy, keeps window open |
| Working Directory | %USERPROFILE% | Starts in your user profile folder (e.g., C:\Users\YourUsername) |
| Icon | powershell.exe,0 | Uses PowerShell’s default icon |
| Description | ”Launch Gemini CLI” | Tooltip when hovering over shortcut |
Technical Details
Execution Policy Bypass
The shortcut uses-ExecutionPolicy Bypass to ensure Gemini CLI can run without PowerShell script execution restrictions:
The
-ExecutionPolicy Bypass flag only applies to this specific PowerShell session and doesn’t change your system’s global execution policy.No Exit Flag
The-NoExit parameter keeps the PowerShell window open after the gemini command completes:
- Benefit: Allows you to continue using Gemini CLI
- Behavior: Window stays open even if the initial command finishes
- Closing: You must manually close the window when done
Working Directory
The shortcut starts in your user profile directory:- Any relative file paths you use will be relative to this directory
- You can easily change to another directory using
cdafter launch - This is a neutral starting location that works for most use cases
Customizing the Shortcut
You can customize the shortcut to better suit your needs:Change the Icon
Change the Working Directory
To start in a different folder:- Right-click the shortcut and select “Properties”
- Find the “Start in” field
- Change it to your preferred directory (e.g.,
C:\Projects) - Click “OK”
C:\Projects, set this as the working directory.
Add Custom Arguments
You can modify the shortcut to pass additional arguments to Gemini CLI:- Right-click the shortcut → Properties
- In the “Target” field, modify the arguments after
"gemini" - Example:
powershell.exe -ExecutionPolicy Bypass -NoExit -Command "gemini chat"
Troubleshooting the Shortcut
Shortcut Not Created
Symptom: No “Gemini CLI.lnk” file appears on desktop Possible causes:- PowerShell execution was blocked
- Insufficient permissions
- Desktop folder is redirected (corporate environment)
- Run the installer again as administrator
- Or manually create the shortcut:
- Right-click desktop → New → Shortcut
- Target:
powershell.exe -ExecutionPolicy Bypass -NoExit -Command "gemini" - Name: “Gemini CLI”
Shortcut Shows Error When Clicked
Symptom: Error message appears when double-clicking Common errors:- “‘gemini’ is not recognized as an internal or external command”
- Verify Node.js and Gemini CLI are installed:
- Restart your computer to refresh PATH environment variable
- Re-run the installer if components are missing
PowerShell Window Closes Immediately
Symptom: Window flashes briefly then closes Why this happens: This shouldn’t occur due to the-NoExit flag
Solution:
- Check the shortcut properties to ensure
-NoExitis present - If missing, edit the shortcut to add the
-NoExitparameter - The correct target should be:
Shortcut Works But Authentication Required Every Time
Symptom: Each launch prompts for authentication Cause: Authentication tokens not being saved properly Solution:- Ensure you complete the full authentication flow during first launch
- Check that your user profile directory is writable
- Verify antivirus isn’t blocking Gemini CLI from saving configuration
Moving or Copying the Shortcut
You can move the shortcut to other locations:Pin to Taskbar
- Right-click the desktop shortcut
- Select “Pin to taskbar”
- Access Gemini CLI from your taskbar
Copy to Start Menu
- Copy the shortcut
- Navigate to:
%APPDATA%\Microsoft\Windows\Start Menu\Programs - Paste the shortcut
- Access from Windows Start menu
Create Multiple Shortcuts
You can create multiple shortcuts with different configurations:- One for interactive mode
- One that starts directly in chat mode
- One that opens in a specific working directory
Alternative Launch Methods
Besides the desktop shortcut, you can also launch Gemini CLI:From Any PowerShell Window
Simply type:From Windows Run Dialog
- Press
Win + R - Type:
powershell -ExecutionPolicy Bypass -NoExit -Command "gemini" - Press Enter
From Command Prompt
The desktop shortcut is the easiest and recommended method for daily use. It saves you from typing the full command each time.
After Installation Message
The installer provides guidance about using the shortcut (lines 131-134):Best Practices
- Keep the shortcut on desktop for easy access
- Don’t modify the target unless you know what you’re doing
- Create copies if you need different configurations
- Pin to taskbar for even faster access
- Backup the shortcut when setting up a new computer
Shortcut Not Working After Windows Update
If the shortcut stops working after a Windows update:- Verify PowerShell still works: Press
Win + X→ “PowerShell” - Check if
geminicommand works in PowerShell - If not, re-run the installer to update Node.js and Gemini CLI
- The installer will recreate the shortcut with correct settings
Next Steps
Now that you understand the desktop shortcut:- Use it to launch Gemini CLI anytime
- Explore Gemini CLI commands and features
- Customize the shortcut to match your workflow
- Pin it to your taskbar for even quicker access