Giter Site home page Giter Site logo

aaronparker / packagefactory Goto Github PK

View Code? Open in Web Editor NEW
52.0 6.0 16.0 7.64 MB

A packaging factory for Microsoft Intune using Evergreen, VcRedist, and IntuneWin32App

Home Page: https://stealthpuppy.com/packagefactory/

License: MIT License

PowerShell 68.40% VBScript 29.20% C# 2.40%
intune evergreen win32 windows intunewin32app powershell endpoint-manager configmgr vcredist intunewin32

packagefactory's Introduction

About me

  • End user computing, modern device management, enterprise mobility, automation, PowerShell
  • Sporadic blogger and speaker
  • Principal Modern Workplace Architect and EUC practice owner @Insentra
  • Australian
  • Born at 329.56ppm

packagefactory's People

Contributors

aaronparker avatar constey avatar dependabot[bot] avatar lwalthert 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  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

packagefactory's Issues

PostInstall: Copy function anomaly

With the build script below, initial_preferences.txt does land in C:\Users\Jason\Downloads\GoogleChrome\Source\

Set-Location -Path "C:\projects\packagefactory"
$params = @{
    Path        = "C:\projects\packagefactory\packages"
    Application = "GoogleChrome"
    Type        = "App"
    WorkingPath = "C:\Users\Jason\Downloads"
    Import      = $true
}
.\New-Win32Package.ps1 @params

However, I'm seeing the following error on client machines using the stock Chrome example:
<![LOG[Copy-File: Cannot find destination: C:\Program Files\Google\Chrome\Application\initial_preferences]LOG]!>

Question: simple powershell script

Your script is just awesome, thank you very much. I like to use it very much, but I don't always have to distribute a package with an EXE or an MSI. I like to use chococlatey, or just want to distribute a regsitry value. Is there a way to distribute a simple install.ps1 and a detection.ps1 in your script?

as an example install.ps1:

$ProgramName = "PDF24"

$ChocoPrg_Version = [System.Version](C:\ProgramData\chocolatey\choco.exe --version)
if ($ChocoPrg_Version -gt [System.Version]"2.0") {
$localprograms = C:\ProgramData\chocolatey\choco.exe list
} else {
$localprograms = C:\ProgramData\chocolatey\choco.exe list -lo
}

if ($localprograms -like "$ProgramName") {
C:\ProgramData\chocolatey\choco.exe upgrade $ProgramName -y
} else {
C:\ProgramData\chocolatey\choco.exe install $ProgramName -y
}

and the uninstall.ps1:

$ProgramName = "PDF24"

$ChocoPrg_Version = [System.Version](C:\ProgramData\chocolatey\choco.exe --version)
if ($ChocoPrg_Version -gt [System.Version]"2.0") {
$ChocoPrg_Existing = C:\ProgramData\chocolatey\choco.exe list
} else {
$ChocoPrg_Existing = C:\ProgramData\chocolatey\choco.exe list -lo
}

if ($ChocoPrg_Existing -like "$ProgramName") {
Write-Host "Found it!"
exit 0
} else {
exit 1
}

New App: Notepad++

Evergreen supports Notepad++, is it possible to create a config for it?

Question: Multiple InstallTasks (install.json) possible?

Hi there,

i've a short question about the install.json. I want to add or edit some registry keys postinstall. I've found that Remove and Copy of files is possible, but how could I run an additional .ps1 script for example or add those registry keys after the setup?

   "Version": "11.9.0"
  },
  "LogPath": "C:\\ProgramData\\Microsoft\\IntuneManagementExtension\\Logs",
  "InstallTasks": {
    "ArgumentList": "/package \"#SetupFile\" AUTOUPDATE=No DESKTOPICONS=No FAXPRINTER=No REGISTERREADER=No /qn /log \"#LogPath\\#LogName.log\""
  },
  "PostInstall": {
    "Remove": [],
    "Copy": []
  }
}

Kind regards,
Constantin

Architecture ARM cannot be checked

I created my own Zoom ARM app package using the information on evergreen. Invoke Evergreen with $_.Architecture set to ARM64 works but not via the packagefactory.
image

Param name change in IntuneWin32App module

Currently Create-Win32App.ps1 fails because of a parameter name change in IntuneWin32App in (https://github.com/MSEndpointMgr/IntuneWin32App/blob/master/Public/New-IntuneWin32AppRequirementRule.ps1)

To fix the issue - go to line 96 in Create-Win32App.ps1 and change it from:
MinimumSupportedOperatingSystem = $AppData.RequirementRule.MinimumRequiredOperatingSystem
to
MinimumSupportedWindowsRelease = $AppData.RequirementRule.MinimumRequiredOperatingSystem

Error: Unable to detect expected 'packagename.intunewin' file after IntuneWinAppUtil.exe invocation

Just for reference, currently with the latest IntuneWin32App PowerShell module, which is installed when you start a greenfield setup with packagefactory the creation of packages breaks with the erro:

Error: Unable to detect expected 'packagename.intunewin' file after IntuneWinAppUtil.exe invocation

Took me a while to figure this out but it is a known issue in IntuneWin32App MSEndpointMgr/IntuneWin32App#121

The fix is to locate Invoke-Executeable.ps1 (by default in C:\Program Files\WindowsPowerShell\Modules\IntuneWin32App\1.4.2\Private) and update it as follows:

        $ProcessStartInfoObject.CreateNoWindow = $true 
        $ProcessStartInfoObject.UseShellExecute = $false 
        $ProcessStartInfoObject.RedirectStandardOutput = $true 
        $ProcessStartInfoObject.RedirectStandardError = $true 
        $ProcessStartInfoObject.CreateNoWindow = $false
        $ProcessStartInfoObject.UseShellExecute = $true
        $ProcessStartInfoObject.RedirectStandardOutput = $false
        $ProcessStartInfoObject.RedirectStandardError = $false

Hope this helps others as it took me quite some time to figure this out.

Remove use of Win32_Product

Win32_Product will cause issues with Windows Installer and needs to
be replaced with querying uninstall / GUID info via the registry

$Product = Get-CimInstance -Class "Win32_Product" | Where-Object { $_.Caption -like $Item }

Required permissions and devops authentication

Hey guys,
we tried the intune package factory in our test tenant and in fact it's really an awesome tool ! It's definitely helpful for apps where versions changes a lot and which are not available in intune's ms store integration (new).

But there are following 2 things which currently blocks us from using it in production:

  1. We do not understand why the service principal needs the right "DeviceManagementRBAC.ReadWrite.All". This permission should as per my opinion only granted if it's really required.
  2. The azure devops uses a client secret as "Service Principal". Here we would need it to support "workload identity federation".

Don't get me wrong - we do honor what's there right now, but our internal guidelines block us from using it as it is now.
Are there any changes planned to address above topics?

Thanks
Florian

PSADT deployment error

As far as I can tell, AdobeAcrobatReaderDC is the only PSADT example in this repo. I'm getting an 0x80070002 error when I try to deploy it. If I build the AdobeAcrobatReaderDCMUI package using the standard tooling, it deploys without issue.

Also, just a suggestion, but at 420MB, perhaps it would be better to use something smaller as an example, say Brave.
https://github.com/brave/brave-browser/releases/latest

Thanks!

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.