Quantcast
Channel: psappdeploytoolkit Discussions Rss Feed
Viewing all 1769 articles
Browse latest View live

New Post: Set-ActiveSetup Not Working

$
0
0
I ran the Set-ActiveSetup command you shared above and the my log file showed me this error:
[Pre-Installation] :: Failed to set Active Setup registry entry. 
Error Record:
-------------

Message        : Exception calling "GetExtension" with "1" argument(s): "Illegal characters in path."
InnerException : System.ArgumentException: Illegal characters in path.
                    at System.IO.Path.GetExtension(String path)
                    at CallSite.Target(Closure , CallSite , RuntimeType , Object )

FullyQualifiedErrorId : ArgumentException
ScriptStackTrace      : at Set-ActiveSetup<Process>, 
                        D:\Development\psappdeploytoolkit\Toolkit\AppDeployToolkit\AppDeployToolkitMain.ps1: line 7987
                        at <ScriptBlock>, D:\Development\psappdeploytoolkit\Testing\Deploy-Application.ps1: line 111
                        at <ScriptBlock>, <No file>: line 1

PositionMessage : At D:\Development\psappdeploytoolkit\Toolkit\AppDeployToolkit\AppDeployToolkitMain.ps1:7987 char:4
                  +             [string]$StubExeExt = [System.IO.Path]::GetExtension($StubExePath)
                  +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Error Inner Exception(s):
-------------------------

Message        : Illegal characters in path.
InnerException : 
Looking at your command again, you have the wrong path for -StubExePath. That parameter should only have the path of the file you wish to execute. Then use the -Arguments parameter to pass the -StubExePath any other options. Therefore, your command should look like this:
Set-ActiveSetup -StubExePath "$envWinDir\regedit.exe" -Arguments "/S `"%SystemDrive%\Program Files (x86)\DataLink Viewer 11\DesChampsLive_DataLink_Viewer.reg`"" -Description 'VA Database ODBC Setup' -Key 'DataLinkViewer_ODBC_UserSetup' -ContinueOnError $true

New Post: Show-InstallationPrompt Fails to display on specific conditions PSADTv3.5 & v3.6

$
0
0
The Show-InstallationPrompt Fails to display a MsgBox indicating that the App was successfully uninstalled, yet the log entries below seem to suggest that the Show-InstallationPrompt was processed successfuly.
[03-20-2015 18:58:18.015] [Uninstallation] [Show-InstallationPrompt] :: Displaying custom installation prompt with the non-default parameters: [-NoWait:$true -Icon "Information" -ButtonMiddleText "OK" -Message "The uninstallation of Wireshark 1.12.4 complete."]...
[03-20-2015 18:58:18.166] [Post-Uninstallation] [Exit-Script] :: @{InstallSource=; UninstallString="C:\Program Files\Wireshark\uninstall.exe"; Is64BitApplication=False; ProductCode=Wireshark; InstallLocation=C:\Program Files\Wireshark; Publisher=The Wireshark developer community, http://www.wireshark.org; InstallDate=; DisplayVersion=1.12.4; DisplayName=Wireshark 1.12.4 (64-bit)} Uninstallation completed with exit code [0].
[03-20-2015 18:58:18.214] [Post-Uninstallation] [Show-BalloonTip] :: Display balloon tip notification asyhchronously with message [Uninstallation complete.]
Development-Deploy-Application.ps1
Show-InstallationPrompt -Message "The uninstallation of $DisplayName $DisplayVersion complete." -ButtonMiddleText 'OK' -Icon Information -NoWait    
Moreover, Show-InstallationPrompt Fails to display a MsgBox indicating that the App was detected prior to making an installation attempt based on a custom parameter that calls a function to process detection logic to call Show-InstallationPrompt if the condition is met. This failure is as consistent as the one listed above.
AppDeployToolkitExtensions.ps1
Function IsInstallStatus {
    if ($InstallName -and $InstallVersion) {
        Show-InstallationPrompt -Message "$DisplayName $DisplayVersion is installed." -ButtonMiddleText 'OK' -Icon Information -NoWait; Write-Log "ErrorCode Return value is: 1638, proceeding."; Exit-Script -ExitCode 1638
    } else {
        Write-Log -Message "$DisplayName $DisplayVersion not installed, proceeding."
    }
}
Conversely, the Show-InstallationPrompt consistently passes when displaying a MsgBox indicating that the App was successfully installed as suggested by the log entries below.
[03-20-2015 19:04:29.759] [Post-Installation] [Show-InstallationPrompt] :: Displaying custom installation prompt with the non-default parameters: [-NoWait:$true -Icon "Information" -ButtonMiddleText "OK" -Message "The installation of Wireshark 1.12.4 complete."]...
[03-20-2015 19:04:29.900] [Post-Installation] [Exit-Script] :: Installation completed with exit code [0].
[03-20-2015 19:04:29.933] [Post-Installation] [Show-BalloonTip] :: Display balloon tip notification asyhchronously with message [Installation complete.]
Development-Deploy-Application.ps1
Show-InstallationPrompt -Message "The installation of $DisplayName $DisplayVersion complete." -ButtonMiddleText 'OK' -Icon Information -NoWait
Furthermore, Show-InstallationPrompt consistently passes when displaying a MsgBox indicating that the App was detected prior to making an uninstallation attempt based on a custom parameter that calls a function to process detection logic to call Show-InstallationPrompt if the condition is met as suggested by the log entries below.
[03-20-2015 19:01:41.873] [Pre-Uninstallation] [Show-InstallationPrompt] :: Displaying custom installation prompt with the non-default parameters: [-NoWait:$true -Icon "Information" -ButtonMiddleText "OK" -Message "Wireshark 1.12.4 not installed."]...
03-20-2015 19:01:41.930] [Pre-Uninstallation] :: ErrorCode Return value is: 1605, proceeding.
[03-20-2015 19:01:41.994] [Pre-Uninstallation] [Exit-Script] :: Uninstallation completed with exit code [1605].
[03-20-2015 19:01:42.027] [Pre-Uninstallation] [Show-BalloonTip] :: Display balloon tip notification asyhchronously with message [Uninstallation failed.]
AppDeployToolkitExtensions.ps1
Function IsUninstallStatus {
    if ($InstallName -and $InstallVersion) {
        Write-Log -Message "$DisplayName $DisplayVersion is installed, proceeding."
    } else {
        Show-InstallationPrompt -Message "$DisplayName $DisplayVersion not installed." -ButtonMiddleText 'OK' -Icon Information -NoWait; Write-Log "ErrorCode Return value is: 1605, proceeding."; Exit-Script -ExitCode 1605
    }
    
} 
I would have loved to include both the AppDeployToolkitExtensions.ps1 and the Development-Deploy-Application.ps1, but there doesn't appear a to be a method by which to upload the files for review. Once again I'm missing something. I am grateful for all of the expert assistance that I've retrieved with other problems. Thanks in advance for your expert advice.

Best Regards'

YVes

New Post: Error while checking running applications (3.6.0)

$
0
0
Hi,

I'm not totally sure but I think I might have stumbled upon a bug in 3.6.0.

Trying to update to the latest flash plugin, and using the CloseApps parameter to prompt user to close IE, Chrome and/or Firefox. It runs just fine on some machines, but has given an error on others.

Here's what the log says on the failing machines:
[Pre-Installation] :: Check for running application(s) [iexplore,chrome,firefox]... Get-RunningProcesses    23.03.2015 14:01:34 28720 (0x7030)
[Pre-Installation] :: The following processes are running: [iexplore]   Get-RunningProcesses    23.03.2015 14:01:34 28720 (0x7030)
[Pre-Installation] :: Resolve process descriptions...   Get-RunningProcesses    23.03.2015 14:01:34 28720 (0x7030)
[Pre-Installation] :: Finished checking running application(s). Get-RunningProcesses    23.03.2015 14:01:34 28720 (0x7030)
[Pre-Installation] :: Error Record:
-------------

Message        : Cannot process argument because the value of argument "obj" is
                  null. Change the value of argument "obj" to a non-null value.
InnerException : 

FullyQualifiedErrorId : ArgumentNull,Microsoft.PowerShell.Commands.SelectObject
                        Command
ScriptStackTrace      : at Show-InstallationWelcome<Process>, C:\WINDOWS\ccmcac
                        he\2s\AppDeployToolkit\AppDeployToolkitMain.ps1: line 4
                        912
                        at <ScriptBlock>, C:\WINDOWS\ccmcache\2s\Deploy-Applica
                        tion.ps1: line 102
                        at <ScriptBlock>, <No file>: line 1
                        at <ScriptBlock>, <No file>: line 1

PositionMessage : At C:\WINDOWS\ccmcache\2s\AppDeployToolkit\AppDeployToolkitMa
                  in.ps1:4912 char:64
                  +                 [string]$runningProcessDescriptions = ($run
                  ningProcesses | Select-Object -Ex ...
                  +                                                            
                                  ~~~~~~~~~~~~~~~~~



    Deploy Application  23.03.2015 14:01:34 28720 (0x7030)
I am using the application model in SCCM (2012 R2 CU4) and have a Install.bat firing off the following command running as system:
  • %cd%\ServiceUIx64.exe %cd%\Deploy-Application.exe
I've also ticked the box "Run installation [...] as 32-bit process [...]" as it has worked great with all my previous 3.5.0-deployments.

User experience is set as a follows:
  • Installation behaviour: Install for system
  • Logon requirement: Whether or not user is logged on
  • Installation program visibility: Normal
I've tried out different scenarios with user being logged on and with combinations of the three processes running. All results in same error.

If I change the script to only look for iexplore and not the other two it runs without errors.

Below is my Show-InstallationWelcome command:
Show-InstallationWelcome -CloseApps 'iexplore,chrome,firefox' -AllowDefer -DeferTimes 3 -CheckDiskSpace -PersistPrompt
Heres a technet discussion on the error code but I'm unsure of how to implement this in the code (if possible even).

Any suggestions :)?

Thanks in advance!
/Pelle

EDIT: Uploaded entire log to my onedrive:
https://onedrive.live.com/?cid=e3c81887059daa14&id=E3C81887059DAA14%2114310

New Post: Error while checking running applications (3.6.0)

$
0
0
Ok, so I've discovered that the error only occurs when any of the processes is in a hung state (i.e. the process is running but GUI is not showing) as the script executes. Unfortunately this seems to be fairly common in my environment as my package only has been tested out on a few machines and the error has happened at numerous occations already.

I should mention that both Firefox and Chrome are App-V 5.0 based deployments.

Nevertheless, it seems to me that the script is having issues detecting / ending processes in an erroring state.

New Post: Error while checking running applications (3.6.0)

$
0
0
The failure is occurring when we try to use Select-Object to expand the value of the Description field for the process. My guess is that when a process gets into a hung state, windows is not able to access the Description field of the process anymore and when we try to access it and expand the value, we end up with an error.

I've added a check to make sure the Description filed of a process is not $null before we try to expand that value by adding the following bit of code: Where-Object { $null -ne $_.Description }

You can find the latest 3.6.1 beta under the "Source Code" tab of this site for testing purposes. We will probably have a final release out some time this week.

New Post: Progress bar rather than spinning icon?

$
0
0
Hi Guys

Is there any way to customise PADT deployments to show a progress bar instead. I was considering using Write-Progress. Not sure if this would work or where to put it if I am honest.

Any chance this is possible?

Thanks in advance
NN

New Post: SCCM 2012 settings

$
0
0
What is the commandline you are using. Did you try: Deploy-Application.EXE -DeploymentType Install
This works for me.

Make sure your packages works locally first by running the Deploy-Application.EXE.

Thanks
NN

New Post: Progress bar rather than spinning icon?

$
0
0
NakedNuts wrote:
Hi Guys

Is there any way to customise PADT deployments to show a progress bar instead. I was considering using Write-Progress. Not sure if this would work or where to put it if I am honest.

Any chance this is possible?

Thanks in advance
NN
A marquee style progress indicator would be nice!

Yves.

New Post: Error while checking running applications (3.6.0)

$
0
0
Thank you for the quick response! I'll try it out throughout the day and come back with the results as soon as I have them!

New Post: Error while checking running applications (3.6.0)

$
0
0
I've deployed the package to a couple of machines now, and have not experienced any issues after the fix.

Thank you heaps!!

In case anyone reading this wondering what file to download:
It's the AppDeployToolkitMain.ps1 under the following path Sources\Toolkit\AppDeployToolkit\AppDeployToolkitMain.ps1, but I'm the content on that page could change at any time so be aware of the date this was posted.

New Post: Messages displayed in the (Primary) Language of the current Logged on User

$
0
0
To Display Messages in a Language there are 2 options:
Use the Culture or use override for the Default Language in the XML for All users
  • Our application (in SCCM) runs under System Account (So System Account Culture is got - I think)
We have Languages Packs installed.
I Like to have the messages displayed in the (Primary) Language of the current Logged on User

Found out that the Primary set Language is set here:
HKEY_CURRENT_USER\Control Panel\International\User Profile\Languages
Which Gives e.g. : "nl-NL en-US"
The first Culture nl-NL in the value is always the Primary Language set by the user.

Thought about using the Override value in the XML e.g.
<InstallationUI_LanguageOverride>HKU</InstallationUI_LanguageOverride>
If HKU then get the current users Primary Language

Tried this:

$DOMAIN = [string]$usersLoggedOn.Split('\')[[string]$usersLoggedOn.Split('\').Count-2]
$USER = [string]$usersLoggedOn.Split('\')[[string]$usersLoggedOn.Split('\').Count-1]
$HKUSID = ([wmi]"win32_userAccount.Domain='$DOMAIN',Name='$USER'").sid

$HKULanguages = Get-RegistryKey -SID $HKUSID "HKEY_CURRENT_USER\Control Panel\International\User Profile" -Value 'Languages'

$HKUPrimaryLanguageShort = $HKULanguages.substring(0,2)[0].ToUpper()
[string]$xmlUIMessageLanguage = "UI_Messages_$HKUPrimaryLanguageShort"
Which gives : UI_Messages_<Primary Language>
In this case: UI_Messages_NL

Get it to work manually in Powershell ISE, but when I deploy, the App the failed
on:
$HKULanguages = Get-RegistryKey -SID $HKUSID "HKEY_CURRENT_USER\Control Panel\International\User Profile" -Value 'Languages'

Any other ideas getting this to work ?

Kind regards
Edwin

New Post: Progress bar rather than spinning icon?

$
0
0
Technically yes this is feasible. However the progress dialog is written in Windows Presentation Format to achieve the multi threaded UI that runs in parallel to the installation. Adding an indeterminate progress bar is not as straight forward as one would think especially if you are familiar with Windows Forms as with WPF you need to write custom code to essentially animate the progress bar. If someone from the community wants to contribute the code for this we can look at including it but for now it would not be a priority.

Am 23.03.2015 um 17:00 schrieb NakedNuts <[email removed]>:

From: NakedNuts

Hi Guys

Is there any way to customise PADT deployments to show a progress bar instead. I was considering using Write-Progress. Not sure if this would work or where to put it if I am honest.

Any chance this is possible?

Thanks in advance
NN

New Post: Is this a bug?

$
0
0
I noticed an anomaly in an attempt to isolate another anomaly.
## Build the Installation Name
If ($appArch) {
    [string]$installName = $appVendor + '_' + $appName + '_' + $appVersion + '_' + $appArch + '_' + $appLang + '_' + $appRevision
}
Else {
    [string]$installName = $appVendor + '_' + $appName + '_' + $appVersion + '_' + $appLang + '_' + $appRevision
}
[string]$installName = $installName.Trim('_') -replace '[_]+','_'
should resolve to (at least it does initially)
PS_Wireshark_1.12.4_EN_01
and if that is correct then
Write-Log -Message "[Custom-logging] :: [$installName] :: -CheckExist parameter was applied. Proceeding, please wait."
should resolve to
[03-24-2015 18:35:05.848] [Pre-Uninstallation] :: [Custom-logging] :: [PS_Wireshark_1.12.4_EN_01] :: -CheckExist parameter was applied. Proceeding, please wait.
instead it resolved to
[03-24-2015 18:35:05.848] [Pre-Uninstallation] :: [Custom-logging] :: [@{InstallSource=; UninstallString="C:\Program Files\Wireshark\uninstall.exe"; Is64BitApplication=False; ProductCode=Wireshark; InstallLocation=C:\Program Files\Wireshark; Publisher=The Wireshark developer community, http://www.wireshark.org; InstallDate=; DisplayVersion=1.12.4; DisplayName=Wireshark 1.12.4 (64-bit)}] :: -CheckExist parameter was applied. Proceeding, please wait.
When called via a custom function in the AppDeployToolkitExtensions.ps1

New Post: Is this a bug?

$
0
0
Disregard. I recycled the wrong variable. Problem solved.

New Post: Deployment Script: IE10 needs one reboot (x86 and X64)

$
0
0
I am curious how the installer works:

cmd.exe /c "C:\Windows\System32\dism.exe /online /add-package /packagepath:$dirfiles\IE10-neutral.Downloaded.cab /quiet /norestart"

It seems that I am missing something pretty big as I don't have that file anywhere.

If i run the ie setup the files are supposed to be located in TEMP, but they are not.

Is that essentially how you get the files, then put them all in your "Files" folder?

New Post: Show-InstallationPrompt Fails to display on specific conditions PSADTv3.5 & v3.6

$
0
0
Apparently there was is a variable $InstallName in the AppDeployToolkitMain.ps1 that I was unaware existed and I learned the hard way the effects of inadvertently recycling/ re-purposing variables that have already been declared. I renamed the variable $InstallName in my Deploy-Application.ps1 to $InstallDisplayName and problem solved.

New Post: Messages displayed in the (Primary) Language of the current Logged on User

$
0
0
What was the error? Can't really help without that information. The ISE probably loads functions and make them available for you to use no matter where you choose to use them. However, when you deploy a script, you have to make sure you use a function after you have declared it. Make sure you're using the Get-RegistryKey function after the section where functions are declared.

New Post: Progress bar rather than spinning icon?

$
0
0
Thanks for the reply. I thought this may be more difficult than it seemed. Unfortunately I wont be able to help with the code although I would have been more than willing.

New Post: Messages displayed in the (Primary) Language of the current Logged on User

$
0
0

Hello Mmashwani,

Thanks for your fast reaction !

What do you think of the (to be build) feature?

What’s the normal way of working. Must I react via the Blog or can this done via Email?

Or .. e.g. If we have the answer then post it to the blog?

I’ll check the PS again. I’m a new PowerSheller.

Or…Can I sent you the draft PS1 file. So that you can advise or use the feature?

Kind regards,

Edwin

New Post: Messages displayed in the (Primary) Language of the current Logged on User

$
0
0
I think it's a good feature.

Let's keep the conversation in the thread. You can private message me with a link to logs. If you can post the error message here when we can probably figure out what the problem is without looking at logs or the script. The error messages are usually pretty descriptive.
Viewing all 1769 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>