Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to have a different default console #2

Closed
Ana06 opened this issue Dec 16, 2021 · 4 comments
Closed

Allow to have a different default console #2

Ana06 opened this issue Dec 16, 2021 · 4 comments
Labels
💎 enhancement It is working, but it could be better

Comments

@Ana06
Copy link
Member

Ana06 commented Dec 16, 2021

We are currently opening console applications using cmd.

$executableCmd  = Join-Path ${Env:WinDir} "system32\cmd.exe"

I think it would be nice to use a environment variable to allow to change the default console.

@Ana06 Ana06 added the 💎 enhancement It is working, but it could be better label Dec 16, 2021
@Ana06
Copy link
Member Author

Ana06 commented Dec 21, 2021

Same for the default browser. 🤔

@MalwareMechanic
Copy link
Collaborator

Same for the default browser. 🤔

Regarding my comment in #15 (comment), I was meaning to say we could have additional configuration packages to allow users to further configure Chrome. For instance, if they wanted the default browser to be Chrome then they could include that package. I think for Win10 you have to manually set your default browser anyway?

day1player pushed a commit that referenced this issue Jul 5, 2022
Adding current packages that should conform to current standards incl…
@MalwareMechanic
Copy link
Collaborator

I realized the other tricky part is properly handling paths with spaces correctly. We have this down well for cmd.exe, we'd need to figure out for powershell.exe and cmder.exe the proper way to handle that.

Then we should probably create a function in vm.common.psm1 to have a big switch statement to handle the bulk logic of:

$executableCmd  = Join-Path ${Env:WinDir} "system32\cmd.exe"
$executableDir  = Join-Path ${Env:UserProfile} "Desktop"
$executableArgs = "/K `"cd `"$executableDir`" && `"$executablePath`" --help`""
Install-ChocolateyShortcut -shortcutFilePath $shortcut -targetPath $executableCmd -Arguments $executableArgs -WorkingDirectory $executableDir -IconLocation $executablePath

so the users can simply pass in the parameters and not have to worry about handling paths with spaces for each console type.

@Ana06
Copy link
Member Author

Ana06 commented Jul 17, 2024

Closing in favor of #971

@Ana06 Ana06 closed this as completed Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💎 enhancement It is working, but it could be better
Projects
None yet
Development

No branches or pull requests

2 participants