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

Use diskpart in script mode to circumvent problems when not running as admin #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

R0Wi
Copy link
Contributor

@R0Wi R0Wi commented Mar 7, 2023

Problem

Currently when running the script as non-admin user, the invokation of diskpart shows the Windows UAC dialog where we can input the admin user credentials for elevating the process, but piping diskpart commands to that process does not work. The diskpart commandline windows stays open and does nothing.

How to reproduce

  1. Run the script as non admin user so that is pics up all disks from that user
  2. Observe that on the diskpart line a new credentials window will pop up
  3. Provide local admin credentials, so that diskpart window can be opened
  4. Diskpart commands are not executed

Solution

Using script mode instead solves this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant