InfoPath - Form stuck on Installing, Upgrading or Deleting

When you publish an InfoPath Form through Central Administration, a few things happen:

  1. Central Administration creates a WSP package for this form.
  2. Central Administration creates timer jobs to deploy the package to each of the web applications that uses this form (defined by Activate to Site Collection, in Central Administration)
  3. Administration Service on each server then runs the timer job to deploy the form.
  4. The deployment job actually does a bunch of things:
    1. Creates a list of upgrade templates in \14\TEMPLATE\FEATURES\FT-01-72d7f7bc-0c6e-ba52-fa91-bb24c0014ed6
      Note, for some sites, this list is incredibly long, and can take a long time. I can't think of any good reason why we need all the versions, but may be this can potentially affect form upgrades.
    2. Creates a content type for the form
    3. Copy the form template to %site collection%/Form Templates/template.xsn
    4. (do other stuff)

Review this article from Microsoft: http://blogs.msdn.com/b/infopath/archive/2006/10/23/behind-the-scenes-of-administrator-approved-form-templates.aspx 

So when a form is stuck on "Installing" or "Upgrading"

 

  1. Check timer jobs. If there are jobs that can't start - they will wait
    1. Check all administration service are running on both servers
    2. Check timer service is running (timer service calls administration service to deploy)
  2. If your administration service is OFF, then you can try using the command line to execute those timer jobs
    1. stsadm -o execadmsvcjobs
    2. The benefit is if there's exceptions thrown here you'd see it in the console
    3. Do this on all SharePoint servers. If the administration service is running, then this stsadm command won't do anything.
  3. If your job is missing, you can check in Solution Management /_admin/Solutions.aspx
    1. Go to Solution Management under Central Administration /_admin/Solutions.aspx
    2. Find the farm solutions that for the form. The name would be form-formname.wsp.
    3. If the solution isn't deployed, you can select deploy - global
    4. If your admin service isn't running, you'll get a warning saying that jobs are scheduled but no admin service means they won't run.
    5. Use stsadm -o execadmsvcjobs
  4. If nothing else works, or if we want to do a complete removal.
    1. In form templates, select the form template, and hit Remove.

Form is stuck on "Deleting"

  1. Go to Solution Management under Central Administration /_admin/Solutions.aspx
  2. Find the farm solutions that for the form. The name would be form-formname.wsp.
  3. If the status is Deployed, then retraction hasn't started.
  4. Click the package and select Retract Solution.
  5. If your admin service isn't running, you'll get a warning saying that job is scheduled but no admin service means they won't run.
  6. In command line, stsadm -o execadmsvcjobs, on both servers.
    C:\ > stsadm -o execadmsvcjobs
    Executing job-application-server-admin-service.
    Executing job-password-management.
    Executing solution-deployment-form-tradepackageform.wsp-0.
    Operation completed successfully.
  7. You'll see this back on solutions.
  8. Name:    form-packageform.wsp
    Type:    Core Solution
    Contains Web Application Resource:    No
    Contains Global Assembly:    No
    Contains Code Access Security Policy:    No
    Deployment Server Type:    Front-end Web server
    Deployment Status:    Deployed
    Deployed To:    Globally deployed.
    Last Operation Result:    The solution was successfully retracted.
    Last Operation Details:   
    SRV02 : The solution was successfully retracted.
    SRV03 : The solution was successfully retracted.
    Last Operation Time:    1/8/2013 11:01 AM

  9. You can then remove the solution package.
  10. If you go back to Form Template management, the form will be removed from the list, and you can re-upload as usual.

Nintex Workflow - using all Regex options in your actions

 

Nintex Workflows supports a Regular Expression action.  This action has a very simple configurable UI with only the "Ignore case" option.

But there are a number of other very interesting Regex Options that you may want to use in your pattern.  This blog article is about how to enable them, and what sort of patterns you might use them for.

 

Regular Expression Options

Making an educated guess that the Nintex workflows uses the standard .NET Regular Expression (System.Text.RegularExpressions.Regex) rather than implementing their own regex engine.  Here's a list of the Regular Expression Options supported in the .NET Framework.

