LibreOffice Silent Install Parameters

Posted by Annalisa Williams

Nov 21, 2014 9:01:50 AM

Ah, LibreOffice...whether you're a cheapskate or just don't want to give Gates any more of your money than you already have to here's how to silently install it. (Don't forget to check out the video tutorial below to see Shane show how to run the deployment.)

If you have an active Pro or Enterprise license of PDQ Deploy, you have access to the Package Library which has this package pre-built and ready to go. In which case, you'll just need to import the package from the library and deploy. 

You can make modifications to this package or build it yourself if you're using Free mode. (Download PDQ Deploy Free mode here.)

Silently Installing LibreOffice

1. Point to the MSI. Use the ellipses next to the Install File field to navigate to the LibreOffice MSI file. You do not need to worry about selecting Include Entire Directory. 

2. Add Silent Parameters LibreOffice silent install parameters can be a bit tricky. Below will be the parameters that come with the pre-built package from the Package Library, for those who have PDQ Deploy Pro or Enterprise. You can make changes to these parameters if you so wish.

If you're using the free download of PDQ Deploy, no problem, copy and paste these parameters:

ADDLOCAL=ALL CREATEDESKTOPLINKE=0 REGISTER_ALL_SMO_TYPES=1 REMOVE=gm_o_Onlineupdate RebootYesNo=No

LibreOffice Silent Install Parameters

Breakdown of LibreOffice Silent Install Parameters

ADDLOCAL=ALL: This parameter instructs the MSI to install all LibreOffice features.

CREATEDESKTOPLINK=0: When set to "0" no desktop icon is created, if you do want a desktop icon on your user's computer change this to 1. 

REGISTER_ALL_MSO_TYPES=1: Registers all Office types (Writer, Calc, Impress, etc.)

REMOVE=gm_o_Onlineupdate: Adding this disables alerts from LibreOffice that your users would otherwise see asking them to update. (If you want to keep up-to-date and never miss a new release for LibreOffice you might want to look into using Auto Deployment.)

RebootYesNo=No: This parameter prevents a reboot after installation, change to =Yes to reboot. 

You can look at more potential arguments on this wiki.

 

 

Read More

Retry Queue

Posted by Annalisa Williams

Nov 17, 2014 3:23:24 PM

Bigger and badder than ever, PDQ Deploy 4 is here. This new version has great solutions to making sure computers receive updates even if they are offline at the time you kick off your deployment. Below is the beginning of a playlist of video tutorials on using the Retry Queue.

Retry QueueRetryQueue250

Retry Queue is an Enterprise mode feature. The Retry Queue screen (the icon on left side of screen) is where your computers that are offline, but listed to be deployed to will appear with the computer name and name of the application package you were attempting to deploy. 

 

Managing Settings 

Under Preferences>Deployments, you'll notice a new section: Offline Retry Queue. This is where you set the interval at which PDQ Deploy will attempt to re-deploy. The interval value is a global setting. Below that is where you'll set the number of retry attempts before it is dropped from the queue. The number of attempts may be overwritten at the Package and Deploy levels.

Preferences_Retry_Queue

Settings at the Package and Deployment Level

To change a package's settings, simply double-click a package to open it up and go into "Package Properties" and there you'll see "Offline Settings" where by default it will use the setting from preferences. Uncheck that to modify the number of retries on that package. 

The retry queue attempts can be about as granular as you need them. You can adjust on the package level and individual deployment levels as well. To adjust and individual deployment, when you select the package and click "Deploy Once". In the Deploy Once or Schedule windows you'll have the option to change number of retries before the computer is removed from the queue. 

Forcing a Retry

Details_Retry_Queue

You're not stuck waiting until the interval completes to retry a deployment on a computer. When in the Retry Queue, highlight a queued deployment and on the right side of the window you'll see the Try Now option. The deployment will reattempt and increment one of your tries. 

 

Things to note with the Retry Queue...there are actually instances when you would not want a deployment to place computers in the Retry Queue. If you send out a package to reboot computers that are offline...well, if you have some sort of sick sense of humor then, sure...put a computer in the Retry Queue and have it restart right after your user turns on the computer.

 

 

Read More

Topics: pdq deploy

PowerShell: Running .NET 4 with PowerShell Version 2.0

Posted by Kris Powell

Nov 13, 2014 4:25:00 PM

Let me start by saying that I am as excited as the next person to try new technology and upgrade all my software. Unfortunately, we cannot always upgrade the hardware/software in our production environments due to a variety of factors.

If you are able to upgrade your version of PowerShell to the latest and greatest, then please upgrade to the latest and greatest version (PowerShell 5 preview, anyone?). This blog post is for a (hopefully) small percentage of people who may find themselves stuck with an older version of PowerShell while needing to leverage something in a newer version of .NET Framework.

 

Running .NET 4 with PowerShell 2.0

There are two ways to tell PowerShell version 2.0 to utilize .NET Framework 4.  

You can modify for all .NET applications or just for PowerShell itself. I cannot think of many situations where I'd want to force this setting globally for all .NET applications, so we're going to address it just for PowerShell via some configuration files. All we need to do is create those configuration files and place them into their appropriate locations.

You'll want to create powershell.exe.config and powershell_ise.exe.config and place them in your $pshome directory.  

Here is what you want in both of those .config files:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <startup>
      <supportedRuntime version="v4.0.30319" />
      <supportedRuntime version="v2.0.50727" />
    </startup>
</configuration>

Here is the location of $pshome by default:

  • 32-bit machines: C:\Windows\System32\WindowsPowershell\v1.0
  • 64-bit machines
    • 32-bit version: C:\Windows\SysWOW64\WindowsPowershell\v1.0
    • 64-vit version:  C:\Windows\System32\WindowsPowershell\v1.0

The quick and easy way to overwrite those files and place them where they need to be would be to run this as a script.

We place the entire content of the xml file into a variable via what's known as a here-string. They let us use multi-line strings very easily. We output the new variable directly to two new files (overwriting existing files, so be careful). 

$xml = @"
<?xml version="1.0"?>
<configuration>
    <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0.30319"/>
        <supportedRuntime version="v2.0.50727"/>
    </startup>
</configuration>
"@

$xml | Out-File $pshome\powershell_ise.exe.config 
$xml | Out-File $pshome\powershell.exe.config

Voila! Like magic, the new files are created. Simply restart your PowerShell console and you should be able verify which .NET CLR Powershell is using by using $PSVersionTable. We're looking for the CLRVersion value, which is 4.0.30319.18444 in my case. That tells me I'm using .NET 4.

Powershell_-_PSVersionTable_Example

Hopefully you never find yourself in a position where you're limited with your PowerShell versions. But, if you ever do find yourself in such a pickle, hopefully this can point you in the right direction.

 

Read More

PDQ Deploy 4.0 is Here

Posted by Annalisa Williams

Nov 12, 2014 9:56:01 AM

Coming to a console near you...PDQ Deploy 4.0

For Enterprise Users...

The Retry Queue: RetryQueue250

The Retry Queue is the answer to making sure every deployment is completed whether a computer is online or not. When a computer is offline during a deployment it is added to the queue to attempt to deploy at a later time.

You can adjust the number of times a deployment is attempted and how frequently attempts are made in Preferences>Deployments under the Offline Retry Queue section. 

Enterprise users also get features included in Pro mode. Read on to see what's new for Pro mode users. 

For Pro Users...

Heartbeat_200px

Heartbeat Trigger:

This is another feature that, like the Retry Queue, ensures deployments are received when a computer is online. To use the Heartbeat Trigger you will need to have PDQ Inventory Pro mode or higher to utilized this feature. 

Heartbeat is a schedule-type that deploys to computers that have gone from offline to online. (In other words, if a computer is continously online it will not be deployed to until it has been rebooted.) 

 

Message Step: 

The most frequent use for this step is warning users of a coming reboot. It works the same way as running the command:  msg * "Your computer will be reboot in 60 seconds" and is there for quick and easy addition to deployment packages. 

Read More

PowerShell: Text-to-Speech Examples

Posted by Kris Powell

Oct 30, 2014 3:53:00 PM

This is a fun way to utilize Text to Speed (TTS) with PowerShell for Halloween. This is a fun little prank you can use to turn your users kris_resizedcomputers into "haunted" computers as long as they've got their speakers on. 

We use the cmdlet Add-Type to add a .NET framework type to a PowerShell session. We can then instantiate a SpeechSynthesizer object to turn our text into audio output. It’s pretty exciting.

The easiest way to try this is like so:

Add-Type -AssemblyName System.speech
$speak = New-Object System.Speech.Synthesis.SpeechSynthesizer
$speak.Speak('Hello...')

You can even jazz it up a bit by modifying the speed of speech by modifying the rate property of the object.  Here’s a good resource to see the different properties/methods of this object - link (scroll towards the bottom).

Add-Type -AssemblyName System.speech
$speak = New-Object System.Speech.Synthesis.SpeechSynthesizer
$tts.Rate   = -5  # -10 to 10; -10 is slowest, 10 is fastest
$speak.Speak('Hello...')

From there, we can start having some fun. For example, we could place a list of phrases into an array or a separate text file and pull a phrase at random to be synthesized. Be sure to choose which method you’d like to use.

Add-Type -AssemblyName System.speech
$tts = New-Object System.Speech.Synthesis.SpeechSynthesizer

# Importing from text file
$PhraseLocation = "C:\SomeFolder\ListOfPhrases.csv"
$Phrase         = (Get-Content $PhraseLocation) | Get-Random

# Using an array
$Phrase2 = @("I'm a robot.", 
    "Help, I'm stuck in the machine!", 
    "What are you doing, $env:USERNAME") | Get-Random

$tts.Rate   = 0  # -10 is slowest, 10 is fastest
$tts.Speak($Phrase)

Hopefully, this gives you some fun ideas for Halloween tomorrow!

Bonus:

Those of you who want to experiment with even more control over TTS can make use of Speech Synthesis Markup Language (SSML).

Here's an example:

Add-Type -AssemblyName System.speech
$tts = New-Object System.Speech.Synthesis.SpeechSynthesizer

$Phrase = '
<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" 
    xml:lang="en-US">
    <voice xml:lang="en-US">
    <prosody rate="1">
        <p>Normal pitch. </p>
        <p><prosody pitch="x-high"> High Pitch. </prosody></p>
    </prosody>
    </voice>
</speak>
'
$tts.SpeakSsml($Phrase)
Read More

Beat the Java Error 1603 When Deploying

Posted by Shane Corellian

Oct 28, 2014 4:32:00 PM

Greetings fellow Sys Admins. If you, like me, are responsible for installing Java on all of your company's Windows computers then you have mostIs Shane playing peek-a-boo, or screaming out in frustration? Trick question, he's doing both. assuredly seen the dreaded 1603 error code. The video at the bottom of this post shows a Java 1603 error fix. 

What is a Java Error 1603?

This is a Windows Installer (MSI) error that simply means "Fatal error during installation". This error usually means that "something the installer expected wasn't available" or "Something exists that the installer didn't expect". 

There are a number of reasons why 1603 is thrown. Rather than try to go into all the different reasons why this could happen (the number of reasons are too voluminous for a simple blog) I will quickly mention a few and then show you a great way to overcome this problem when it comes to Java. So pour a Guinness and listen (read) up.

