I suspect that the class INI is not working o Vista.
Any issues on this ?
Antonio
Antonio H Ferreira
I suspect that the class INI is not working o Vista.
Any issues on this ?
Antonio
c_dir := GetModuleFilename(GetInstance(),"MYPROG.EXE" + CHR(0), 255)
c_path := left ( c_dir, rat( "\", c_dir) -1 )
// ---------- READ FROM INI ----------------
IF !FILE ( c_path + "\Info.ini" )
SAVE_INI("N")
ENDIF
IF FILE ( c_path + "\Infobar.ini" )
INI oIni FILE c_path + "\Info.ini"
GET nDATE SECTION "Main" ENTRY "DATESET" OF oIni DEFAULT "5"
GET nINSERT SECTION "Main" ENTRY "WRITESET" OF oIni DEFAULT "1"
GET nORIENT SECTION "Main" ENTRY "ORIENTAT" OF oIni DEFAULT "1"
ENDINI
ENDIF
// ---------- SAVE TO INI --------------
FUNCTION SAVE_INI(message)
local cIni := c_path + "\Info.ini"
IF WritePProString( "Main", "DATESET", ALLTRIM(STR(e_RADIO1)), cIni ) = .F.
MsgAlert("Not possible, to write in INI-File", "INI-File")
RETURN( NIL )
ENDIF
IF WritePProString( "Main", "WRITESET", ALLTRIM(STR(e_INSERT)), cIni ) = .F.
MsgAlert("Not possible, to write in INI-File", "INI-File")
RETURN( NIL )
ENDIF
IF WritePProString( "Main", "ORIENTAT", ALLTRIM(STR(e_ORIENT)), cIni ) = .F.
MsgAlert("Not possible, to write in INI-File", "INI-File")
RETURN( NIL )
ENDIF
IF FILE(cIni)
cOpen := "Notepad.exe " + cIni
WinExec( "&cOpen" )
ELSE
MsgAlert( "Couldn't create File : " + cIni + " !!!","ATTENTION")
ENDIF
RETURN( NIL )Please look at this thread:
http://fivetechsoft.com/forums/viewtopi ... ight=vista
I found out that this only happens if the INI file has setup or install in the name.
Regards,
Otto
It's not the case.
By the way this problem happens with an app build with :
Xbuilder March 2006 + FWH March 2006
With all other windows ver running very stable for several years.
Any idea ? Are these versions incompatible with Vista ?
Antonio
Antonio,
as far as I know, Vista doesn't allow in standard settings changes to be made in the program files folder. So if your application is installed to the standard program files folder, you have to put your ini file to the general or specific user-folder windows is providing for such purposes. Another solution might be to install the application just into another folder ![]()
The problem is with the INI file in a Netware server + Vista. On Vista works ok.
Antonio,
Is it a private INI file ?
I mean, is it a standalone INI file ? If yes, can you check that it exists using File() or read it using MemoRead() ?
The ini file it's "personal each user has it's own ini file.
File exists (file() tested) and it can be read by memoread().
Any Ideas.
Antonio
This problem only occurs in a Netware file server.
If the ini file is on the Vista workstation it works ok.
Antonio,
If you can read it using MemoRead() then you may analize it from your code without using the INI functions.
At least, you can use that as a workaround.
Thanks Antonio,
I'm going to try xHarvour ini functions instead.
Keep my fingers crossed.
Antonio