0

I deploy Infopath forms using powershell script. After deployment, dlls of my deployed application appears in 14 hives/feature/guidfeaturefolder After some modifications when i deploy again the same form, sometimes it creates a folder inside that guidfeaturefolder and then copies the dll to that folder and sometimes it will replace the existing dlls. Any one know how it happens?

Powershell script is as below

# Initializing variables
Write-Output "Initializing Varialbes"

$SiteCollection = "http://<Computer Name>/"
$FormName = "xsn name"
$FormPath = "xsn location"

# Desabling Form Template
Write-Output "Desabling Form Template"

Disable-SPInfoPathFormTemplate -Identity $FormName -Site $SiteCollection

# Unistalling Form template 
Write-Output "Uninstalling form Template"

Uninstall-SPInfoPathFormTemplate -Identity $FormName
net stop SPAdminV4
Start-SPAdminJob

# Verifying Form Template
Write-Output "Verifying form template"

Test-SPInfoPathFormTemplate -Path $FormPath

# Installing form template
Write-Output "Installing Form Template"

Install-SPInfoPathFormTemplate -Path $FormPath -NoWait
net stop SPAdminV4
Start-SPAdminJob

# Activating form template
Write-Output "Activating Form Template"

Enable-SPInfoPathFormTemplate -Identity $FormName -Site $SiteCollection

net start SPAdminV4
1
  • Could you supply us with the script of deployment? If you do, it's more likely that you'll get an answer to your question.
    – Benny Skogberg
    Dec 14, 2012 at 7:30

1 Answer 1

1

This is the powershell script

Initializing variables

Write-Output "Initializing Varialbes"

$SiteCollection = "site url" $FormName = "published xsn file name" $FormPath = "xsn path"

Desabling Form Template

Write-Output "Desabling Form Template"

Disable-SPInfoPathFormTemplate -Identity $FormName -Site $SiteCollection

Unistalling Form template

Write-Output "Uninstalling form Template"

Uninstall-SPInfoPathFormTemplate -Identity $FormName net stop SPAdminV4 Start-SPAdminJob

Verifying Form Template

Write-Output "Verifying form template"

Test-SPInfoPathFormTemplate -Path $FormPath

Installing form template

Write-Output "Installing Form Template"

Install-SPInfoPathFormTemplate -Path $FormPath -NoWait net stop SPAdminV4 Start-SPAdminJob

Activating form template

Write-Output "Activating Form Template"

Enable-SPInfoPathFormTemplate -Identity $FormName -Site $SiteCollection

net start SPAdminV4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.