Possible Reasons for a Java Error 1603 

  • A required installation file is missing such as the data1.cab file if you are installing using the extracted MSI in Java 7. (Java 8 no longer uses a separate .cab file as all the necessary files are embedded in the actual MSI). 
    • If you are deploying Java then an AV solution may delete the included files thus causing the installer to throw a 1603.

 

  • There are remnants of a previous Java installation.
    • When Java is installed (by default) it attempts to uninstall previous updates in the same family. e.g. Installing Java 7 Update 71 will uninstall Java 7 Update 67 but NOT Java 6 or Java 8.
    • Java Update did not complete. Sometimes previous updates are not completely uninstalled. When this happens a 1603 error can occur when the new version tries to install.
    • Sometimes the only remnant (that can still cause a failure) is a stray registry key! (seriously)

 

  • Java is currently being used when the installation begins. This is fairly common when you attempt to deploy the jre-7uxx-windowsxx.exe and the target computer is running Java in a browser. 

 

  • You are attempting to deploy the online Java exe. If you are deploying the EXE (and not the extracted MSI) then it is imperative that you only install the offline version. A quick way to tell is if your install file contains the letters "iftw" in the name. (e.g. jre-8u11-windows-i586-iftw.exe). Iftw means "Install From The Web". This file is very small (usually < 2 MB). NEVER deploy this file. First of all the online version usually includes the Ask Toolbar which we all know really, really sucks and is actually worse than any 1603 error you'll ever run into. Just grab the offline file from Java, or better yet just use the Java packages from the PDQ Deploy Package Library. This link will take you the latest Java offline downloads for Java 8. This link will take you to the Java 7 downloads. (Once again, choose the Offline versions)

Resolving Java Error Code 1603

OK, those are some common reasons. Now here is the easy way to get around these problems.

Use PDQ Deploy to install Java on your Windows' computers. Here is a screenshot of the latest Java 8 packages in the PDQ Deploy Package Library.

Java8Packages

In most cases you can simply deploy the Java 8 Update 25 package. For computers that have problems installing this then we recommend using the ALTERNATE package. You will need a Pro or Enterprise mode license to access these packages. You can get a trial license of PDQ Deploy Enterprise and import your first three packages free of charge. 

Here is a video showing how Lex and I deploy Java to some machines and then deploy the ALTERNATE package to one failed computer.

 

 

Read More

Topics: java

Using the Adobe Customization Tool to Silently Install Reader XI

Posted by Annalisa Williams

Oct 20, 2014 1:10:00 PM

Do you need to customize?

Using the Adobe Customization Tool you can build a simple customized installation for Adobe Reader XI, but do you need a customized version? You can also use a pre-built package from the PDQ Package Library to silently install Adobe Reader XI with many of the customizations users choose anyway, such as removing desktop icons and stopping auto-updates. Still want to customize? Keep reading.

Before you get started with these steps you want to make sure you have the most recent version of Reader downloaded and of course, the Adobe Customization Wizard for your version of Reader. 

Extract the .MSI and Open in the Adobe Customization Tool

After downloading from the above link, open a command window and run the following:

AdbeRdr11000_en_US.exe -nos_o"<path_to_extract_files>" -nos_ne
adobe-customization-wizard-11-03-1

Once you've run the command you should be able to navigate to the AcroRead.msi from the Customization Wizard (File>Open Package).

Customize Your Adobe Reader Installation

For a silent installation of Adobe Reader we recommend you change the following settings:

Personalization Options

  • Check EULA Option "Suppress display of End User License Agreement (EULA)"

Installation Options

  • Under "Run Installation" section, select "Silently (no interface)". 
  • Under "If reboot required at end of installation" section, select "Suppress reboot". 
  • Additionally, under installation options you can have older versions of reader removed or set the default PDQ viewer. 

You may also want to consider making modifications to Online and Adobe online services to disable updates and purchase options. 

adobe-customization-wizard-acrobat-1

Create Transform File and Deploy

Go to Transform> Generate Transform to create your .MST file. In PDQ Deploy (you can use the free download to do this) create a new package (File>New Package) and use an install step. Click the ellipses by the Install File field and navigate to the AcroRead.msi. Select "Include Entire Directory" so that all .MST, .CAB and .INI files are included.

In the parameters field you will reference the .MST by entering: TRANSFORMS="AcroRead.mst." Then, easy enough, save, close and click deploy to select your target machines and deploy. 

Now, yes you can do all of this with Free mode but if you want to add additional steps such as a command to kill Adobe Reader processes prior to installation or schedule this to deploy during off-hours you'll need PDQ Deploy Pro or Enterprise mode (free trial key for that here, just enter the key into your download of PDQ Deploy).

 

 

Read More

Topics: adobe reader

PowerShell: Zip up files using .NET and Add-Type

Posted by Kris Powell

Oct 16, 2014 10:00:00 AM

I recently came across a need to zip up some files prior to copying them over the network. Normally, I’d simply use kris_resizedanother tool such as WinZip or 7zip, but I thought I’d like to see how PowerShell could handle it.

There are many tools out there to help you with this (7zip cli, PowerShell community extensions, etc). They’re not included with Powershell, so I decided to try and make use of the tools we have at hand.

I decided to go with a quick way to zip up files by leveraging .NET and using the cmdlet Add-Type

Zipping files with PowerShell

Note: This requires .NET 4.5 and Powershell 3+

This example script is pretty straightforward and simple.  It makes use of the System.IO.Compression.Zipfile class that was included with .NET 4.5.  We make use of the PowerShell cmdlet Add-Type to add a Microsoft .NET Framework type to the PowerShell session.  This allows to leverage .NET in our PowerShell scripts.

#############################################################################
#
# -SourceFolder    = The folder with the files you intend to zip
# -DestinationFile = The zip file that you intend to create
# -Compression     = The type of compression you'd like to use:
#                         Optimal (default option)
#                         Fastest
#                         NoCompression
# -IncludeParentDir = Setting this option will include the parent directory
#
#############################################################################

$SourceFolder    = "C:\temp\Zip This Folder"
$DestinationFile = "C:\temp\NewZip.zip"
$Compression     = "Optimal"  # Optimal, Fastest, NoCompression

