Author Topic: trouble with IniDeletePVTFunction if EXE is running on a USB-stick  (Read 40 times)


  • Newbie
  • *
  • Posts: 4
    • Camping Saland
Hello all,
I'm really confused, once more!

I compiled my script to a EXE file with success and it works perfect if it is running on my HDD (C:\wherever....) or on a mapped drive and also if I start it from UNC-Parth.If the EXE is located on a USB-Stick (USB 2.0) it start running and it works mostly good, but if I delete a keyword with "IniDeletePvt" in my INI File it make a mistake. (It write a parth of the last "IniWritePvt" command in the ini-file). The defined keyword is korrect deleted, but it is also a keyword added. :( ??? :-\
Is something noted with timing problems if USB 2.0 Sticks are involved??
Best Regards from good old Switzerland



  • Tech Support
  • *****
  • Posts: 2538
    • WinBatch
Re: trouble with IniDeletePVTFunction if EXE is running on a USB-stick
« Reply #1 on: August 12, 2018, 09:05:50 am »
Just a guess but there is some possibility that this is a "timing" issue.  "Ini" files are special to the OS and are treated differently than other files. One of the differences is that they are cached in memory.  This means it is possible to write to the cached version and not have it reflected in the file system version until the cached version is flushed to disk.  However, this is usually only an issue when you have two different processes editing the file and it is not clear from your description that this is the case here.

As an experiment, you could clear the cached version before you perform your delete operation.  To clear the cached version do the following as describe in the Consolidated WIL Help file:

Code: Winbatch

"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates