Skip to content

Commit ff64798

Browse files
fix: fix escape characters in registry values
1 parent bb77eb4 commit ff64798

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

install-open-with-cursor.ps1

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,21 @@ if (Test-Path $cursorExePath) {
2828
$backgroundPath = "HKEY_CLASSES_ROOT\Directory\Background\shell\Open with Cursor"
2929
Run-RegCommand "ADD `"$backgroundPath`" /ve /d `"Open with Cursor`" /f"
3030
Run-RegCommand "ADD `"$backgroundPath`" /v Icon /d `"$cursorExePath`" /f"
31-
Run-RegCommand "ADD `"$backgroundPath\command`" /ve /d `"`"$cursorExePath`" `"%V`"`" /f"
31+
Run-RegCommand "ADD `"$backgroundPath\command`" /ve /d `"\`"$cursorExePath\`" \`"%V\`"`" /f"
3232
Write-Host "Context menu for background installed successfully."
3333

3434
# # Install context menu for folders
3535
$folderPath = "HKEY_CLASSES_ROOT\Directory\shell\Open with Cursor"
3636
Run-RegCommand "ADD `"$folderPath`" /ve /d `"Open with Cursor`" /f"
3737
Run-RegCommand "ADD `"$folderPath`" /v Icon /d `"$cursorExePath`" /f"
38-
Run-RegCommand "ADD `"$folderPath\command`" /ve /d `"`"$cursorExePath`" `"%1`"`" /f"
38+
Run-RegCommand "ADD `"$folderPath\command`" /ve /d `"\`"$cursorExePath\`" \`"%1\`"`" /f"
3939
Write-Host "Context menu for folders installed successfully."
4040

4141
# Install context menu for files
4242
$filePath = "HKEY_CLASSES_ROOT\*\shell\Open with Cursor"
4343
Run-RegCommand "ADD `"$filePath`" /ve /d `"Open with Cursor`" /f"
4444
Run-RegCommand "ADD `"$filePath`" /v Icon /d `"$cursorExePath`" /f"
45-
Run-RegCommand "ADD `"$filePath\command`" /ve /d `"`"$cursorExePath`" `"%1`"`" /f"
45+
Run-RegCommand "ADD `"$filePath\command`" /ve /d `"\`"$cursorExePath\`" \`"%1\`"`" /f"
4646
Write-Host "Context menu for files installed successfully."
4747

4848
} else {

0 commit comments

Comments
 (0)