I am getting some errors when trying to access an ini file I have in my app directory. The app sits on my desktop in a folder so no admin rights should be the issue although I do get an error code of 5. I am running this on Win XP Pro SP3.

In debug mode the code runs fine but runtime it doesnt.

The code I use for accessing the file is:

#If DebugBuild Then serialfile = GetFolderItem("").Child("tmm.ini") #else serialfile = GetFolderItem("tmm.ini", FolderItem.PathTypeNative) System.DebugLog("File path for serial is " + serialfile.NativePath) #Endif

Is this correct?


Where are you getting the IOException?

You aren’t giving it a native path, so try

    serialfile = GetFolderItem("tmm.ini")

Well I also did this:

GetFolderItem("tmm.ini", Folderitem.PathTypeNativePath)

which does not work even though the docs state it.

Once I removed the PathType it works as expected.


Where do the docs state it? I’m not seeing the same reference.