-
Notifications
You must be signed in to change notification settings - Fork 968
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
Support Powershell x86 Issue #615 - Alternate Implementation of Set-LocalUser #658
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @PrajeetGuha and sorry for the late reply (I was not able to do much testing while working on #660 as it keeps busy my VirtualBox). I have tested locally and seems to work as expected. 😄
@PrajeetGuha can you sign Google CLA? We are not able to merge the PR until the CLA check succeeds. It seems to also be detecting that the commit email is not associated with your GH account. Let me know if you need help.
Thanks for your reply @Ana06 . I am actually facing a problem with the CLA. I have actually authored the commit with my local PC which was configured with a random non-existent mail id as authoring information. Since I am new to open source contributions, I did not know it will cause this issue. I also could not find any way to change or resolve the issue. |
@PrajeetGuha you can change the commit author of the last commit with:
You can change the global git configuration (so that it is applied for all future commits) with:
Let me know if this work. 😊 |
…of Set-LocalUser
Thanks @Ana06 for the help. I did the changes. Looks like it passed the CLA check now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @PrajeetGuha!
@@ -340,7 +332,7 @@ if (-not $noChecks.IsPresent) { | |||
} | |||
|
|||
Write-Host "[+] Setting password to never expire to avoid that a password expiration blocks the installation..." | |||
Set-LocalUser -Name "${Env:UserName}" -PasswordNeverExpires $true | |||
wmic useraccount here "name='${Env:UserName}'" set PasswordExpires=False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a typo here, it should be where
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems there was a mistypo on my part, and I apologize for that. However, we may have a better alternative to the WMIC implementation that can be reviewed.
#663
I have added the alternate implementation of the
Set-LocalUser
and hence the code is working in both powershell x86 and x64 without any issue. I have used WMIC functionality to do the same activity of making the password of the user to never expire. Since the x86 related issue was limited to that only function, I have also removed the check condition of the powershell.Closes #615