http://msdn.microsoft.com/en-us/library/yd1hzczs.aspx

  • i = IgnoreCase (this option is available in the Nintex action)
  • m = Multiline, if enabled, ^ and $ matches beginning and end of each line, rather than the whole block of text
  • s = Singleline, if enabled, . (period) matches all characters including newline (\n), by default, the period character only matches [^\n] (any character except the newline).
  • n = ExplicitCapture, don't capture groups
  • x = IgnorePatternWhitespace, ignore unescaped whitespace, and allow inline # comments

 

Using Regex Options within a pattern group

.NET allows you to use regular expressions with special options within a pattern group.  To do this, the pattern is:

  • (?imnsx-imnsx:pattern)

You can read up about it here: http://msdn.microsoft.com/en-us/library/bs2twtah.aspx#group_options

Lets see some examples.

 

Using the multiline option

Example, given this block of text:

Dear John,

Thanks for the email.

/footer

We want to extract the line that has the word "thanks".

We can use this expression:

  • (?m:^.*thanks.*$)
  • multiline match of any line that contains the word thanks.  Match from beginning of line ^ to end of line $.

image

The results in the workflow:

image

 

Using the singleline option

Example, given this block of text:

Dear John,

Thanks for the email.

/footer

We want to capture everything before the /footer.

  • ^(?s:.*)(?=/footer)
  • use singleline option, match any character (including line breaks).  Use a positive look-ahead match on /footer, but don't actually include it in the pattern match result.

image

The results in the workflow:

image

Removing HomeGroup icon from Windows 8 desktop

This morning, I found a HomeGroup icon in my Windows 8 Deskotp.  I'm not actually sure what happened and how it appeared.  I am pretty sure it wasn't there last night.

To remove it, but not remove it from Explorer, search for "desktop icons"

image

 

I toggle the selection for "Network" on, then off again.

image

OK, and the HomeGroup icon has disappeared from the desktop.

How to create your Windows 8 Start Button with PowerShell

Before I go on, I have to say I find the Start Menu unnecessary.  There are already many ways to get to your Start Screen:

  • Throw mouse to lower-left corner (with the mouse)
  • Press the Windows key (on your keyboard)
  • Swipe in from the left edge (touch screen)
  • Press the Start button (any device with a hardware start button)

 

That said, Windows is still about choice.  And here's how you can add your own "Start Menu Button"

  1. Create a shortcut.
  2. Type in this:
    powershell.exe -Command "Add-Type -AssemblyName System.Windows.Forms; [Windows.Forms.SendKeys]::SendWait('^({ESC})')"

    (all in one line)
    This sends the Windows key (CTRL-ESC) via Powershell.
    image
  3. Configure the shortcut to run minimized
    image
  4. Change the Icon, I select this icon from the bootux.dll file %SystemRoot%\System32\bootux.dll) 
    image
    (All the icons are white, select them to see what they look like) 
  5. Drag the shortcut and pin it to the task bar, on the far left.
    image
  6. Now you have that familiar Start menu button back.  Click it and you'll get the Start Screen to pop up. 
    image

 

Notes

  • Does not appear to work in Windows RT, but if you have a Surface just hit that start hardware button

SharePoint Saturday Sydney 2012

Thank you all for attending SharePoint Saturday, giving up your time.  Sydney marks the last of the 6 SharePoint Saturdays that I've had the privilege to present in this year, ticking off:

The best part of SharePoint Saturday is just meeting talking to the enthusiastic SharePoint fans and hear what people are doing out there.  Honestly, not many people are that crazy to give up a sunny Saturday to learn about SharePoint - you guys are amazing.

The worst part is the travel. 

 

Sydney SharePoint User Group

I was honestly surprised almost everybody already know about the Sydney SharePoint User Group.  We meet monthly in the CBD between 6-7pm on the 3rd Tuesday of the Month.  We actually start at 5:30pm to eat up all the pizza first, and for the guys that don't need to head home right away, join us at the pub and geek out.

Sign up here so you can see what topic is coming up next month:

 

Golf Course

The User Group gave away a Miniature Golf Course during the event.

The Miniature Book of Miniature Golf

If you didn't manage to win one, but is still interested in it, it's here:

 

Downloads