Plugin ini file weirdness if using from two user accounts

English support forum

Moderators: Stefan2, white, sheep, Hacker

zutroi67
Junior Member
Junior Member
Posts: 9
Joined: 2019-04-30, 08:12 UTC

Plugin ini file weirdness if using from two user accounts

Post by *zutroi67 » 2019-04-30, 08:39 UTC

I've read dozens of pages regarding my "makebat.wcx64" plugin being unable to read/write to/from its ini file inside the plugin directory. If I run TC as admin, the plugin works as advertised: it finds my previous plugin settings in the ini file no problem. If I run TC as-is from the desktop, the makebat plugin cannot find the old ini file and uses default settings. I re-installed TC into the root of my D: drive, but this still doesn't work. I tried changing the write/access permissions for the plugin/ini files and this also doesn't work. I'm totally at a loss how to use the plugin ini files correctly. Can anyone give me a definitive answer on this? Brand new Windows 10 install. TC 9.22a x64. Thanks.

User avatar
Stefan2
Power Member
Power Member
Posts: 2433
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Plugin ini file weirdness

Post by *Stefan2 » 2019-04-30, 09:19 UTC

The user with admin-rights and the default limited user are two different persons with different profiles.
Check out the menu HELP for "About TC.." and ini file location for each of that users.






.

User avatar
Dalai
Power Member
Power Member
Posts: 6532
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Plugin ini file weirdness

Post by *Dalai » 2019-04-30, 18:13 UTC

Stefan2 wrote:
2019-04-30, 09:19 UTC
The user with admin-rights and the default limited user are two different persons with different profiles.
[OT]
No, not necessarily. As long as UAC is enabled and the user is a member of the administrators group, the user name is the same, only the permissions (access token) for the user change when a program is started as administrator. However, you're right for the case that a user is NOT a member of the administrators group (regardless of UAC state). Then a program indeed runs under a different user account and different user profile (and access token as explained above).
[/OT]

Regarding the topic: Does the plugin makebat use its own settings file? I don't know the plugin because I don't use it. This question is important because if the plugin uses its own settings file, wincmd.ini or the plugin settings files provided by TC (pkplugin.ini, fsplugin.ini, contplug.ini and lsplugin.ini) don't matter at all, and can be ignored.

Regards
Dalai
#101164 Personal licence
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups

zutroi67
Junior Member
Junior Member
Posts: 9
Joined: 2019-04-30, 08:12 UTC

Re: Plugin ini file weirdness

Post by *zutroi67 » 2019-05-01, 08:29 UTC

Thanks for the replies. I have UAC turned off. I am nominally an "admin" user. The "windcmd.ini" file is placed in the program directory. Yes, makebat uses its own *.ini file. The working *.ini file contains a useful history of commands that have been used previously, meaning that I can usually choose a command from this history. This works just fine via TC if run as admin. However, if I run TC as default user (me) it refuses to read or use the historic *.ini file meaning there's no history to choose from. I have tried all of the things proposed by previous users: properties/attributes->read-only toggle; security permissions (of all types!) But nothing has worked.In Win 7 after I inactivated UAC I never had trouble like this. I'm not sure what to try next.

zutroi67
Junior Member
Junior Member
Posts: 9
Joined: 2019-04-30, 08:12 UTC

Re: Plugin ini file weirdness

Post by *zutroi67 » 2019-05-01, 09:42 UTC

I've tried re-installing TC in a non-system dir. I've tried taking ownership in a zillion ways. I just don't get it. I'm not a total newb, but this has me beat.

User avatar
Stefan2
Power Member
Power Member
Posts: 2433
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Plugin ini file weirdness

Post by *Stefan2 » 2019-05-01, 10:21 UTC

2zutroi67

How is the path to your wincmd.ini(s)?
Check out the menu HELP for "About TC.." and ini file location for each of that users.

And how is the path to your makebat.ini(s) ?



 

User avatar
Dalai
Power Member
Power Member
Posts: 6532
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Plugin ini file weirdness

Post by *Dalai » 2019-05-01, 17:55 UTC

OK, just to determine UAC state on your system: Do you see "yourname^" in TC's title bar when you run TC as administrator? If so, UAC is enabled. If UAC is enabled changing permissions is a little bit more challenging.

Regards
Dalai
#101164 Personal licence
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups

zutroi67
Junior Member
Junior Member
Posts: 9
Joined: 2019-04-30, 08:12 UTC

Re: Plugin ini file weirdness

Post by *zutroi67 » 2019-05-02, 06:32 UTC

Hi Dalai. Wow, yes, "myname^" is in the titlebar. I don't understand. I thought I had turned off UAC (the slider in UAC settings is definitely at the bottom ie. off.)

User avatar
Dalai
Power Member
Power Member
Posts: 6532
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Plugin ini file weirdness

Post by *Dalai » 2019-05-02, 07:06 UTC

Well, disabling UAC is a different thing than setting it to the lowest level. But that's not the point, now that I think about it. What matters in the end is whether or not the .ini files are writable, because I think that's where the culprit is. So, get the location of makebat.ini (or whatever the file's called) and try to edit it both as user and as administrator. I.e. start TC as user, find .ini file, press F4 to edit it and save it. Repeat the same as administrator. If the former doesn't work, that's likely the issue.

What doesn't fit in the picture at all is that you claim that makebat doesn't find any history when TC runs as user. The plugin is able to at least read the history from its .ini file even if it can't save new items to it (I just verified that). Meaning that it should show at least the history created when TC was run as admin.

Regards
Dalai
#101164 Personal licence
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups

zutroi67
Junior Member
Junior Member
Posts: 9
Joined: 2019-04-30, 08:12 UTC

Re: Plugin ini file weirdness

Post by *zutroi67 » 2019-05-02, 10:34 UTC

Hi. I found out how to turn UAC off properly this time. Thanks for the heads up.
I then tried editing the .ini file while TC run as user. Unfortunately, it edited and saved (as you proposed) just fine.
And yes, I agree with you that the unfound history inside the ini file is strange.
It appears that when run as user, TC/makebat is not finding the ini file at all. My question then, is why can't it find the ini file, particularly since this is all inside the plugin dir inside TC.
The plugin directory remains read-only under properties. I don't know if this means anything.
Thanks for your assistance. I really appreciate the time.

zutroi67
Junior Member
Junior Member
Posts: 9
Joined: 2019-04-30, 08:12 UTC

Re: Plugin ini file weirdness

Post by *zutroi67 » 2019-05-02, 10:48 UTC

Oh jees.
I turned off UAC, and tried to "take ownership" of the TC folders.
Now TC even run as admin won't read/use the makebat.ini file. I have royally screwed the pooch.

User avatar
petermad
Power Member
Power Member
Posts: 8341
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Plugin ini file weirdness

Post by *petermad » 2019-05-02, 11:25 UTC

2zutroi67
Try this:
  1. Restart your TC
  2. Open the directory of your makebat plugin
  3. Copy all the files including makebat.ini to some other directory (do NOT select "Copy NTFS permissions")
  4. Delete all the files in the makebat plugin directory, and delete the directory itself.
  5. Make the makebat plugin directory again
  6. Copy the files back to the directory
Now see if it works
License #524 (1994)
Danish Total Commander Translator
TC 9.22a 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 64bit, 'Everything' 1.4.1.935 (x64) and TC 3.0b3 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

zutroi67
Junior Member
Junior Member
Posts: 9
Joined: 2019-04-30, 08:12 UTC

Re: Plugin ini file weirdness

Post by *zutroi67 » 2019-05-02, 22:22 UTC

Hi petermad.
No, didn't work. The plugin re-made the .ini file and actually wrote out the command line that I provided to the plugin.
But on re-running, the plugin still doesn't bring up the command line history from the ini.
Something strange is happening here.
The makebat plugin usually saves (into the .ini file) each new command line you enter into the makebat arguments, making it basically a history of commands. Now that I've followed your points above, the last entered command line IS saved into the top of the .ini file, but the remainder of the hisotry file is now garbled: it's completely changed.
Next time I run the plugin, the previous command line is NOT recalled (it always defaults to "xcopy "%P%N" c:\someotherdir\%D") just like it's not reading the .ini file at all. But it definitely is saving the previously entered command line.
Upgrading to Win 10 was a really bad mistake I feel. Thanks again.

User avatar
Dalai
Power Member
Power Member
Posts: 6532
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Plugin ini file weirdness

Post by *Dalai » 2019-05-02, 22:36 UTC

Maybe rename makebat.ini to force the plugin to create a new one and see if that brings things back to normal?

Regards
Dalai
#101164 Personal licence
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups

User avatar
petermad
Power Member
Power Member
Posts: 8341
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Plugin ini file weirdness

Post by *petermad » 2019-05-02, 23:30 UTC

Maybe rename makebat.ini to force the plugin to create a new one and see if that brings things back to normal?
My suggestion too - it seems that your file is corrupt.

There is supposed to be up to 21 [oldstrings] and 1 [options]oemcharset= - nothing more.
Oddly enough the GUI only show 20 oldstrings.
License #524 (1994)
Danish Total Commander Translator
TC 9.22a 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 64bit, 'Everything' 1.4.1.935 (x64) and TC 3.0b3 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

Post Reply