+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Wildfile "locks itself" after one use

  1. #1

    Wildfile "locks itself" after one use

    I love the Wildfile macro -- I probably use this feature of VEdit as much or more than any other! I'm happy with the redesign, and very happy it is now available in Windows 7.

    I ran a Wildfile query against a bunch of files, and it worked as I expected (i.e. flawlessly). However, when I did it a second time (after exiting VEdit), I got the message "In Overwrite-Only Mode --see (Config, File Handling)". The problem was that the previous Wildfile created a file called search.tmp in Program Files\VEdit\config -- if I manually delete this file, I can run another Wildfile query.

    Two questions/issues. 1) Why is this temporary file "hidden away" inside Program Files? [I think I installed VEdit as Single User, so this may be the default, but shouldn't configuration info always be stored in a User area?] 2) Why is this file written in Overwrite-Only mode in the first place?

    Note that I'm being a little "lazy" by asking this in the Forum, rather than diving into the macro itself and trying to figure it out/fix it. Sadly, I've got too much on my plate at the present to indugle myself "having fun with the internals".

    Bob Schor
    Happy VEdit User for >2 decades

  2. #2
    Senior Member
    Join Date
    Aug 2011
    Location
    British Columbia, Canada
    Posts
    383
    Hi,

    I think the single-user install option is NOT a good idea on Win7. Windows 7 is very picky about files being altered under c:\program files or c:\program Files (X86).

    My suggestion is you do an uninstall of Vedit, and reinstall using the multiple users option. You want the User_Home under the directory [driveletter]:\users. The location is the parent of My Documents. In my case this is c:\user\owner, but your system may be different.

    When the install program asks where to put the user_home directory, specify c:\users\[parent of My Document]\vedit
    (my system it is: c:\users\owner\vedit

    This is what I did on my system, never had a problem.

    Did I make any sense???

    Scott
    Last edited by GreenviewData; September 22nd, 2011 at 02:37 PM. Reason: Requested Correction

  3. #3
    Quote Originally Posted by bschor View Post
    I love the Wildfile macro -- I probably use this feature of VEdit as much or more than any other! I'm happy with the redesign, and very happy it is now available in Windows 7.

    I ran a Wildfile query against a bunch of files, and it worked as I expected (i.e. flawlessly). However, when I did it a second time (after exiting VEdit), I got the message "In Overwrite-Only Mode --see (Config, File Handling)". The problem was that the previous Wildfile created a file called search.tmp in Program Files\VEdit\config -- if I manually delete this file, I can run another Wildfile query.

    Two questions/issues. 1) Why is this temporary file "hidden away" inside Program Files? [I think I installed VEdit as Single User, so this may be the default, but shouldn't configuration info always be stored in a User area?] 2) Why is this file written in Overwrite-Only mode in the first place?
    First, I agree that Wildfile (or any other program that writes to Program Files) at any time after installation is a bug.
    This has been the case since XP, but only with Vista was it prohibited.
    In fact the files are not written there, because of feature of Windows designed to handle legacy programs.
    The directories are virtualised, and each user gets a copy. The detail is more complex.

    There is nothing wrong with installing Vedit as a Single User, macros should use %APPDIR%.

    PS To clarify the directory should be %APPDATA%. I typed this from memory, as I now use a Mac for most of my computing.
    Also you shouldn't have to enter this; Vedit should do this automatically.
    Last edited by ian binnie; September 23rd, 2011 at 08:15 PM. Reason: Correct error in APPDATA

  4. #4
    Thanks for the speedy replies. I've done the following: First, I followed a mix of Scott's and Ian's suggestion -- I reinstalled VEdit using "Multiple", and took the default Home directory of %APPDIR%\VEdit. Same thing, first Wildfile is fine, second "locks". Now the Search.tmp file is in
    Users\RSchor\AppData\Roaming\VEdit\Config. Next, I tried Ian's suggestion, modified slightly to use %HOMEPATH% (in place of %APPDIR%).
    Again, same thing, locks, but now the file is (as expected) in \Users\RSchor\VEdit\Config. I just checked to be sure the file isn't marked ReadOnly (it isn't) -- must be something Wildfile is doing ...

  5. #5
    Quote Originally Posted by Scott Lambert View Post
    Sorry, first line should read: I think the single-user install option is NOT a good idea on Win7.
    What is the single-user option supposed to do?

    Normally, when installing Windows applications, there are two options: install for current user, or install for all users.
    I assumed that the single-user option is the same as "current user".

    Anyway, in both cases the user configuration data (USER_CFG) should be stored in user specific directory where the user has write access.
    I wonder why VEDIT sets USER_CFG to point in program files.

    --
    Pauli

  6. #6
    Quote Originally Posted by ian View Post
    There is nothing wrong with installing Vedit as a Single User, macros should use %APPDIR%.
    No, macros should not use environment variables.
    One reason is that the variable may not exist in all Windows versions.
    For example the variable APPDIR does not exist in my system (XP). (However, there is a variable APPDATA.)

    Macros should use VEDIT internal string value USER_CFG, as Wildfilew.vdm does.
    VEDIT installer should set this string to a correct value.

    --
    Pauli

  7. #7
    Senior Member
    Join Date
    Aug 2011
    Location
    British Columbia, Canada
    Posts
    383
    Quote Originally Posted by pal View Post
    What is the single-user option supposed to do?
    --
    Pauli
    My understanding is it is for backwards compatibility, when everything could be stored under c:\vedit. Under XP and earlier it is a viable option.

    Or is that a different option, I am confusing it with?

    Scott

  8. #8
    Administrator
    Join Date
    Aug 2011
    Location
    Ann Arbor, MI
    Posts
    103
    I cannot replicate the problem on Windows 7.
    After installing 6.21 as "[Single]", USER_CFG is set to c:\users\ted\appda\roaming\vedit\config as it should be.
    This can be checked by going to VEDIT's "COMMAND:" prompt (with <Ctrl-E>) and entering the command "cfs" (short for Config_String). In this case I get:

    Code:
    HOME             "c:\Program Files (x86)\vedit"
    MACRO_DIR        "c:\Program Files (x86)\vedit\macros"
    CONVERT_DIR      "c:\Program Files (x86)\vedit\convert"
    USER_HOME        "C:\Users\Ted\AppData\Roaming\vedit"
    USER_CFG         "C:\Users\Ted\AppData\Roaming\vedit\config"
    USER_MACRO       "C:\Users\Ted\AppData\Roaming\vedit\user-mac"
    FILE_CFG_DIR     "C:\Users\Ted\AppData\Roaming\vedit\file-cfg"
    SYNTAX_DIR       "C:\Users\Ted\AppData\Roaming\vedit\syntax"
    PROJECT_DIR      "C:\Users\Ted\AppData\Roaming\vedit\projects"
    BACKUP_DIR       "C:\Users\Ted\AppData\Roaming\vedit\backup"
    VEDIT_TEMP       "C:\Users\Ted\AppData\Local\Temp\VeditTmp"
    FTP_DIR          "C:\Users\Ted\AppData\Roaming\vedit\ftp"
    VEDIT_INI        "C:\Users\Ted\AppData\Roaming\vedit\vedit.ini"
    These values come from the vedit.ini file:

    Code:
    HomeDir=c:\Program Files (x86)\vedit
    UserHomeDir=C:\Users\Ted\AppData\Roaming\vedit
    MacroDir=c:\Program Files (x86)\vedit\macros
    ConvertDir=c:\Program Files (x86)\vedit\convert
    UserCfgDir=C:\Users\Ted\AppData\Roaming\vedit\config
    UserMacroDir=C:\Users\Ted\AppData\Roaming\vedit\user-mac
    FileCfgDir=C:\Users\Ted\AppData\Roaming\vedit\file-cfg
    SyntaxDir=C:\Users\Ted\AppData\Roaming\vedit\syntax
    ProjectDir=C:\Users\Ted\AppData\Roaming\vedit\projects
    BackupDir=C:\Users\Ted\AppData\Roaming\vedit\backup
    VeditFtpDir=C:\Users\Ted\AppData\Roaming\vedit\ftp
    VeditTempDir=%TEMP%\VeditTmp
    Startup=startup.vdm
    If these are wrong, you can try editing the vedit.ini file with notepad. Or delete all VEDIT files and try in the install again.

    In any case the USER_CFG variable must point to a directory in which you have full control.
    Last edited by mrvedit; September 23rd, 2011 at 01:59 PM.

  9. #9
    Quote Originally Posted by Scott Lambert View Post
    My understanding is it is for backwards compatibility, when everything could be stored under c:\vedit. Under XP and earlier it is a viable option.
    Or is that a different option, I am confusing it with?
    No, that is the "Traditional" option.
    With Traditional option, everything can be stored under single directory (but it does not need to be c:\vedit).
    On the other hand, I recall that even with Traditional option, the installer prompts for Vedit directory and User directory separately.

    --
    Pauli

  10. #10
    Dear Mr. VEdit,
    Thanks for the comprehensive reply. I've done some further experimentation myself, and have seen WildFile work as I expect it to (i.e. without the error I reported). I'm about to get on an airplane, but I'll do some more testing when I reach the Other Coast.

    I was thinking "Why did I have this failure, but now it seems to work?" An idea is that I was using VEdit in an "unconventional" way -- to search for a string within binary (non-text) files (they were source files in a non-text-based "language"). I wonder if, when the original file was opened, some switch got set that said "Oh, this isn't a text file, better set the Overwrite-Only mode", and somehow this setting is passed along to search.tmp. Will experiment and report back.

    Bob Schor

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts