Quantcast

Add line to Ini file with no value

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Add line to Ini file with no value

Brian Simoneau
Message
I am using WiX build 3309 and am trying to add a line to an Ini file with no value.  At first I used Value="" within the IniFile element, and I got a helpful error message saying
"The [hidden email] attribute's value cannot be an empty string.  If you want the value to be null or empty, simply remove the entire attribute." 
 
I then removed the Value attribute from the IniFile element, but got a not so helpful error message saying
"fatal error LGHT0010: There was an error importing table: IniFile with file: C:\DOCUME~1\BSIMON~1\LOCALS~1\Temp\vg6q0q0v\IniFile.idt"
 
I get the same fatal error when I tried Value=" " (a single space).  There were no errors when I tried Value="0".  Is this a bug?
 
Brian Simoneau
Software Developer
Freedom Scientific
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Add line to Ini file with no value

Rob Mensching
Message

The Value in the IniFile table apparently cannot be null.  http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/inifile_table.asp

 

The WiX toolset should be doing a better job to help lead you to the right answer.  Please, do file a bug against this issue.  Thanks.

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Brian Simoneau
Sent: Thursday, September 22, 2005 9:14 AM
To: [hidden email]
Subject: [WiX-users] Add line to Ini file with no value

 

I am using WiX build 3309 and am trying to add a line to an Ini file with no value.  At first I used Value="" within the IniFile element, and I got a helpful error message saying

"The [hidden email] attribute's value cannot be an empty string.  If you want the value to be null or empty, simply remove the entire attribute." 

 

I then removed the Value attribute from the IniFile element, but got a not so helpful error message saying

"fatal error LGHT0010: There was an error importing table: IniFile with file: C:\DOCUME~1\BSIMON~1\LOCALS~1\Temp\vg6q0q0v\IniFile.idt"

 

I get the same fatal error when I tried Value=" " (a single space).  There were no errors when I tried Value="0".  Is this a bug?

 

Brian Simoneau

Software Developer

Freedom Scientific

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Add line to Ini file with no value

Brian Simoneau
In reply to this post by Brian Simoneau
Message
OK, that explains the error, but then how would I actually add a key with no value to an Ini file?
 
-Brian Simoneau
-----Original Message-----
From: Rob Mensching [mailto:[hidden email]]
Sent: Thursday, September 22, 2005 12:30 PM
To: Brian Simoneau; [hidden email]
Subject: RE: [WiX-users] Add line to Ini file with no value

The Value in the IniFile table apparently cannot be null.  http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/inifile_table.asp

 

The WiX toolset should be doing a better job to help lead you to the right answer.  Please, do file a bug against this issue.  Thanks.

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Brian Simoneau
Sent: Thursday, September 22, 2005 9:14 AM
To: [hidden email]
Subject: [WiX-users] Add line to Ini file with no value

 

I am using WiX build 3309 and am trying to add a line to an Ini file with no value.  At first I used Value="" within the IniFile element, and I got a helpful error message saying

"The [hidden email] attribute's value cannot be an empty string.  If you want the value to be null or empty, simply remove the entire attribute." 

 

I then removed the Value attribute from the IniFile element, but got a not so helpful error message saying

"fatal error LGHT0010: There was an error importing table: IniFile with file: C:\DOCUME~1\BSIMON~1\LOCALS~1\Temp\vg6q0q0v\IniFile.idt"

 

I get the same fatal error when I tried Value=" " (a single space).  There were no errors when I tried Value="0".  Is this a bug?

 

Brian Simoneau

Software Developer

Freedom Scientific

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Add line to Ini file with no value

Rob Mensching
Message

It isn’t clear from the MSI SDK that you can.

 


From: Brian Simoneau [mailto:[hidden email]]
Sent: Thursday, September 22, 2005 9:33 AM
To: [hidden email]; [hidden email]
Subject: RE: [WiX-users] Add line to Ini file with no value

 

OK, that explains the error, but then how would I actually add a key with no value to an Ini file?

 

-Brian Simoneau

-----Original Message-----
From: Rob Mensching [mailto:[hidden email]]
Sent: Thursday, September 22, 2005 12:30 PM
To: Brian Simoneau; [hidden email]
Subject: RE: [WiX-users] Add line to Ini file with no value

The Value in the IniFile table apparently cannot be null.  http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/inifile_table.asp

 

The WiX toolset should be doing a better job to help lead you to the right answer.  Please, do file a bug against this issue.  Thanks.

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Brian Simoneau
Sent: Thursday, September 22, 2005 9:14 AM
To: [hidden email]
Subject: [WiX-users] Add line to Ini file with no value

 

I am using WiX build 3309 and am trying to add a line to an Ini file with no value.  At first I used Value="" within the IniFile element, and I got a helpful error message saying

"The [hidden email] attribute's value cannot be an empty string.  If you want the value to be null or empty, simply remove the entire attribute." 

 

I then removed the Value attribute from the IniFile element, but got a not so helpful error message saying

"fatal error LGHT0010: There was an error importing table: IniFile with file: C:\DOCUME~1\BSIMON~1\LOCALS~1\Temp\vg6q0q0v\IniFile.idt"

 

I get the same fatal error when I tried Value=" " (a single space).  There were no errors when I tried Value="0".  Is this a bug?

 

Brian Simoneau

Software Developer

Freedom Scientific

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re[2]: Add line to Ini file with no value

Alexei Boukirev
In reply to this post by Rob Mensching
And another problem is that MSI treats empty string as NULL.  From the help file:

"In  the  MsiRecordSetString  function, a null string pointer and an empty string both set
the field to null."

Since it does not seem to be a necessity to treat empty string that way - there is a nice and
clear  way  to  set NULL value unambigously by passing NULL pointer - it was probably done
intentionally to discourage any use of empty strings.

As  for  INI file, I believe you can safely write a series of blanks into the value - when
parsed  back  it  would be equivalent to no value.  This is unlike Registry.  But I may be
wrong on that.

Thursday, September 22, 2005, 11:29:44 AM, you wrote:

>    
>  
>  
> The Value in the IniFile table apparently cannot be null. 
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/inifile_table.asp
>  
>  
>  
> The WiX toolset should be doing a better job to help lead you to the right answer. 
> Please, do file a bug against this issue.  Thanks.
>  
>  
>  
>  
>  

>  
>  
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Brian Simoneau
>  Sent: Thursday, September 22, 2005 9:14 AM
>  To: [hidden email]
>  Subject: [WiX-users] Add line to Ini file with no value
>  
>  
>  
>  
>  
> I am using WiX build 3309 and am trying to add a line to an Ini file with no value.  At
> first I used Value="" within the IniFile element, and I got a helpful error message saying
>  
>  
>  
> "The IniFile/@Value attribute's value cannot be an empty string.  If you want the value
> to be null or empty, simply remove the entire attribute." 
>  
>  
>  
>  
>  
>  
>  
> I then removed the Value attribute from the IniFile element, but got a not so helpful error message saying
>  
>  
>  
> "fatal error LGHT0010: There was an error importing table: IniFile with file:
> C:\DOCUME~1\BSIMON~1\LOCALS~1\Temp\vg6q0q0v\IniFile.idt"
>  
>  
>  
>  
>  
>  
>  
> I get the same fatal error when I tried Value=" " (a single space).  There were no
> errors when I tried Value="0".  Is this a bug?
>  
>  
>  
>  
>  
>  
> Brian Simoneau
>  
> Software Developer
>  
> Freedom Scientific
>  
>  
>    


--
Best regards,
 Alexei                            mailto:[hidden email]



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Loading...