Zip-Directory -DestinationFileName $DestinationFile `
    -SourceDirectory $SourceFolder `
    -CompressionLevel $Compression ` #Optional parameter
    -IncludeParentDir #Optional parameter

function Zip-Directory {
    Param(
      [Parameter(Mandatory=$True)][string]$DestinationFileName,
      [Parameter(Mandatory=$True)][string]$SourceDirectory,
      [Parameter(Mandatory=$False)][string]$CompressionLevel = "Optimal",
      [Parameter(Mandatory=$False)][switch]$IncludeParentDir
    )
    Add-Type -AssemblyName System.IO.Compression.FileSystem
    $CompressionLevel    = [System.IO.Compression.CompressionLevel]::$CompressionLevel  
    [System.IO.Compression.ZipFile]::CreateFromDirectory($SourceDirectory, $DestinationFileName, $CompressionLevel, $IncludeParentDir)
}

#############################################################################
 
Read More

Topics: powershell

Which Java 7 (or 8) Version Should I Deploy?

Posted by Shane Corellian

Oct 15, 2014 4:57:00 PM

Ha! Oracle released three new Java updates on October 14th. The obvious question is: Which Java update should I apply?

Java 7 Update 71

Java 7 Update 72

Java 8 Update 25

The answer, as usual, depends on the needs of your organization. If you have been using Java 7 then it's safe to continue using that Java family for now. I would, however, recommend that you deploy Java 8 to a few "test" computers so that you can prepare for the inevitable move to Java 8. It's important to note that Java 7 reaches its EOL (End of Life) in April, 2015.

If you're sticking with Java 7 then Oracle recommends that you deploy Update 71. From Oracle: "[Update 71] is the intended upgrade for most users." This update contains only security fixes. 

As far as Update 72 Oracle has this to say:"[Update 72] is available for developers and users requiring additional non-security improvements or for testing updated features.  You should use 7u72 if you are facing any of the specific issues as noted in its release notes, and also as part of your quality assurance cycles. These improvements and features are planned to appear as part of the next scheduled CPU in January 2015."

The PDQ Deploy Package Library has added Update 71 for Java 7 and Update 25 for Java 8. If you have Auto Deployments configured for Java then these are the versions that will (by default) be deployed.

blog-javau71-autodeployment

If there is a sufficient demand then we will certainly add Update 72 to the Package Library although it would be a separate package altogether, which means that PDQ Deploy users who have Auto Deployments configured for Java 7 wouldn't have Update 72 applied as a natural upgrade to earlier Java 7 versions.

If you use the Collection Library in PDQ Inventory then you may notice that computers running Update 71 or Update 72 will be placed in the Java 7 (Latest) collections. (See image below.)

blog-java7u71-collections

If you do need to use Java in your organization it is definitely worth the effort to test Java 8. Find out which (if any) of your Java applications or websites don't work with it. It's important to note that Oracle has now made Java 8 the default Java download on their site. If you use Java 8 then it is recommended to deploy Update 25.

Use PDQ Deploy to silently install Java in your environment, it's what we're here for after all!

Read More

Topics: java

PowerShell: Sending Email (with Gmail example)

Posted by Kris Powell

Oct 9, 2014 10:55:00 AM

It’s late on a Friday night. Like most people, you have somewhere else you would rather be. Instead, you are stuck atkris_resized work because you completely forgot about some scheduled maintenance that has to be done that night.

You’re familiar enough with PowerShell to make some scripts to take care of the maintenance, but you’re worried about the off-chance that one of the scripts fails or you’re worried that something could go wrong.

Wouldn’t it be great if you could start your scripts and configure them to email you the results? You could still get out, enjoy your Friday night and rest assured that you’re scripts are doing their job without you losing yours!

(Disclaimer: We do not condone the shirking of any responsibilities that you may have...especially on Friday nights.)

Sending Email with PowerShell

There are a multiple ways to send an email with PowerShell. This is a native cmdlet option that is simple and easy to use. It uses the cmdlet Send-MailMessage.

Send-MailMessage <parameters>

List of available parameters

-Attachments string
    The full path and filenames to be attached to the email.

-Bcc string
    Email addresses that you would like to bcc.

-Body string
   The body of the email message.

-BodyAsHtml
   Indicates that the value of the Body parameter contains HTML.

-Cc string
   Email addresses that you would like to cc.

-Credential PSCredential
   An account that has permission to send the email. The default is the current user.

-DeliveryNotificationOption Option
   Delivery notifications will be sent to the email address specified in the -From parameter.

          None - No notification (default)
          OnSuccess - Notify if the delivery is successful.
          OnFailure - Notify if the delivery is unsuccessful.
          Delay - Notify if the delivery is delayed.
          Never - Never notify.

-Encoding Encoding
   The encoding used for the body and subject. 

-From string
   
The address from which the mail is sent.

-Priority Priority
   
The priority of the email message. Valid values: Low, Normal (default), High

-SmtpServer string
   The name of the SMTP server that sends the email message.

-Subject string
 
  The subject of the email message.

-To string
   
The addresses you wish to send email to. 

-UseSsl
    
Use the Secure Sockets Layer (SSL) protocol to establish a connection to the SMTP server to send email. SSL is not used by default.

Examples of Usage:

Example 1 - Sending a simple email

Send-MailMessage -From “email@yourdomain.com” -To “AnotherEmail@yourdomain.com” -Credentials (Get-Credential) -SmtpServer “smtp.yourdomain.com”

Example 2 - Sending an email from Gmail

Here’s a full example of sending an email via Gmail’s SMTP servers.  It will prompt you for a username and password thanks to (Get-Credential).  The username needs to be <your full gmail address> and password needs to be <your gmail password>, though you could always pipe in a PSCredential and get the same effect.

 

##############################################################################
$From = "YourEmail@gmail.com"
$To = "AnotherEmail@YourDomain.com"
$Cc = "YourBoss@YourDomain.com"
$Attachment = "C:\temp\Some random file.txt"
$Subject = "Email Subject"
$Body = "Insert body text here"
$SMTPServer = "smtp.gmail.com"
$SMTPPort = "587"

Send-MailMessage -From $From -to $To -Cc $Cc -Subject $Subject `
-Body $Body -SmtpServer $SMTPServer -port $SMTPPort -UseSsl `
-Credential (Get-Credential) -Attachments $Attachment

##############################################################################

 Best of luck to you in your emailing endeavors!

Read More

Topics: powershell

Admin Arsenal Blog

Subscribe to Email Updates