Quantcast
Channel: PowerShell App Deployment Toolkit
Viewing all 2341 articles
Browse latest View live

Commented Unassigned: Feature Request: User settings function [79]

$
0
0
Sometimes you need to change user settings when deploying packages and it would be nice to have a function for this. The dream scenario would be if the function could handle these things.

- Add HKCU registry keys for users.
- Copy custom files/scripts to a folder on the client and then run this from the users context.
- Run the above file/script for the current logged in user.

The first two things is possible with scripts and Active Setup but the last one is a bit more complex which I'm not sure how to solve. I have seen other Client Management systems handle this but I don't know if it's possible with scripting only. If it isn't possible then the two first things would be nice anyway.
Comments: In our wrappers we do run the Active Setup for the profile of the installer on the spot. We also know that's a bad idea if the Installer is System/SCCM because it just pollutes the profile for nothing. Actually we have create a few: * One to generate Version stamps based on date and time (needed for re-installs to re-trigger Active setups) * One to check the folder and create the ActiveSetup in the HKLM hive. * One to remove the Active-setup in the HKLM hive for uninstalls. As for the file copy, we have something for that already which makes it moot. We create custom ARP entries for each packages so that we get uninstall logs for everything. To do that we copy all the files needed to an UNINSTALL folder. In that UNINSTALL folder is where we store the files triggered by ActiveSetup. Like I said, we have a lot of work ahead: Rolling logs, Pre/Post inventory, sanity checks, custom ARP entries with parent-child support, etc. Most of it is overkill but it's what we have in the CMD wrappers so to get buy-in we need to re-create it all in PowerShell. And I'll release what I can as extensions to this project.

New Post: SCCM PowerShell App and HKCU Registry Settings

$
0
0
Thank you both for the suggestions. I am pushing out Lync 2013 via SCCM and I added the code below. So far I think its working.

Create Active Setup to Update User Settings

Copy-File -Path "$dirSupportFiles\LyncUserSettings.cmd" -Destination "$envWindir\Installer\LyncUserSettings.cmd"
    Set-RegistryKey -Key "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{90150000-012B-0409-0000-0000000FF1CE}" -Name "" -Value "{90150000-012B-0409-0000-0000000FF1CE}" -Type String
    Set-RegistryKey -Key "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{90150000-012B-0409-0000-0000000FF1CE}" -Name "ComponentID" -Value "{90150000-012B-0409-0000-0000000FF1CE}" -Type String
    Set-RegistryKey -Key "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{90150000-012B-0409-0000-0000000FF1CE}" -Name "Version" -Value "15,0,4420,1017" -Type String
    Set-RegistryKey -Key "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{90150000-012B-0409-0000-0000000FF1CE}" -Name "StubPath" -Value "$envWindir\Installer\LyncUserSettings.cmd" -Type String
    Set-RegistryKey -Key "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{90150000-012B-0409-0000-0000000FF1CE}" -Name "Locale" -Value "EN" -Type String
Contents of "LyncUserSettings.cmd"

REG ADD "HKCU\Software\Microsoft\Office\15.0\Lync" /v TwoLineView /t REG_DWORD /d 0 /f
REG ADD "HKCU\Software\Microsoft\Office\15.0\Lync" /v ShowPhoto /t REG_DWORD /d 0 /f
REG ADD "HKCU\Software\Microsoft\Office\15.0\Lync" /v ShowFavoriteContacts /t REG_DWORD /d 0 /f
REG ADD "HKCU\Software\Microsoft\Office\15.0\Lync" /v MinimizeWindowToNotificationArea /t REG_DWORD /d 1 /f
REG ADD "HKCU\Software\Microsoft\Office\15.0\Lync" /v AutoOpenMainWindowWhenStartup /t REG_DWORD /d 0 /f

I based it on JNoxon post found here: http://psappdeploytoolkit.codeplex.com/discussions/470880

New Post: Error: App Deploy Toolkit Main requires Administrator rights...

$
0
0
I'm gonna sound like a broken record because I just suggested this in the "General" forum, but I think it's valid here.

If the user is currently logged in and I need to alter their HKCU keys or install something to their AppData, I use RunAsCurrentUser to execute a reg add or whatever.
http://software.bigfix.com/download/bes/util/RunAsCurrentUser-2.0.3.1.exe

So for instance, in my deployment, I needed to make sure that a file was copied in to the logged-in user's AppData folder. Within my Deploy-Application.ps1 I have this:
 $CMD = 'Files\RunAsCurrentUser.exe'
 $arg1 = '--w'
 $arg2 = 'cmd.exe'
 $arg3 = '/c'
 $arg4 = 'xcopy'
 $arg5 = 'Files\deployment.properties'
 $arg6 = '%USERPROFILE%\AppData\LocalLow\Sun\Java\Deployment\'
 $arg7 = '/y'
 & $CMD $arg1 $arg2 $arg3 $arg4 $arg5 $arg6 $arg7
I know that looks silly but I was having a hard time calling it with Execute-Process for some reason. Anyway, I'm sure you see where you could plug in an uninstall script there. RunAsCurrentUser.exe is still being run as the SYSTEM account, and all the changes are being made to whoever is currently logged in to the computer. Pretty cool, eh?

EDIT: There's not a lot out there on this application, so here's a quick link on use.
http://www-01.ibm.com/support/docview.wss?uid=swg21506033

New Post: New to the toolkit

$
0
0
I think this will help me do what I've been tasked with, but hopefully you can tell me.

I need to uninstall Adobe Acrobat Pro X, from a bunch of computers in my environment. I tried initially, with a simple package and program in SCCM 2012, and had a very low success rate. I think it is because there were apps open on the clients that Acrobat hooks into, and therefore broke.

I see that the toolkit is able to uninstall various versions of software, just with a product name. Does this include Acrobat Pro? Due to updates, we have various "versions" of Acrobat X Pro, therefore different GUIDS, so the normal uninstall of referencing the GUID may not work for me.

Any tips/suggestions?

Thanks,

Joe

New Post: New to the toolkit

$
0
0
You've certainly come to the right place, friend. If you download PSADT you'll see that one of the included Examples is for Adobe Reader. I can tell you from extremely recent experience that referencing the apps to uninstall by name is awesome, and works for Adobe Reader (and acro pro).

Just imagine being able to type in
    Remove-MSIApplications "Java(TM) 6 Update"
and all of your ancient versions of Java 6 are removed! So good!

New Post: New to the toolkit

$
0
0
Yes, that sounds awesome. I have downloaded the toolkit, and I've just started to read the Administrator Guide. But, is it possible to use the uninstall as you mentioned above, without installing anything else? I just need to uninstall Acrobat Pro from a bunch of machines, without installing anything else.

New Post: New to the toolkit

$
0
0
Yes you can use this function to create an installation deployment that actually just performs an uninstallation. You would just need to consider your detection method that would work across all machines, I'd suggest dropping a registry key marker for this to indicate the uninstallation has run using Set-RegistryKey.

New Post: How is the best way to test scripts

$
0
0
Hello ,

I´m new to this ADT and it rocks. But I´m wondering how is the best way to develop scripts and test them ?

I´ve tried the Deploy-Application.exe /install , but its not working. I then whent to powershell manually and executed the script. That worked although I had to allow the script to [R]un once several times.

It seems that its those scripts does also not worki in Powershell ISE, so can you direct me
how is the best method of testing scripts ?

Also wondering about the uninstall codes : How can you obtain them ? Is there a global list ?

New Post: Potential Bug in 3.1.6/3.2.0 Beta

$
0
0
I am taking a look at this issue to see what the problem is. Can you please tell me what version of PowerShell you are using?

Commented Unassigned: Feature Request: User settings function [79]

$
0
0
Sometimes you need to change user settings when deploying packages and it would be nice to have a function for this. The dream scenario would be if the function could handle these things.

- Add HKCU registry keys for users.
- Copy custom files/scripts to a folder on the client and then run this from the users context.
- Run the above file/script for the current logged in user.

The first two things is possible with scripts and Active Setup but the last one is a bit more complex which I'm not sure how to solve. I have seen other Client Management systems handle this but I don't know if it's possible with scripting only. If it isn't possible then the two first things would be nice anyway.
Comments: I have a VBScript which does all of what you are describing above. I've been meaning to convert this to PowerShell code for a while now and probably will do so in the next two to three weeks and share it with the community here. In the mean time, here is the VBScript for you viewing pleasure or if you want to take a crack at converting to PowerShell yourself.

New Post: Potential Bug in 3.1.6/3.2.0 Beta

$
0
0
PowerShell 2.0, the default version on Win7.

There is no plan to upgrade all machines to 3.0.

New Post: Small Visual Bug

$
0
0
I noticed when I added "Microsoft Office Project Professional 2010" into the $appName variable in the PS1 file, the spaces are removed on the post install Show-InstallationPrompt. I just switched to PSAppDeployToolkit_v3.1.5 and didn't notice this in the previous version.

New Post: Execute-Process

$
0
0
It's a while since I wrote a script to do this and I don't have a copy of it handy. Have you tried Start-Process -Wait? If none of the execution cmdlets/functions are waiting for the process you could consider using the Wait-Process cmdlet or parsing the log file.

New Post: Error: App Deploy Toolkit Main requires Administrator rights to function. Please re-run the deployment script as an Administrator.

$
0
0
The toolkit is failing because it's detecting that it's not being run as administrator. Can you run this line of code and let me know if it returns true or false:

([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")

New Post: Unable to show welcome message when deplpoying via SCCM 2012

$
0
0
Not sure that is a toolkit question? I'd suggest posting to MS ConfigMgr forums.

New Post: How is the best way to test scripts

$
0
0
Hello yes this is solved, I can actually run the script in Powershell, but I had to create a Policy in AD allowing at least me to execute scripts.
The msi uninstall codes , like Adobe Acrobat reader is {AC76BA86-7AD7-1033-7B44-AB0000000001}, but for any oter program. I found those "codes" in SCCM whe I create an appication deploy.

I don't understan toug why you are useing UTF-16, because there are actually few editors arount that support it. UTF-8 is better , but some editors , like Textpad does not actually save the UTF-8 codes even though it says it does. I use komodo light, but I can not use it with utf-16. There are two utf-16 supported but not te one you are using.

New Post: Function Execute-Process in 3.2.0 Beta

$
0
0
Hi Andy,

Actually the toolkit was built on PS2.0, we maintain backwards compatibility so don't add any cmdlets that are specific to PS 3.0. I wasn't able to reproduce the error you mentioned on either PS 2.0 or 3.0 but I've included the suggested fix in the 3.2 release.

Thanks,
Sean

New Post: Installing Updates

$
0
0
Execute-Process -FilePath "C:\Windows\System32\wusa.exe" -Arguments "$dirFiles\IE9-Windows6.1-KB2962872-x64.msu /quiet /norestart" -WindowStyle Hidden

New Post: Small Visual Bug

$
0
0
This will be fixed in the next release.

Source code checked in, #073838da6eeefddaa2ddbd4f6b3e9d77c51e4569

$
0
0
Fixed issue where script would stop if file path could not be found in Execute-Process Updated documentation
Viewing all 2341 articles
Browse latest View live


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