Tag Archive: Tools


App_Remediation is a new free tool I am releasing to the public today.

App_Remediation is a console application designed to be used with App-V 5 (and above) to save and restore application related data (ARD) between locations that normally do not roam and those that do.

App-V now isolates ARD changes and redirects the saved file changes to locations that either roam or not, based on whether those changes would have roamed if the application was natively installed. This is quite different from the versions of App-V before version 5, where these changes would have been isolated and redirected to a location that always roamed. This remediation of badly constructed apps is very important to customers in a roaming environment, including not only those using “roaming profiles”, but also if using folder redirection, home drives, or other methods.

This program can be used in scripts to remediate virtual applications in two different ways:

  • PER APP BASIS
    Quite possibly, you only have a few apps in production today that require this kind of remediation. A simple solution would be to add this program as the script file for both “StartVirtualEnvironment” and “TerminateVirtualEnvironment”.

    For the StartVirtualEnvironment script, you use the parameter “/restore“, followed by a space, and then followed by the Package Id GUID (not the package version guid, and not inclosed in { } characters). You would mark the script to start outside the virtual environment with rollback=false.

    For the TerminateVirtualEnvironment script, use the parameter “/save“, followed by a space, and then followed by the Package Id GUID.

  • PER USER SESSION BASIS
    The app may also be run as part of user logon / logoff scripts, using the “/saveall” and “/restoreall” parameters. No GUIDs required as it will save or restore all packages found.

HOW IT WORKS

When saving changes, it will copy the folders and files (preserving the attributes, ACLs, and timestamps) from the users AppData/Local redirection repositories into a similar location under the users AppData/roaming location.

For example:
    C:\Users\Tim\AppData\local\Microsoft\AppV\Client\VFS\7EA4C0C9-2099-E743-AAEA-A1C03D11138E
is saved to:
    C:\Users\Tim\AppData\remote\Microsoft\AppV\Client\VFS\SavedFromLocal\7EA4C0C9-2099-E743-AAEA-A1C03D11138E

The program does not touch isolated registry information, as those are properly handled for standard users when apps do not require elevation.

Example Script

Below is an example of use of App_Remediation solving the problem of Paint.Net saving user settings into AppData/Local based files. The Package Id GUID is conveniently found at the top of the Deployment or User config file as PackageId=…

<UserScripts>

    <StartVirtualEnvironment RunInVirtualEnvironment=”false”>
        <Path>C:\Windows\App_Remediation.exe</Path>
        <Arguments>/restore 26ceb0bc-1e69-4de1-a444-70b6f1e0dfc3</Arguments>
        <Wait RollbackOnError=”false” Timeout=”30″/>
    </StartVirtualEnvironment>

    <TerminateVirtualEnvironment>
        <Path>C:\Windows\App_Remediation.exe</Path>
        <Arguments>/save 26ceb0bc-1e69-4de1-a444-70b6f1e0dfc3</Arguments>
        <Wait RollbackOnError=”false” Timeout=”30″/>
    </TerminateVirtualEnvironment>

</UserScripts>

You can also solve this problem with some User Environment Management products, although ironically not Microsoft’s UE-V product. This tool should prove to be easier to use, since you don’t need to worry about the app-specific details of what to capture or not. Just use this and it grabs everything that App-V isolates.

See this page for more information on download and installation.

In conjunction with my upcoming book and sessions at Briforum, I am releasing a number of new and updated tools involving Windows Performance analysis. These tools may be found in the Performance Tools section of the TMurgent website. These tools are generally free to download and use (the only restrictions are for ISVs that want to use them to show off how good they are).

So what are these tools?

AndThenThereWasPower! A Detailed Walk-through the Windows 7 Boot Process (A Silverlight app).
ATM View Windows Memory Caches and Superfetch.
DePrio Open file at specified memory priority.
Factorial Tool to act as an app that eats one CPU core.
HyperV_Mon Monitors Hyper-V Server and VMs, including “overhead”.
IWillCrash Tool to act as an app that crashes itself.
LaunchTimeAnalyze Tool to Run scripts and measure Perceived Performance
LeakMemory Tool to act as an app that leaks memory in a controlled way.
LoadDlls Tool to load a bunch of dlls. Used to test effect of Windows App prefetch.
MassiveRebase Tool to investigate dll rebasing and effect of ASLR.
PageMania Tool to act as a bad app and cause paging activity on demand.
ReadyViewer Tool to analyze Windows ReadyBoost (flash caching).
SequentialRead Tool to read file sequentially or randomly on demand.
SuperFetch_Tools Two tools to investigate the SuperFetch database scenario files.

  SuperFetchList

  SuperFetchTree
WhatsMyBoot Tool to analyze Boot, Shutdown, Suspend/Hibernate, Resume, and Windows ReadyBoot feature performance.

These, and many more tools written by others, will be covered in my two BriForum Sessions in London (and probably the Chicago show also). The two sessions are:

  • Top 15 Ways Microsoft Uses Caching to Increase Performance
    Wednesday May 23, 1:05pm – 2:20pm
  • “And Then There Was Power,” the Story of a Windows 7 and 8 Boot Process
    Thursday May 24, 11:10am – 12:25pm

toolsToday I released an updated version of the free PkgView tool. PkgView is used to view the file and registry changes that a user makes when running virtual applications with Microsoft App-V. These changes are stored in files with a “.pkg” extension associated with the user and the application.

These pkg files have traditionally been a bit of a black box since Microsoft App-V does not provide a way to look at what changed. If the user somehow breaks there app, this means all you can do is “reset the package” for that user, removing all of their personalizations for that app. It is sort of like deleting the user’s profile, but only for that one app. Because this is a black box, a tool like this is needed for troubleshooting.

PkgView

Version 1.6 includes changes for the following:

  • Replaced compression library. Now works on compressed SFTs on x64 systems.
  • Added ability to auto-locate the SFT file from it’s original source, if available. This feature requires that the sft was loaded using a FILE: override, such as with the stand-alone client or SCCM. Otherwise you should manually specify the sft filename.
  • Various small glitches are fixed, especially related to packages with ACLs stored (enforce security descriptors).
  • A New Installer is used.

You can find more information and a link to download this small program at this page on the TMurgent website.

tools This is a story about a tool that shouldn’t need to exist, but has proved to be just so darned handy over the years. It was originally written almost 10 years ago, and I recently released an updated version to add more features. This free tool is called LaunchIT.

The most common problem that cause people to ask me for this tool is the following senario. A Citrix XenApp (or any of the other 5 previous names for that product) user runs a “seemless” application. When they launch the application from their client desktop, it logs them into a remote session on the server, where the application window is cut and shown on the client desktop for the user to interact with. When the user is done with the application, they close the window they see. If any additional processes were opened on the server session, the session remains open. The additional process might be a background processes without a UI element, or it might be one that lives in the icon tray. But the bottom line is that the user doesn’t realize it is there. The user isn’t aware of this and continues to chew up server resources (until they eventually get disconnected).

The other situation is with an application virtualization product, such as Microsoft App-V. Like the Citrix case, these child processes that remain open keep the virtual application environment open (and if the virtual app was on a XenApp server it kept the session open too). A few years after I wrote this tool, Microsoft tried to address this issue with App-V by adding an OSD parameter (TERMINATECHILDREN). Setting this in the OSD solves many, but not all of the situations covered by this tool.

In general, you run LaunchIt and pass the program to be controlled as a command line paramter, possibly with addition arguments. It detects the termination of the main program and identifies any child/grandchild process for additional termination. But each year I get odd requests to extend the funtionality of the tool, because someone needs an easy way to apply special control over an application process. With release 5.0.1, we have even more features.

  • What To Terminate LaunchIt will locate more than direct child processes. The App-V TERMINATECHILDREN does not and will miss these.
  • What To Do By default, it silently kills the identified processes. But add a /v parameter, and it puts up a dialog box to the user informing him/her of the processes and asking permission to kill them.
  • Processes to ignore Some processes we want to exempt from the kill list. A list of process names can be provided to be ignored.
  • Processes to hide Sometimes IT runs additional hidden processes in the background, needs them killed, but doesn’t want the users to be aware of them. Even with the /v option, those process names in this list will not appear in the popup dialog, but will be killed. Note: this does not hide the processes from the task manager, so we aren’t talking malware here.
  • Extra Environment Variable Changes You can register additional environment variable changes to affect only this process and its decendents.
  • Extra Process You can name a second process to run after wating for the first one to start. An odd use case, but necessary one.

Version 5.0.1 is now immediately available from a zip file at this link. It is a small free tool (about 38kb, no installer) that sometimes comes in handy. Just run LaunchIt.exe /? for details on the syntax and registry. What can you use it for?

Note: The bad link to the software in the original article has now been fixed.

When Microsoft release App-V 4.6 Sp1, which was all about the new sequencer, they also quietly put out an updated client.  You don’t need the updated client to use SP1 sequenced packages, but it is an option.  Supposedly the client was mostly about rolling up hotfixes, but we know that there must be changes to support the upcoming SCCM 2012 release (now in beta).

Today I discovered another small change in the SP1 client.  It is a relatively benign change that is behind the scenes in the Windows registry, but it happened to affect one of the tools in my AppV_DeployNPublish toolset.  I didn’t notice it right away because you have to install the SP1 client as a clean install (rather than an upgrade) to notice.  The change affected my command management replacement tool, which caused it to not show file type associations, and this post is to announce the new release of my tools to address this issue.

“Wait a minute”, I hear you say.  “What command management console replacement tool”?  Perhaps replacement is too stong of word, but this tool organizes the virtual application information into a more usable form – by package instead of application.  By package, it shows DSC dependencies, shortcuts, and file associations.  This allows you to delete an entire package from the client in one step, rather than have to hunt down all the application names in the package. 

Information on these free tools and the download found at:

                          http://www.tmurgent.com/AppVirt/AppV_DeployNPublish.aspx

Version 2 of the AppV_DeployNPublish tools has been released. These free tools were designed to allow for deployment of App-V virtualized applications without a back-end infrastructure. In addition, these have become the standard way to quickly test newly sequenced applications.

Version 2 incorporates feedback received in the first release, especially around the command line interface options. More importantly, it includes a new 4th tool.

The new tool, AppV_ManagePackages, augments the App-V Client Management Console. The big difference between this tool and the CMC is that this tool works on a package basis rather than an application basis. No more trying to remember which apps are in a package just so you can delete it. It also discovers the DSC linkages so you know what depends on what, shows FTA and Shortcuts of what is deployed. Importantly, it also shows if you have middleware apps that lack OSDs. Middleware apps like the .Net Framework do not have OSDs in 4.6SP1 and therefore will not appear in the CMC at all.

There is some new “experimental” support in the AppV_DeployApp tool that detects FTA (File Type Association) conflict. If the app you are deploying has FTAs that conflict with existing FTAs, App-V normally will overwrite existing FTAs with those of the package being added. This detection will let you know that is going to happen at a minimum. The expermental part allows you to select the behavior that you would like, including new app wins, old app wins, and both are applied with one being the default and the other as an “open with”. This seems to work well as long as the old app is native. If the old app is App-V, the client interferes and overwrites the old any way. This is why the feature is listed as experimental. You can play with it to perhaps improve some specific situations but it is not ready to be a full time solution for FTA conflict.

More info, including the download here:

HyperV_Mon updated release

HyperV_Mon screen shot

Screen Shot of HyperV_Mon 1.8

 

HyperV_Mon is my free tool for monitoring and diagnosing performance issues with Hyper-V.

After prompting from a user with a lot more processors then the test systems here, I updated the HyperV_Mon tool to handle resizing in general, and to adjust the root partition processor display.  This new version is a minor release (1.8.0).

In the works will be a version 2.0 that will look at 2008 R2 with SP1 changes.  This should come out in Q1 of next year.
Click on the image to jump to the tools section of the TMurgent website, then scroll down to find the download link.

Today I “launched” a new free tool to provide some organized help with App-V Client errors.  This tool, called A Failure To Launch, is a Silverlight app that allows you to search for information on an error code produced by the App-V Client.

For each of the codes covered, the tool provides information about the cause (or possible causes), troubleshooting techniques or recommended actions, and links to Microsoft KB Articles when they exist.

The tool also explains the error code format, and has an interesting flow chart showing the steps that the client and server go through to launch an application with links to the various errors. 

Not all client errors are covered, and the flow chart is a “best guess” and is known to be inaccurate on some details.  Most of the information in the tool can be found on the web somewhere, but some is not.  Some come from painstaking attempts to break the system in ingenious ways, and some come from tips provided to be by friends (a special mention goes out to fellow MVP Nicke Kallen).  Ultimately, the tool makes for a convenient first place to look. 

I wrote it in Silverlight, specifically because you can install the app on any Silverlight enabled device, and then run the tool offline.  To do so, just go to the tool off of the website.  When it loads, right click in an open area and select the “install” option for the app.  Now you can launch it anytime from your start menu, even disconnected from the Internet!