Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

Update dism.rb #38

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

back2root
Copy link

Ensure that state recognition works with different language versions of Windows

Ensure that state recognition works with different language versions of Windows
Single quote won't work like expected.
Needs to be done in english
Just to be consistent
@ferventcoder
Copy link
Contributor

@back2root please squash these commits. Perhaps explain in your commit message what this resolves, it is not clear at the moment.

@back2root
Copy link
Author

Hi @ferventcoder,

Sorry, I thought it would be obvious. But here are the explanations for the two types of changes I did:

  1. Change:
    (Commit: 7b3d4e6, 6f95c4, 8b0cd92)
    The script relies on the output of dism. However, as most things within Windows operating system the output from dism is localized within non English versions of Windows. This results into errors e.g. in the process of checking the state of a feature.
    I added the parameter "/english" to every call of dism causing dism to generate English output even on non-English versions of Windows.
C:\>dism /online /Get-Features
Tool zur Imageverwaltung für die Bereitstellung
Version: 6.3.9600.17031

Abbildversion: 6.3.9600.17031

Featureauflistung für das Paket : Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~6.3.9600.16384

Featurename : Microsoft-Hyper-V-All
Status : Deaktiviert

Featurename : Microsoft-Hyper-V-Tools-All
Status : Deaktiviert

Featurename : Microsoft-Hyper-V
Status : Deaktiviert
...

vs.

C:\>dism /english /online /Get-Features
Deployment Image Servicing and Management tool
Version: 6.3.9600.17031

Image Version: 6.3.9600.17031

Features listing for package : Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~6.3.9600.16384

Feature Name : Microsoft-Hyper-V-All
State : Disabled
  1. Change : dism "/Source" parameter
    (Commit: 7a94564)
    It seems that dism does not allow to specify a path within single quotes. Thus I changed it.

@ferventcoder
Copy link
Contributor

Apologies, the changes are obvious. What lives on are the commit messages. I see you have written messages in the body, but the summary is "Update dism.rb" which isn't very helpful to understanding what was done (most of the commits in this repo update the dism.rb file :D ).

It seems like you have really just two commits here (hence the request for you to squash and fix up the commit messages). What I would like to see as an end result are two commits, one for the English output and another for the Source parameter change. Have you had an opportunity to create tickets for these changes as well over at https://tickets.puppetlabs.com/browse/modules?

@ferventcoder
Copy link
Contributor

For details of what we are looking for with respect to Git commit messages, see https://github.com/puppetlabs/puppet/blob/master/CONTRIBUTING.md#making-changes

@glennsarti
Copy link
Contributor

glennsarti commented Jul 12, 2016

Hi @back2root , are you able to squash the commits as fervent coder suggested?.

Also this PR requires a rebase.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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

Successfully merging this pull request may close these issues.

4 participants