Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

WriteProfString on Windows 9x


5 replies to this topic

BigEHead

BigEHead
  • Members
  • 16 posts

Posted 18 December 2002 - 22:44

has anyone seen problems using writeprofstring on windows 9x?

i'm trying to do something like this:

[Title]
Key1=Value1
Key2=Value2

but i keep getting this instead only on windows 9x:

[Title]
Key1=Value1

[Title]
Key2=Value2

can anyone shed some light?

thanks.

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 19 December 2002 - 00:45

I don't make setups for Win9x/Me, so no idea, but you could always use WriteLine if you have to make it work right.
user posted image

Ozone

Ozone
  • Full Members
  • 77 posts

Posted 19 December 2002 - 17:24

I develop and test install scripts using Win 98se. I have not seen the behavior you mention (the section being duplicated). InstallShield suggests that you clear the cache by calling WriteProfString with null parameters. I do this after each entry to the .ini file.

// forces writing of file NOW  
WriteProfString ( "","","","");

BigEHead

BigEHead
  • Members
  • 16 posts

Posted 19 December 2002 - 18:44

i've already tried that and it doesn't help.  so you've never seen that?  i don't know why it happens.  i've tried it on win95 and win98 and the same result.  works fine on nt or 2k though.  ugh....any other suggestions?

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 19 December 2002 - 23:38

Okay, well something to check then is whether you guys using the same version of IS.
user posted image

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 22 December 2002 - 17:49

I believe that InstallShield internally calls Windows API functions for INI files. As far as I know these prevent dupilcate [section] entries. Therefore my suspicion is that there is some spelling difference in the two Title strings (maybe a blank or some non-printable character). Take a close look at the INI file with a text/hex editor.