### Bug description

Originally reported by @314a here: https://github.com/quarto-dev/quarto-cli/discussions/1033#discussioncomment-2923301

I started writing a post-render script. The stripped down version should render a file to the output folder specified in the _quarto.yml_ file.
The following code works well when running the file "test.ts" with `deno run  --allow-run _resources/scripts/test.ts`, but when invoking it as a post-render script, the error message is: ` "Files\Quarto\bin\quarto.js""==""" cannot be processed syntactically at this point.` (there seems to be an issue with the path to the quarto executable.

File test.ts:
```
const p = Deno.run({ cmd: ["cmd", " /c ", "quarto", "--version"] }); // create subprocess
await p.status(); 
```

same holds for running a batch file. The following batch file _batch.cmd_ runs smoothly standalone, but results in the same error, if invoked as a post-render script in quarto.

```
echo check pandoc version:
pandoc --version

echo check quarto version:
quarto --version
```

### Checklist

- [X] [formatted your issue](https://yihui.org/issue/#please-format-your-issue-correctly) so it is easier for us to read?
- [X] included a minimal, self-contained, and reproducible example?
- [X] documented the quarto version you're running, by providing the output produced by `quarto check` in a terminal in your issue?
- [X] documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] documented which operating system you're running? If on Linux, please provide the specific distribution as well.
- [X] upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?
dragonstyle
2022-06-12T11:54:50Z
jjallaire
bug verify-fixed
1.0
closed
error running post render script on windows 
https://github.com/quarto-dev/quarto-cli/issues/1134