A Windows taskbar shortcut can launch Claude Code without opening Claude Desktop: Anthropic’s claude -p command runs a prompt in non-interactive mode, returns a response, and exits. Anthropic-hosted use still requires Claude Code account access and an internet connection. Anthropic’s headless-mode guide explains the command’s behavior.

A shortcut can pair a saved prompt with a PowerShell script that calls the Claude Code command-line interface (CLI). That saves repeated setup for routine tasks, but the command flags matter: some replace Claude Code’s default instructions, while others limit tools.

How a taskbar shortcut fits together

A Windows shortcut can launch a PowerShell script, which can invoke Claude Code’s non-interactive claude -p or claude --print mode. The command prints a response and exits; text can also be piped into it through standard input, with a 10 MB limit, according to Anthropic’s headless-mode documentation.

In an article published October 12, 2026, Dibakar Ghosh described a personal Windows 11 setup using a PowerShell script and a separate, editable prompt file. Ghosh’s reported steps were to create a desktop shortcut, right-click it, choose Show more options > Pin to taskbar, and, optionally, select an ICO icon in Properties > Change Icon. His four examples were Proofreader, Reply, Explainer, and Fact Checker. Ghosh’s How-To Geek article describes his workflow and examples.

What the command-line options do

Anthropic’s CLI reference distinguishes prompt handling, customization, and tool permissions. Those distinctions can shape what a shortcut sends to Claude Code and what the CLI is allowed to do.

OptionDocumented behaviorPractical implication
-p or --printRuns Claude Code in non-interactive mode, returns a response, and exits.Use it when a script should make a call without opening an interactive session.
--system-prompt-fileReplaces the default system prompt with the file’s contents.Replacement also removes the default tool guidance, safety instructions, and coding conventions.
--append-system-prompt-fileAdds the file’s contents to the default system prompt.Use it when you want to add instructions while retaining Claude Code’s default guidance.
--safe-modeStarts with all customizations disabled.It affects all customizations, not just personal settings.
--toolsRestricts which built-in tools are available; --tools "" disables all built-in tools.A task that needs no tools can run with the built-in tools disabled.
--allowedToolsSpecifies tools that can run without permission prompts.This controls permission prompts; it is not the option for restricting the available tools.

These options have different jobs. In particular, Anthropic documents --tools as the restriction setting and --allowedTools as the permission-prompt setting. Anthropic also recommends an append option when the default Claude Code identity and guidance should remain. See the CLI reference for the option definitions.

Windows and account requirements

Anthropic lists native Windows 10 version 1809 or later and Windows Server 2019 or later among Claude Code’s supported environments. Its general requirements include at least 4 GB of RAM, an x64 or ARM64 processor, an internet connection, and a supported shell such as PowerShell or CMD. Anthropic’s setup guide also lists Bash and Zsh.

Claude Code requires access through a Pro, Max, Team, Enterprise, or Console account; Anthropic says the free claude.ai plan does not include Claude Code. Native Windows does not support sandboxing, while WSL 2 does and must be enabled to use that environment, according to the same setup guide.

Clipboard input and network data

The documented input paths differ by mode. Anthropic’s headless guide describes piping text into claude -p. Its interactive-mode guide documents Alt+V for pasting a clipboard image in Windows and WSL interactive sessions. Ghosh described his own PowerShell script as handling clipboard text or images; that account concerns his personal workflow. Anthropic’s interactive-mode guide describes the image shortcut, while the headless guide describes text input.

A taskbar icon does not make an Anthropic-hosted Claude Code request local. Anthropic says Claude Code sends prompts and model outputs over the network, encrypted in transit with TLS 1.2 or later. For consumer accounts, Anthropic says data may be used to improve future models when that setting is enabled; its stated retention is five years when enabled and 30 days when disabled. Anthropic’s data-usage documentation gives those account-specific terms.