Repository: tauri
Issue: R sidecar doesn't work on Windows but works on Mac
Labels: type: bug,status: needs triage

### Describe the bug

I'm trying to incorporate [R](https://cran.r-project.org/) v4.3.3 as sidecar into my Tauri app. I basically copied all the files from Program Files where R is installed, particularly from: `C:\Program Files\R\R-4.3.3`

### Reproduction

Here's my `tauri.config.json`:

```json
{
  "build": {
    "beforeDevCommand": "npm run dev",
    "beforeBuildCommand": "npm run build",
    "devPath": "http://localhost:1420",
    "distDir": "../dist"
  },
  "package": {
    "productName": "xxx",
    "version": "0.0.0"
  },
  "tauri": {
    "allowlist": {
      "notification": {
        "all": true
      },
      "http": {
        "all": true,
        "request": true,
        "scope": ["http://*"]
      },
      "process": {
        "all": false,
        "exit": true,
        "relaunch": true
      },
      "clipboard": {
        "all": true
      },
      "shell": {
        "all": true,
        "execute": true,
        "sidecar": true,
        "open":  true,
        "scope": [
          {
            "name": "binaries/bin/x64/Rscript",
            "sidecar": true
          },
        ]
      },
      "fs": {
        "all": true,
        "scope": ["**"]
      },
      "path": {
        "all": true
      },
      "app": {
        "all": true,
        "show": true,
        "hide": true
      },
      "dialog": {
        "all": true, 
        "ask": true, 
        "confirm": true, 
        "message": true, 
        "open": true, 
        "save": true
      },
      "os": {
        "all": true
      }
    },
    "windows": [
      {
        "title": "xxx",
        "width": 1200,
        "height": 900
      }
    ],
    "security": {
      "csp": null,
    },
    "bundle": {
      "active": true,
      "targets": "msi",
      "publisher": "xxx",
      "identifier": "xxx",
      "resources": [
        "resources/*"
      ],
      "externalBin": [
        "binaries/bin/x64/Rscript"
      ],
      "icon": [
        "icons/32x32.png",
        "icons/128x128.png",
        "icons/128x128@2x.png",
        "icons/icon.icns",
        "icons/icon.ico"
      ]
    }
  }
}

```


### Expected behavior

In one of my `*.vue` components, I have this JavaScript code:

```js
  const command = Command.sidecar('binaries/bin/x64/Rscript', ["-e", ".libPaths()"]);
  const response = await command.execute();
  console.log(response);
```

Here's the actual output:
```json
 {
    "code": -1073741515,
    "signal": null,
    "stdout": "",
    "stderr": ""
}
```

Here's the expected output:

```json
 {
    "code": 0,
    "signal": null,
    "stdout": "[1] \"/src-tauri/binaries/library \"",
    "stderr": ""
}
```



### Full `tauri info` output

```text
[✔] Environment
    - OS: Windows 10.0.22631 X64
    ✔ WebView2: 122.0.2365.92
    ✔ MSVC: Visual Studio Community 2022
    ✔ rustc: 1.76.0 (07dca489a 2024-02-04)
    ✔ cargo: 1.76.0 (c84b36747 2024-01-18)
    ✔ rustup: 1.27.0 (bbb9276d2 2024-03-08)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 21.6.1
    - npm: 10.5.0

[-] Packages
    - tauri [RUST]: 1.6.1
    - tauri-build [RUST]: 1.5.1
    - wry [RUST]: 0.24.7
    - tao [RUST]: 0.16.7
    - @tauri-apps/api [NPM]: 1.5.3
    - @tauri-apps/cli [NPM]: 1.5.11

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist
    - devPath: http://localhost:1420/
    - framework: Vue.js
    - bundler: Vite
```


### Stack trace

_No response_

### Additional context

_No response_