Announcement

Collapse
No announcement yet.

using GetPrivateProfileString with a LAN

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • using GetPrivateProfileString with a LAN

    I want to make an application capable of running from a PDC logon script. I want to support both global and personal configuration files.

    I am thinking the program will be invoked as:
    \\server\users\foobar.exe \\servers\users\foobar.ini

    Would GetPrivateProfileString support using a UNC to specify the file you want to work with? It would do no good to discover the program is on the PDC's C: when that will not be the user's C:. If this function is not network-aware, I will need to know now so I can plan a different way of getting the global configuration data.

    I am thinking of the personal configuration being in Documents and Settings. This could be either on C: or in a roaming profile on the PDC, depending on how the domain is set up. Would GetPrivateProfileString be able to work with either?
    Erich Schulman (KT4VOL/KTN4CA)
    Go Big Orange

  • #2
    >Would GetPrivateProfileString be able to work with either

    Will work with any file in "INI" format.

    Remember, the name of the INI file is passed to that function.

    Get your INI file name from SHGetFolderPath with the CSIDL for user application data and you will have software which works even if the profile does "roam".

    Move That INI File! and Get That Ini File Name!
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]om
    http://www.talsystems.com

    Comment


    • #3
      I found http://www.powerbasic.com/support/pb...ad.php?t=23274 and tried it out. I modified it to use \\mybox\E$\Temp\MyProg.ini and it worked. So the global configuration's plan is ready.

      I have read the MSDN page for SHGetFolderPath, so now the personal configuration's plan is also ready.
      Erich Schulman (KT4VOL/KTN4CA)
      Go Big Orange

      Comment

      Working...
      X