Giter Club home page Giter Club logo

puppet-windows's People

Contributors

aloysius-lim avatar etlweather avatar jbronn avatar jdavisp3 avatar jonemo avatar makomatic avatar rockwell-bkrische avatar rogerlz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-windows's Issues

Regex for update time is wrong

code/modules/windows/manifests/update.pp
View file @ 58717d1a
... ...

@@ -84,7 +84,7 @@ class windows::update(
  validate_bool($all_users)
  validate_re($type, '^[2-5]$')
  validate_re($day, '^[0-7]$')
-  validate_re($time, '^[0-23]$')
+  validate_re($time, '^(\d|1\d|2[0-4])(\.\d{1,2})?$')
  validate_bool($reboot_required)

The regex is not working like that - [] is for single characters (...ranges).

Trying to change the path for Java from C:\Program Files\Java to D:\Program Files\Java

Modifying the paths in /etc/puppetlabs/code/environments/production/modules/windows/manifests/java.pp
seems to have no effect.

Java is still installed (dependably) in C:\Program Files\Java. I must be missing something.

Determining Java's home depending on the version.

if $version == '7' {
$home = 'D:\Program Files\Java\jre7'
} else {
$home = "D:\Program Files\Java\jre1.${version}.0_${update}"
}

windows::regsvr32 files getting registered multiple times. template code that runs on unless doesn't always find registered control

I have a legacy piece of software that I am supporting that needs to register some OCX controls and DLL files. When using the windows::regsvr32 class some of my controls are registered on every puppet agent run.

I have had a bit of a look at the code and can see the powershell that is being used in the erb template for finding the CLSID entries in the registry. It would seem what is defined there isn't broad enough to find some controls that are registered with the regsrvr32 utility as it would seem that it isn't always consistent on where it puts it.

In my searching through the registry I found the CLSID in different spots for different controls.

msvbvm50.dll -- runs every time

HKLM\Software\Classes\TypeLib\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
HKLM\Software\Classes\Wow6432Node\Interface\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
HKLM\Software\Classes\Wow6432Node\TypeLib\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
HKLM\Software\Wow6432Node\Classes\TypeLib\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

TeeChart.ocx -- only runs the first time -- unless statement correctly detects it

HKCR\Wow6432Node\CLSID\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
HKLM\Software\Classes\Wow6432Node\CLSID\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
HKLM\Software\Wow6432Node\Classes\CLSID\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

TSGACAL.OCX -- runs every time

HKCR\TypeLib\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
HKCR\Wow6432Node\CLSID\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
HKCR\Wow6432Node\TypeLib\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
HKLM\Software\Classes\TypeLib\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
HKLM\Software\Classes\Wow6432Node\TypeLib\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
HKLM\Software\Wow5432Node\Classes\TypeLib\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

COMCTL32 -- only runs the first time -- unless statement correctly detects it

HKCR\Wow6432Node\CLSID\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
HKLM\Software\Classes\Wow6432Node\CLSID\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
HKLM\Software\Wow6432Node\Classes\CLSID\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

The only common element in those is:

HKLM:\SOFTWARE\Classes\*

So I have tested a bit of powershell that searches the registry for the CLSID from that path and returns exit 1 if it doesn't find a match and it works ok but of course takes a bit longer than a direct Test-Path.

I'm happy to make a pull request if you like to edit the erb template to run my updated powershell that does a broader search but thought I would raise this issue here first as it would have some performance impact.

windows::unzip should fail if file does not exist

With the following code:

windows::unzip { "foo":
  zipfile          =>  "Z:\\path\which\doesnotexist.zip"
}

The unzip resource happily returns with no error.

The unzip.ps1 template should propagate any errors though the return code which would cause puppet resource to fail.

pe 3.3.0 not compatible with version 0.9.2

When I try to install the module, I get the following error:
Error: Could not install module 'counsyl-windows' (???)
No version of 'counsyl-windows' can satisfy all dependencies
Use puppet module install --ignore-dependencies to install only this module

thank you,

Levent

Security issue with autologon

Hi,

Looking into the code for this function, it would suggest that the password for the user is written into the registry in plain text.

Which would mean that anyone with access to this registry key would have the password.

The AutoLogon application by SysInternals does not do this, could a similar approach be used? where the password is encrypted?

shortcut keeps renewing

The shortcut recipe keeps running.

  shortcut { "C:/users/public/desktop/${hv}.lnk":                                                                                                                                                                                                              
    target        => "C:/Program Files/${hv}/lpclientpc.bat",                                                                                                                                                                                                  
    icon_location => "C:/Program Files/${hv}/lpclientpc.ico",                                                                                                                                                                                                  
    working_directory => "C:/Program Files/${hv}/",                                                                                                                                                                                                            
  }                                                                                                                                                                                                                                                            
Notice: /Stage[main]/Hv::Windows/Shortcut[C:/users/public/desktop/HVClient-Nov2018.lnk]/Exec[ensure shortcut C:/users/public/desktop/HVClient-Nov2018.lnk]/returns: executed successfully

windows::unzip not ordering correctly?

Using Puppet 3.8.7 on windows and with future parsing enabled and manifest ordering. If I have a simple class like this;

  #===Software Artifact Unzip========
  file { "$tempfolder":
    ensure  => 'directory',
  } ->
  file { "$tempfolder\\software.zip":
    ensure  => 'present',
    source_permissions => ignore,
    source => "$fullInstallerLocation",
  } ->
  windows::unzip { "$tempfolder\\software.zip":
    destination => "$tempfolder",
    creates     => "$tempfolder\\myfile.txt",
    require     => File["$tempfolder\\software.zip"],
  }

Results in this execution order;

  • Directory to hold zip contents created
  • Zip copied to folder
  • Zip is unzipped:

So, 1 -> 3 -> 2 instead of 1 -> 2 -> 3. I even put a requires in but it doesn't seem to help.

Any ideas?

Thanks!
Iain

windows::screen_saver not working

It seems that screen_saver will only work for admin users. When trying to use it for non-admin users it fails to find the registry path:

PS C:\Windows\system32> Set-ItemProperty -Path $regpath -Name "ScreenSaveActive" -Value 1 -Force;
Set-ItemProperty : Der Pfad "HKEY_USERS\S-1-5-21-224108373-3687871180-31578548-1003\Control Panel\Desktop" kann nicht gefunden werden, da er nicht vorhanden ist.
In Zeile:1 Zeichen:1
+ Set-ItemProperty -Path $regpath -Name "ScreenSaveActive" -Value 1 -Fo ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (HKEY_USERS\S-1-...l Panel\Desktop:String) [Set-ItemProperty], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetItemPropertyCommand

(I've ran the powershell command manually for debug purposes.)

When searching the registry for this path I can confirm that it cannot be found.

Tested on Windows 10 Pro.

Any ideas?

Submit to puppet forge

Why has this module not been submitted to puppet forge? There are a bunch of useful items in here I'd like to be able to automagically take advantage of.

It's also possible that the forge's horrible search just makes it impossible to find.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.