2

Closed

Problem with Toolkit 3.6.1 on W7

description

I have a problem with deployment apps on Windows 7Pro X64. The same script started on W8 works fine.
Attached is the log from affected system:

file attachments

Closed Apr 14, 2015 at 12:00 PM by mmashwani

comments

mmashwani wrote Apr 13, 2015 at 7:34 AM

Can you test with the latest 3.6.2 beta from under the "Source Code" tab of the site and see if your issue is resolved?

allman wrote Apr 13, 2015 at 8:01 AM

No. it does not

mmashwani wrote Apr 13, 2015 at 9:20 AM

Ok, it was worth a try. Based on the log, I can't really tell much. You will have to do some more troubleshooting and provide me with more information. Everything in the log seems to be fine. There is no error. It just kind of stops at a certain point. Is there some kind of error that shows up on screen but isn't captured in the log?

BigHatte wrote Apr 13, 2015 at 9:49 AM

If have the same Error. When I start the Deploy-Application.ps1 File in ISE. I see an Error that the Script cannot Access the Registry Key

HKEY_USERS++ID++\Control Panel\International\User Profile..

on my Windows 7 Machine This Key doesn't exist. On Windows 8.1 it is there.

mmashwani wrote Apr 13, 2015 at 9:54 AM

@BigHatte
There is no error in the log file provided by allman. I can't really tell what his issue might be. However, I do know about the issue you're referring to and it has been resolved in the 3.6.2 beta found under the "Source Code" tab of this site.

BigHatte wrote Apr 13, 2015 at 10:01 AM

Here a Screenshot

mmashwani wrote Apr 13, 2015 at 10:35 AM

@BigHatte
Does the 3.6.2 beta fix your issue?

mmashwani wrote Apr 13, 2015 at 10:37 AM

You're right about the key not existing on Win 7. A different registry key check will need to be added for Win 7 machines. However, the current 3.6.2 beta should not throw an error anymore at the very least.

allman wrote Apr 13, 2015 at 10:42 AM

After script is started from powershell following error:
Write-Error : Module [C:\ADOBE_READER_DC\AppDeployToolkit\AppDeployToolkitMain.ps1] failed to load:
Parameter attributes need to be a constant or a script block.

