diff --git a/docs/user-manual/en/1-getting-started/1.2-installation.md b/docs/user-manual/en/1-getting-started/1.2-installation.md index c4068e3e5..9062adafb 100644 --- a/docs/user-manual/en/1-getting-started/1.2-installation.md +++ b/docs/user-manual/en/1-getting-started/1.2-installation.md @@ -53,6 +53,14 @@ Installing with npm requires Node.js. Each tool requires a different version (fo 2. Double-click to run the installer 3. Follow the prompts to complete installation +The installation directory page includes a **Create a desktop shortcut** option. Clear it to skip desktop shortcut creation; you can still launch the app from the Start menu. It is selected by default on a fresh install. Upgrades preserve whether the desktop shortcut exists, so a deleted shortcut is not recreated automatically. You can also clear the option during an upgrade to remove an existing desktop shortcut. If the desktop shortcut cannot be created (for example, the Desktop folder is read-only or blocked by security software), the installer skips it and finishes the installation instead of failing or rolling back. + +For a silent installation, pass `CREATEDESKTOPSHORTCUT=0` to skip desktop shortcut creation: + +```powershell +msiexec /i "CC-Switch-v{version}-Windows.msi" /qn CREATEDESKTOPSHORTCUT=0 +``` + Note: If nothing happens when you run the installer, right-click the file, choose `Properties`, and on the `General` tab check `Unblock` under `Security`. ### Portable Version (No Installation Required) diff --git a/docs/user-manual/ja/1-getting-started/1.2-installation.md b/docs/user-manual/ja/1-getting-started/1.2-installation.md index f35d14de8..e5ebd517e 100644 --- a/docs/user-manual/ja/1-getting-started/1.2-installation.md +++ b/docs/user-manual/ja/1-getting-started/1.2-installation.md @@ -53,6 +53,14 @@ npm でインストールするには、先に Node.js が必要です。必要 2. インストーラーをダブルクリックして実行 3. 指示に従ってインストール +インストール先の選択画面には **Create a desktop shortcut**(デスクトップショートカットを作成)オプションがあります。チェックを外すとデスクトップショートカットの作成をスキップでき、インストール後はスタートメニューから起動できます。新規インストールでは既定で選択されます。アップグレード時はショートカットの有無を引き継ぎ、削除済みのショートカットは自動で再作成されません。アップグレード時にチェックを外すと、既存のデスクトップショートカットも削除されます。デスクトップショートカットを作成できない場合(デスクトップが読み取り専用、セキュリティソフトによるブロックなど)は、そのショートカットを省略してインストールを続行し、中断やロールバックは行いません。 + +サイレントインストールでは、`CREATEDESKTOPSHORTCUT=0` を指定するとデスクトップショートカットの作成をスキップできます。 + +```powershell +msiexec /i "CC-Switch-v{バージョン}-Windows.msi" /qn CREATEDESKTOPSHORTCUT=0 +``` + 注意:インストーラーを実行しても何も起こらない場合は、ファイルを右クリックしてメニューから `プロパティ` を開き、`全般` タブの `セキュリティ` で `許可する` にチェックを入れてください ### ポータブル版(インストール不要) diff --git a/docs/user-manual/zh/1-getting-started/1.2-installation.md b/docs/user-manual/zh/1-getting-started/1.2-installation.md index c29a5dd20..cc5f7cbeb 100644 --- a/docs/user-manual/zh/1-getting-started/1.2-installation.md +++ b/docs/user-manual/zh/1-getting-started/1.2-installation.md @@ -53,6 +53,14 @@ Claude Desktop、MiniMax Code(可用方式一安装)以及 Windows 上的安 2. 双击运行安装程序 3. 按提示完成安装 +安装目录页面提供「Create a desktop shortcut」(创建桌面快捷方式)选项,取消勾选即可跳过桌面快捷方式创建,安装后仍可从开始菜单启动。首次安装默认勾选;升级时沿用桌面快捷方式是否存在的状态,已删除的快捷方式不会自动重建。升级时也可以取消勾选,移除已有的桌面快捷方式。如果桌面快捷方式无法创建(例如桌面目录只读、被安全软件拦截),安装程序会跳过它并继续完成安装,不会中断或回滚。 + +静默安装时,可通过 `CREATEDESKTOPSHORTCUT=0` 跳过桌面快捷方式创建: + +```powershell +msiexec /i "CC-Switch-v{版本号}-Windows.msi" /qn CREATEDESKTOPSHORTCUT=0 +``` + 注意:运行安装程序后如果没有任何反应,可以在文件上点击右键,在弹出的菜单中打开 `属性`,`常规`页中的 `安全` 勾选 `解除锁定` ### 绿色版(免安装) diff --git a/src-tauri/wix/per-user-main.wxs b/src-tauri/wix/per-user-main.wxs index 2dc129df4..fa22d381a 100644 --- a/src-tauri/wix/per-user-main.wxs +++ b/src-tauri/wix/per-user-main.wxs @@ -64,6 +64,12 @@ + + + + + NOT CREATEDESKTOPSHORTCUT AND (NOT (Installed OR WIX_UPGRADE_DETECTED) OR DESKTOPSHORTCUTEXISTS) + {{#if allow_downgrades}} @@ -75,6 +81,35 @@ Installed AND NOT UPGRADINGPRODUCTCODE + + + + NOT REMOVE AND CREATEDESKTOPSHORTCUT = "1" + + + + + + (REMOVE = "ALL" AND NOT UPGRADINGPRODUCTCODE) OR (WIX_UPGRADE_DETECTED AND DESKTOPSHORTCUTEXISTS AND NOT REMOVE AND CREATEDESKTOPSHORTCUT <> "1") + + + + + (REMOVE = "ALL" AND NOT UPGRADINGPRODUCTCODE) OR (WIX_UPGRADE_DETECTED AND DESKTOPSHORTCUTEXISTS AND NOT REMOVE AND CREATEDESKTOPSHORTCUT <> "1") + + NOT REMOVE AND CREATEDESKTOPSHORTCUT = "1" + + {{#if banner_path}} @@ -112,19 +147,49 @@ + + + + + + 1 + + + + + + + + + + + + WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed + LicenseAccepted = "1" + 1 + NOT WIXUI_DONTVALIDATEPATH + "1"]]> + WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID = "1" + 1 + 1 + NOT Installed + + {{#if license}} + 1 + {{/if}} {{#unless license}} 1 - - - - - - - - - - - - + + @@ -287,7 +340,6 @@ -