Click here to Skip to main content
12,625,355 members (40,274 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: file
>I am try to install some DasyLab files,have to prompt the user to select a folder & then take that path and insert or replace 20= C:\...in the following inifile:
[Global Strings]
P20=File Location
20=C:\MSA\Drop Test Data\
I am able to write in ini file...this is test code
Section "Write INI file"
 Detailprint "Starting"
 WriteINIStr 'C:\Users\sunita.tiwari\Desktop\Test ini\Test.ini' "Global Strings" "P20" "File Location"
 WriteINIStr 'C:\Users\sunita.tiwari\Desktop\Test ini\Test.ini' "Global Strings" "20" "hello sunita"
 Detailprint "Done"
 MessageBox MB_OK "Done"
Sectionend
The File Location has to be an user selection thru a browse win.
Posted 3-Aug-12 5:07am
Updated 3-Aug-12 5:25am
v2
Comments
Wes Aday 3-Aug-12 10:09am
   
And your question would be?
Member 9325916 3-Aug-12 10:21am
   
!include MUI.nsh
!include nsDialogs.nsh
;-----------------------------
Name test
OutFile test.exe

Page components
Page directory
DirText "Choose a directory"
Section ""

;WriteINIStr $0 'C:\Users\Sunita Tiwari\Documents\MyNSIS\NewINI.ini' "Global String" "p20"

SectionEnd
In above code the value entered by DirText which opens a browse window to select a location by a user and insert that path in the ini file named calibration.ini:
[Global Vars]
P800=X1
800=-5.100000e-003
P801=X2
801=2.509000e+000
P802=Y1
802=0.000000e+000
P803=Y2
803=5.023130e+003
[Global Strings]
P20=File Location
20=C:\MSA\Drop Test Data\

Wes Aday 3-Aug-12 10:24am
   
Still not a question and that is not even a recognizable programming language snippet.
Sandeep Mewara 3-Aug-12 10:26am
   
This is not a well framed question! We cannot work out what you are trying to do/ask from the post. Please elaborate and be specific.
Use the "Improve question" link to edit your question and provide better information.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161128.1 | Last Updated 3 Aug 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100