Overview
After successfully installing Gemini CLI in Step 2/3, the installer proceeds to Step 3/3: creating a desktop shortcut for easy access. This page addresses issues related to shortcut creation and functionality.Warning: Shortcut Creation Failed
Problem Description
After the installer attempts to create the desktop shortcut, you see:Root Cause
The installer uses PowerShell with COM objects (WScript.Shell) to create a shortcut file. The creation may fail due to:- PowerShell execution policy restrictions
- Desktop folder access permissions
- Corrupted Windows COM registry
- User profile issues
gemini-cli-easy-installer-20250706.bat:105-112
Solutions
Solution 1: Manual Shortcut Creation
The most reliable solution is to create the shortcut manually:This manual shortcut is functionally identical to the one the installer attempts to create.
Solution 2: Run PowerShell Script Directly
Create the shortcut using a standalone PowerShell script:Solution 3: Check PowerShell Execution Policy
The installer uses-ExecutionPolicy Bypass to avoid policy restrictions, but underlying issues may still prevent execution.
Solution 4: Verify Desktop Path
If your Desktop folder is redirected or has unusual permissions:- Open File Explorer
- Navigate to the path shown
- Right-click → Properties → Security
- Ensure your user account has “Full control”
- If not, click Edit and grant permissions
Shortcut Launch Issues
Even if the shortcut is created successfully, it may not launch Gemini CLI properly.Issue: Shortcut Opens PowerShell But No Gemini Prompt
Symptoms:- Double-clicking the shortcut opens PowerShell
- PowerShell window stays open but doesn’t show Gemini CLI
- You see a standard PowerShell prompt instead of Gemini
gemini command is not being found by PowerShell. This usually means:
- The global npm directory is not in PATH
- Gemini CLI installation failed (see Gemini CLI Installation Troubleshooting)
Verify Gemini CLI is installed
In the PowerShell window that opened, run:If you get an error like:Gemini CLI is not properly installed. See Gemini CLI Installation Troubleshooting.
Issue: PowerShell Closes Immediately
Symptoms:- Double-clicking shortcut opens PowerShell briefly
- Window closes immediately
- No error message visible
-NoExit parameter may not be working, or PowerShell encounters an error before Gemini launches.
Solution:
Modify shortcut target
Right-click the shortcut → PropertiesIn the Target field, change to:Click OK.
Test the modified shortcut
Double-click the shortcut. You should now see “Starting Gemini CLI…” message before Gemini launches.
Alternative Launch Methods
If shortcut creation continues to fail, you can launch Gemini CLI using alternative methods:Method 1: Pin to Taskbar
Save to a permanent location
Save the file to:
C:\Program Files\Gemini CLI\Launch Gemini CLI.bat(Create the Gemini CLI folder if needed)Method 2: Use Windows Terminal Profile
If you use Windows Terminal:Configure profile
Set the following:
- Name: Gemini CLI
- Command line:
powershell.exe -NoExit -Command "gemini" - Starting directory:
%USERPROFILE% - Icon: (optional) Path to custom icon
Method 3: Quick Launch from Run Dialog
You can always launch Gemini CLI without a shortcut:- Press Win + R to open Run dialog
- Type:
powershell -NoExit -Command gemini - Press Enter
Consider creating a custom Run command alias for faster access. This requires registry editing - advanced users only.
Understanding the Shortcut Configuration
The installer creates a shortcut with these specific settings:| Property | Value | Purpose |
|---|---|---|
| Target | powershell.exe | Launches PowerShell |
| Arguments | -ExecutionPolicy Bypass -NoExit -Command "gemini" | Runs gemini command |
| Start in | %USERPROFILE% | Sets working directory to user home |
| Icon | powershell.exe,0 | Uses PowerShell icon |
| Description | ”Gemini CLI を起動します” | Tooltip text |
Why These Settings?
-ExecutionPolicy Bypass
-ExecutionPolicy Bypass
Allows PowerShell to run the gemini command without checking execution policies. This prevents “script execution disabled” errors.
-NoExit
-NoExit
Keeps the PowerShell window open after the gemini command completes. Without this, the window would close immediately if Gemini exits.
Working Directory = %USERPROFILE%
Working Directory = %USERPROFILE%
Sets the starting location to your user home directory (e.g.,
C:\Users\YourName). This ensures any files you create or reference are saved in a predictable location.Verification Steps
After creating the shortcut (manually or automatically), verify it works:Inspect shortcut properties
Right-click the shortcut → PropertiesVerify:
- Target type: Application
- Target location: Windows\System32\WindowsPowerShell\v1.0
- Target:
powershell.exe -ExecutionPolicy Bypass -NoExit -Command "gemini"
Additional Resources
When to Seek Further Help
The shortcut creation failure is usually a minor inconvenience rather than a critical error. However, seek additional help if:- None of the manual creation methods work
- Your user profile seems corrupted
- PowerShell execution is blocked by corporate policy
- Desktop folder permissions cannot be modified
Next Steps
Once you have a working shortcut (or alternative launch method):- Double-click to launch Gemini CLI
- Follow the setup wizard to configure theme and authentication
- Log in with your Google account
- Start using Gemini CLI