document cannot be loaded Error while running Regform.exe

  • Thread starter rupali kothawade
  • Start date
R

rupali kothawade

Hi All,

I am getting an error on the command line when attempting to run the
RegForm.exe tool to fully trust a form.

This is what i am executing on the command line:

RegForm /U urn:MyForm:MyCompany /T Yes C:\InfoPath\MyForm.xsn


The error is returning:
Error: Form C:\InfoPath\MyForm.xsn contains an invalid form definition
(.xsf) file
C:\DOCUME~1\administator\LOCALS~1\Temp\RegForm\1FFB62EE.gif.
The document cannot be loaded from the file
C:\DOCUME~1\administrator\LOCALS~1\Temp\RegForm\1FFB62EE.gif.
System error: Incorrect function.
(code = 0x00000001)

1FFB62EE.gif. id the first file in the extracted files for the
MyForm.xsn
I have checked out the Temp folder, there i can see the folder RegForm
will all the extracted files for the form with 1FFB62EE.gif as the
first file.

How can i resolve the problem ...can anybody help me....

Thanks and Looking forward,
Rupali
 
B

Ben Walters

Rupali,
I have to admit I have not seen this problem before.
How did you add the .gif file to the .xsn?

If worse comes to worse I'm happy to take a look at your .xsn file for you.

Cheers
Ben
 
R

rupali kothawade

Thanks for the reply Ben,

In design mode for the InfoPath form, simply by using ink picture
control i have added gif file to the XSN.

Even if i remove the gif file, the same error continues for the first
file in the the Extracted files collection that i can see in the
Temporary folder.

Can u help me on how form tool behaves?
whether is just creates MSI for the Xsn provided...? or checkes for
validity of all the content of it.....

I believe it should only create MSI and let the other part of validity
of the content on the form Load...?

Thanks and Looking forward,
Rupali
 
B

Ben Walters

Rupali,
I'm not an expert on the inner workings of the RegForm utility but I do know
this, when you use it to set a form to full trust it will attempt to set a
flag in the .xsf file. This means that at some point it's going to try and
load that .xsf file up into an XML object to make the required changes.
Another option you have is to extract your .xsf file, chagen the extension to
..xml and then attemp to open it using IE, if there are any errors with the
form at this point they should be highlighted a little more accuratly.
Also it's worth noting that the command line you originally quoted will not
create an msi for you.
You will also need to include the /MSI switch on the command for an MSI file
to be created
e.g. RegForm /U urn:MyForm:MyCompany /T Yes /MSI C:\InfoPath\MyForm.xsn

If your still having troubles after this please feel free to contact me
directly via my blog
http://msmvps/blogs/BenWalters


Cheers
Ben Walters
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top