SQL Query App-V 5.0 Usage
Posted by N. Moseley in App-V 5.0 on May 12, 2013
You can use the following query on your App-V 5.0 reporting server database (AppVReporting) to get application usage information for which users ran which software on which systems and when.
select distinct username, host_name, app_name, start_time from dbo.ApplicationUsage APPU join dbo.ClientInformation CLIINFO on APPU.host_id=CLIINFO.host_id order by start_time desc
Scripting Sybase PowerDesigner Viewer 16.x
Posted by N. Moseley in ConfigMgr 07, ConfigMgr 12, Scripting, Troubleshooting on May 8, 2013
Ran into a curious situation when automating the installation of Sybase PowerDesigner Viewer 16. If you just want the answer, then jump to the bottom of this post :-)
The installer was built as a self-extracting InstallShield setup. Typically, for a ConfigMgr package I like to use the extracted files. However, when attempting to run the Setup of the InstallShield installation, an error was generated that “setup.cab” was missing from “Disk2″. This was issue #1.
Since there was no “disk 2″, so I reverted back to just using the native, self-extracting installer. This appeared like it was going to be fairly simple as all defaults were going to be used. Most times, just using /s is enough to complete the silent installation. But no, this would be too easy. The installation would still not run unattended. Eventually I discovered that the only way to automate a silent installation was to create and include a setup.iss record file. Again, this is despite that only the defaults were being used and that a basic setup.iss was already included as part of the extracted files. This was issue #2.
So have we finally figured out how to automate the silent install? Of course not – there is no reason that a simple application should be so easy to automate. Running the install as PDV_16.exe /s /f1″setup.iss” would absolutely install PDV…when executed manually. As soon as it was deployed using ConfigMgr, the setup would fail with an error. Why oh why!?! Turns out that their installer also hates to be run in System context. Which is what we all know is how ConfigMgr needs to do it, especially for Task Sequences. This was issue #3.
After tussling with this application, I finally figured out that not only is a recorded installation (setup.iss) necessary, but so is specifying a location for the log file!! Conclusion? I despise Sybase installers. Answer? Use the following command line.
PDV_16.exe /s /f1"setup.iss" /f2"c:\windows\temp\pdvsetup.log"
One last comment. Make sure the log file is specified in a directory that already exists (such as c:\windows\temp), otherwise you end up with Issue #4. And use a wrapper (such as a batch file) to specify the current working directory of the setup.iss file, otherwise you’ll end up with Issue #5. If using a batch file, the command would like this for your ConfigMgr package:
"%~dp0PDV_16.exe" /s /f1"%~dp0setup.iss" /f2"c:\windows\temp\pdvsetup.log"
Setting up Windows Intune to Manage Android
Posted by N. Moseley in Windows Intune on May 1, 2013
Android with Windows Intune
Use this guide to help you get started testing management of Android devices with Windows Intune (Wave D) standalone. This guide assumes Office 365 has been completely set up, configured, and operational for your organization.
Create the emulator
First and foremost, create an Android emulator. One of the best guides that I have found for doing this is at http://www.javaexperience.com/10-easy-steps-to-install-android-emulator-in-windows/. Below are the settings that I used for my emulator.
O365 Mailbox enabled for ActiveSync
Next, ensure that the user account(s) which will be used for testing the Android devices are enabled for ActiveSync.
Enable ActiveSync
Launch the Email app
Enter your username@domain.com and password
Select Exchange
Set the domain/username and server as m.outlook.com
Accept the cert
Configure settings as desired
You’re ready to go!
Activate the device
Once the sync has completed, then you’re connected
Exchange Connector (even for O365)
http://technet.microsoft.com/library/jj733621.aspx
Download the Exchange Connector from Intune (as this has an additional cert included):
Administration > Mobile Device Management > Microsoft Exchange > Exchange Connector
Managing Device Information
Confirm device
Create Android Device Group
Create Android User Group
Create Policy
“Create and Deploy a Custom Policy”
Set a policy name and require a password changed to require a password
Deploy the policy
Ping Transport Failed with Error 1231
Posted by N. Moseley in Miscellaneous Ramblings, Troubleshooting on March 30, 2013
Recently I was helping a friend with her laptop which suddenly stopped connecting to the Internet, despite that the wireless networking could see and successfully connect to wireless hotspots. In further troubleshooting, I noticed that the correct IP address range (192.168.0.x) was not handed out by the router’s DNS. Furthermore, when attempting to ping the router’s gateway (192.168.0.1) with “Ping Transport Failed, Error 1231“. Digging through the Internet on this error, I found the possible solution buried deep within a couple Microsoft forum threads. I’m posting it here so that if it should ever occur again, hopefully the solution is quicker to find!
- Open a command prompt with Run As Administrator
- Run “netsh winsock reset”
- Restart Windows
Now the system is back in business!
Installing VMware View Agent in a Task Sequence
Posted by N. Moseley in ConfigMgr 12, Scripting, Troubleshooting on March 9, 2013
The VMware View agent is deployable as an MSI file and uses basic command line parameters. However, I recently had significant difficulties with getting it to install within a ConfigMgr Task Sequence as part of an OS image deployment. Despite that the agent could be installed manually using the parameters, in a TS the installer would fail (e.g. return a non-success exit code) and thus fail the TS.
Through investigation, the agent’s install log file (located in %windir%\temp\) stated error 1603 and a message that if failed due to a detected pending restart. So in the TS, I added a pre-restart command prior to the install…..but that still did not solve the problem. Several various other solutions were attempted, but all to no avail.
Eventually I found a VMware KB article which outlined the issue. It was being caused by multiple registry keys – FileRenameOperations, Run, and RunOnce. So I created a quick batch script to
- Backup the reg keys to %windir%\temp
- Delete the reg keys
- Run the install
- Restore the reg keys
:: Backup problem registry keys for VMware Agent Install reg.exe EXPORT "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager" c:\windows\temp\hklmsession.reg /y reg.exe EXPORT "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" c:\windows\temp\hklmrun.reg /y reg.exe EXPORT "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" c:\windows\temp\hklmrunonce.reg /y :: Delete problematic registry keys reg.exe DELETE "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager" /v PendingFileRenameOperations /f reg.exe DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /va /f reg.exe DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /va /f :: Install VMware agent xcopy "%~dp0VMware-viewagent-x86_64-5.0.1-640055.exe" c:\windows\temp /y c:\windows\temp\VMware-viewagent-x86_64-5.0.1-640055.exe /s /v" /qn REBOOT=R" :: Restore registry keys reg.exe IMPORT c:\windows\temp\hklmsession.reg reg.exe IMPORT c:\windows\temp\hklmrun.reg reg.exe IMPORT c:\windows\temp\hklmrunonce.reg del c:\windows\temp\hklm*.reg exit
However, this still wasn’t good enough to solve the problem! The .msi needed to be copied locally to execute AND this needed to be run with 64-bit redirection disabled. It was a mess to figure out and test, but I was able to eventually discover the right combination to have the agent automatically in a Task Sequence!
Another copy of Configuration Manager Setup is already running
Posted by N. Moseley in ConfigMgr 12, Troubleshooting on February 21, 2013
Recently built myself a new server for my home lab and decided to build out a new domain. During the setup process of CM12 SP1 (on Win 2012 with SQL 2012 SP1 CU2), the guest VM hung midway through setup and was completely unresponsive. So I reset the VM and ran the CM12 SP1 setup again – it only allowed the site to be uninstalled, which I did. However after immediately trying to install CM12 again, I received error “Another copy of Configuration Manager Setup is already running”.
The fix?
Just restart the server after the uninstall of the site.
Script to Rename Computer During OSD
Posted by N. Moseley in ConfigMgr 07, ConfigMgr 12, Scripting on February 16, 2013
In assisting a recent customer implement an upgrade from WinXP to Win7, they requested that the names be changed to fit a new standard as part of the in-place imaging process. In this particular case, all of the computers had a name that ended with a sequential number (1, 2, 3, …) plus an “A” tacked on at the end. They wanted the “A” removed and for the PC name just to end with the sequential number.
This was a pretty easy fix to accomplish through a VBScript which
- Retrieves the active OSDComputerName task sequence variable
- Detects if the last letter is an “A”
- Truncates the name to remove the “A”
- Re-sets OSDComputerName to the new value
'==========================================================================
' NAME: PCNameStandardization.vbs
' AUTHOR: Nick Moseley, <a href="http://t3chn1ck.wordpress.com">http://t3chn1ck.wordpress.com</a>
' COMMENT: This script will detect if the current computer name ends with ' the letter 'A' so that it can be removed.
'==========================================================================
Option Explicit
Dim oTaskSequence, sComputerName, iNameLength
Set oTaskSequence = CreateObject ("Microsoft.SMS.TSEnvironment")
sComputerName = ucase(oTaskSequence("OSDComputerName")) iNameLength = Len(sComputerName)
If right(sComputerName,1) = "A" Then
oTaskSequence("OSDComputerName") = left(sComputerName, iNameLength-1)
' The echo statement is not displayed, but rather registered in SMSTS.log
wscript.echo ">>>> Set OSDComputerName from " & sComputerName & " to " & oTaskSequence("OSDComputerName")
End If
To add this into your task sequence:
- Put this script into a package for your general OSD Scripts
- Ensure you have the step to capture the computer name

- Immediately after the capture windows settings, run the PC Standardization Script

- On whatever step you have that prompts for the PC Name, add a condition to not execute if variable OSDComputerName does not exist. This is so that task sequence will not be held up on the other end waiting for someone to enter a PC name for one you’ve already set.

- Finally – ensure ConfigMgr environment is configured to automatically resolve conflicting records! See this as to why http://t3chn1ck.wordpress.com/2013/02/14/error-initializing-client-registration-0×80040222/




































Recent Comments