Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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
share|improve this question
    
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 MCSA Dec 14 '12 at 7:30

1 Answer 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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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