At C:\ADOBE_READER_DC\AppDeployToolkit\AppDeployToolkitMain.ps1:2556 char:38
  • [ValidateRange(-1,[int32]::MaxValue <<<< )]
    At C:\ADOBE_READER_DC\Deploy-Application.ps1:93 char:14
  • Write-Error <<<< -Message "Module [$moduleAppDeployToolkitMain] failed to load: n$($_.Exception.Message)n
    `n$($_.InvocationInfo.PositionMessage)" -ErrorAction 'Continue'
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Microsoft.PowerShell.Commands.WriteErr
      orCommand

mmashwani wrote Apr 13, 2015 at 11:20 AM

@allman
In function Test-IsMutexAvailable, change following line
[ValidateRange(-1,[int32]::MaxValue)]
to
[ValidateScript({($_ -ge -1) -and ($_ -le [int32]::MaxValue)})]
Let me know if that fixes your issue.

allman wrote Apr 13, 2015 at 12:19 PM

It works now and package is installed, but GUI is not translated to Polish even if UI translation exist in config file.
Is it possible to make it working on 3.6.1?

mmashwani wrote Apr 13, 2015 at 12:47 PM

Can you share your full log file from the install where it succeeded but the UI translation from the config file was not used?

BigHatte wrote Apr 13, 2015 at 12:51 PM

No I'm sorry. I'm not able to find the correct code for Version 3.6.2.

I am currently running a very large Deployment so i reverd back to 3.5.0 witch ran very stable for me in the Past. Now I have a Little bit more coding because of missing MSI detection but for now it is safer.

allman wrote Apr 13, 2015 at 2:07 PM

@mmashwani
log is attached

MaartenPauchet wrote Apr 13, 2015 at 2:17 PM

have the same issue on a win7 client here also. attached the log as I ran it from the ISE as the actual log generated by the kit itself just halts at the user detection part.

Maarten

mmashwani wrote Apr 13, 2015 at 9:25 PM

@allman
Change the following script block in the toolkit: [scriptblock]$xmlLoadLocalizedUIMessages

with the following bit of code right at the very top of the script block definition:
#  If a user is logged on, then get primary UI language for logged on user (even if running in session 0)
    If ($RunAsActiveUser) {
        #  Read language for Win 8 machines
        [string[]]$HKULanguages = Get-RegistryKey -Key 'HKCU\Control Panel\International\User Profile' -Value 'Languages' -SID $RunAsActiveUser.SID
        #  Read language for Win Vista/Win 7 machines
        If (-not $HKULanguages) {
            [string[]]$HKULanguages = Get-RegistryKey -Key 'HKCU\Control Panel\Desktop' -Value 'PrefferedUILanguages' -SID $RunAsActiveUser.SID
        }
        If (-not $HKULanguages) {
            [string[]]$HKULanguages = Get-RegistryKey -Key 'HKCU\Control Panel\Desktop\MuiCached' -Value 'MachinePreferredUILanguages' -SID $RunAsActiveUser.SID
        }
        If (-not $HKULanguages) {
            [string[]]$HKULanguages = Get-RegistryKey -Key 'HKCU\Control Panel\International' -Value 'LocaleName' -SID $RunAsActiveUser.SID
        }
        #  Read language for Win XP machines
        If (-not $HKULanguages) {
            [int32]$HKULocale = Get-RegistryKey -Key 'HKCU\Control Panel\International' -Value 'Locale' -SID $RunAsActiveUser.SID
            If ([string]$HKULocale) {
                [int32]$HKULocale = '0x' + $HKULocale
                [string[]]$HKULanguages = ([System.Globalization.CultureInfo]($HKULocale)).Name
            }
        }
        If ($HKULanguages) {
            [string]$HKUPrimaryLanguageShort = ([System.Globalization.CultureInfo]($HKULanguages[0])).TwoLetterISOLanguageName.ToUpper()
            [string]$xmlUIMessageLanguage = "UI_Messages_$HKUPrimaryLanguageShort"
        }
    }
    #  Default to UI language of the account executing current process (even if it is the SYSTEM account)
    Else {
        [string]$xmlUIMessageLanguage = "UI_Messages_$currentLanguage"
    }
I'm hoping this resolves your issue.

mmashwani wrote Apr 13, 2015 at 9:27 PM

@Maarten
Please upgrade to 3.6.2 beta or wait for us to release the final very soon.

mmashwani wrote Apr 14, 2015 at 12:57 AM

Sorry, it should look more like this:
#  If a user is logged on, then get primary UI language for logged on user (even if running in session 0)
If ($RunAsActiveUser) {
    #  Read language for Win 8 machines
    [string[]]$HKULanguages = Get-RegistryKey -Key 'HKCU\Control Panel\International\User Profile' -Value 'Languages' -SID $RunAsActiveUser.SID
    #  Read language for Win Vista/Win 7 machines
    If (-not $HKULanguages) {
        [string[]]$HKULanguages = Get-RegistryKey -Key 'HKCU\Control Panel\Desktop' -Value 'PrefferedUILanguages' -SID $RunAsActiveUser.SID
    }
    If (-not $HKULanguages) {
        [string[]]$HKULanguages = Get-RegistryKey -Key 'HKCU\Control Panel\Desktop\MuiCached' -Value 'MachinePreferredUILanguages' -SID $RunAsActiveUser.SID
    }
    If (-not $HKULanguages) {
        [string[]]$HKULanguages = Get-RegistryKey -Key 'HKCU\Control Panel\International' -Value 'LocaleName' -SID $RunAsActiveUser.SID
    }
    #  Read language for Win XP machines
    If (-not $HKULanguages) {
        [int32]$HKULocale = Get-RegistryKey -Key 'HKCU\Control Panel\International' -Value 'Locale' -SID $RunAsActiveUser.SID
        If ([string]$HKULocale) {
            [int32]$HKULocale = '0x' + $HKULocale
            [string[]]$HKULanguages = ([System.Globalization.CultureInfo]($HKULocale)).Name
        }
    }
    If ($HKULanguages) {
        [string]$HKUPrimaryLanguageShort = ([System.Globalization.CultureInfo]($HKULanguages[0])).TwoLetterISOLanguageName.ToUpper()
    }
}

If ($HKUPrimaryLanguageShort) {
    #  Use the primary UI language of the logged in user
    [string]$xmlUIMessageLanguage = "UI_Messages_$HKUPrimaryLanguageShort"
}
Else {
    #  Default to UI language of the account executing current process (even if it is the SYSTEM account)
    [string]$xmlUIMessageLanguage = "UI_Messages_$currentLanguage"
}

allman wrote Apr 14, 2015 at 4:44 AM

Now, GUI starts without any translation, See atachement

mmashwani wrote Apr 14, 2015 at 11:59 AM

We have moved to a new homepage! You can now find us as http://psappdeploytoolkit.com.

This issue has been fixed in the latest 3.6.2 produciton release on our new repository on GitHub.
https://github.com/PSAppDeployToolkit/PSAppDeployToolkit/releases