mid icon indicating copy to clipboard operation
mid copied to clipboard

Add flag to not create a powershell window on Windows

Open thanhtaivtt opened this issue 1 year ago • 2 comments

When I use your package in Tauri.app. It automatically opens a powershell window to run the command.

So I added an option to prevent it from opening additional windows on Windows.

Can you help me check if this is possible?

Thank you!

thanhtaivtt avatar Sep 27 '24 07:09 thanhtaivtt

Hi, I don't have Windows, but I'll try running this code through Github Actions and see if it breaks the tests.

doroved avatar Sep 30 '24 16:09 doroved

Thanks you!

thanhtaivtt avatar Oct 03 '24 01:10 thanhtaivtt

Hello, I just tested your crate to build a license system. But having a terminal window showing up a fraction of second will not reassure our users. Can we merge this pull request please ?

Thank you very much for your implementation of machine id crate !

BeezBeez avatar Dec 09 '24 18:12 BeezBeez

Hello, I just tested your crate to build a license system. But having a terminal window showing up a fraction of second will not reassure our users. Can we merge this pull request please ?

Thank you very much for your implementation of machine id crate !

Hi, have you checked to see if this PR is working? I just don't have a chance to test it as I use mac.

doroved avatar Dec 09 '24 18:12 doroved

Hey ! Yep I tested it on Windows 11 and no powershell/terminal window poping-up. 👍 I'm using this branch right now in prod. image

BeezBeez avatar Dec 13 '24 13:12 BeezBeez

FWIW we have a different use-case - we use this crate in a terminal app and not a Tauri app. It turns out that the -WindowStyle hidden flag used in the Powershell invocation hides the current terminal window that our app is running in when we first query the machine ID. However, I tested the patch in this PR and it looks like it also prevents the issue we are having with the terminal window unexpectedly being hidden.

So, +1 for merging this PR.

ntamas avatar Jan 08 '25 07:01 ntamas

@BeezBeez @thanhtaivtt @ntamas Made a merge of this PR, use v3.0.1

doroved avatar Jan 08 '25 17:01 doroved