Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. WriteProfileString

WriteProfileString

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
13 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P PS Codeproj

    "WriteProfileString" API writes the entries into an .ini file in the system folder(Ex: C:\\WINDOWS\{application name}.ini). Open the file, and delete the entry you want.

    Thanks & Rgds, Sri..

    K Offline
    K Offline
    Kiran Pinjala
    wrote on last edited by
    #4

    Thank you.

    PSrividya wrote:

    Ex: C:\\WINDOWS\{application name}.ini).

    I could not find the ini file with my application name. Should i search for it any where else?

    KIRAN PINJARLA

    1 Reply Last reply
    0
    • R Rajesh R Subramanian

      kiran.pinjarla wrote:

      How to delete the entry done with the CWinApp::WriteProfileString(). not programatically. how to do it directly?

      I think the api writes entries into win.ini file. Open the file, and remove your entry.


      Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

      K Offline
      K Offline
      Kiran Pinjala
      wrote on last edited by
      #5

      brahmma wrote:

      the api writes entries into win.ini file.

      I found no entries of my application in the win.ini file. Is the any other file that i should search?

      KIRAN PINJARLA

      R 1 Reply Last reply
      0
      • K Kiran Pinjala

        How to delete the entry done with the CWinApp::WriteProfileString(). not programatically. how to do it directly? thank you.

        KIRAN PINJARLA

        K Offline
        K Offline
        Kiran Pinjala
        wrote on last edited by
        #6

        i am using win2000professional does it differ in this behaviour?

        KIRAN PINJARLA

        R 1 Reply Last reply
        0
        • K Kiran Pinjala

          brahmma wrote:

          the api writes entries into win.ini file.

          I found no entries of my application in the win.ini file. Is the any other file that i should search?

          KIRAN PINJARLA

          R Offline
          R Offline
          Rajesh R Subramanian
          wrote on last edited by
          #7

          The documentation says it is written in to the win.ini file. It also says that the system maps most .ini file references to the registry. Please read the documentation. http://msdn2.microsoft.com/en-us/library/ms725504.aspx[^]


          Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

          K 1 Reply Last reply
          0
          • P PS Codeproj

            "WriteProfileString" API writes the entries into an .ini file in the system folder(Ex: C:\\WINDOWS\{application name}.ini). Open the file, and delete the entry you want.

            Thanks & Rgds, Sri..

            R Offline
            R Offline
            Rajesh R Subramanian
            wrote on last edited by
            #8

            PSrividya wrote:

            in the system folder(Ex: C:\\WINDOWS\{application name}.ini).

            What exactly? Can you give a link where this stuff is said?

            PSrividya wrote:

            Rgds,

            Saving the key strokes?


            Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

            P 1 Reply Last reply
            0
            • K Kiran Pinjala

              i am using win2000professional does it differ in this behaviour?

              KIRAN PINJARLA

              R Offline
              R Offline
              Rajesh R Subramanian
              wrote on last edited by
              #9

              No


              Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

              1 Reply Last reply
              0
              • R Rajesh R Subramanian

                PSrividya wrote:

                in the system folder(Ex: C:\\WINDOWS\{application name}.ini).

                What exactly? Can you give a link where this stuff is said?

                PSrividya wrote:

                Rgds,

                Saving the key strokes?


                Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

                P Offline
                P Offline
                PS Codeproj
                wrote on last edited by
                #10

                Sorry. The file name doesnt need to be the application name. Syntax: WriteProfileString ("file name", "section", "key", "string") where the first parameter is the file name in which the key entry has to be made.

                Thanks & Rgds, Sri..

                R 1 Reply Last reply
                0
                • P PS Codeproj

                  Sorry. The file name doesnt need to be the application name. Syntax: WriteProfileString ("file name", "section", "key", "string") where the first parameter is the file name in which the key entry has to be made.

                  Thanks & Rgds, Sri..

                  R Offline
                  R Offline
                  Rajesh R Subramanian
                  wrote on last edited by
                  #11

                  PSrividya wrote:

                  Syntax: WriteProfileString ("file name", "section", "key", "string") where the first parameter is the file name in which the key entry has to be made.

                  Huh? If you want to specify the file name by yourself, you need to use WritePrivateProfileString. WriteProfileString takes just 3 arguments.


                  Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

                  1 Reply Last reply
                  0
                  • R Rajesh R Subramanian

                    The documentation says it is written in to the win.ini file. It also says that the system maps most .ini file references to the registry. Please read the documentation. http://msdn2.microsoft.com/en-us/library/ms725504.aspx[^]


                    Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

                    K Offline
                    K Offline
                    Kiran Pinjala
                    wrote on last edited by
                    #12

                    brahmma wrote:

                    Please read the documentation. http://msdn2.microsoft.com/en-us/library/ms725504.aspx\[^\]

                    Thank you brahmma. It helped me.

                    KIRAN PINJARLA

                    1 Reply Last reply
                    0
                    • P PS Codeproj

                      "WriteProfileString" API writes the entries into an .ini file in the system folder(Ex: C:\\WINDOWS\{application name}.ini). Open the file, and delete the entry you want.

                      Thanks & Rgds, Sri..

                      T Offline
                      T Offline
                      TpB
                      wrote on last edited by
                      #13

                      WriteProfileString writes to the registry, not just an ini. To remove a profile string from the registry you need to get the key such as theApp.GetAppRegistryKey, tunnel to the key you want deleted and then use RegDeleteKeyEx.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups