markdf Posted July 5, 2016 Posted July 5, 2016 Is there any way for an application to detect whether it's being run in Mod Organizer? I'm developing a tool that would strongly benefit from being able to detect whether it's accessing the virtual file system or not.
0 Greg Posted July 5, 2016 Posted July 5, 2016 You might ask @Tannin, the developer of Mod Organizer on github.https://github.com/TanninOne/modorganizer/issues
0 Kesta Posted July 5, 2016 Posted July 5, 2016 (edited) Add recognition of a parameter like -modorganizer in your code, and tell your users to add it in the application's arguments when they add it through MO. This is very little work for your users (most of them will most likely be used to this with stuffs like DynDOLOD), and very little for you as well. Other than that, you could try to force your app out of MO's vfs, and then compare the content of the actual Data folder with the vfs. But this could prove extremely hard to do, especially considering the first option. Last alternative : Put your actual code in a .dll, and build two apps dependent of it : A regular one, and one as MO's plugin, though I'm not sure how convenient it is to create an actual plugin for MO. Edited July 5, 2016 by Kesta
0 markdf Posted July 6, 2016 Author Posted July 6, 2016 After messing around in the console, it looks like vfs files show up with no owner field. I think maybe it would be enough to check the Data directory for the presence of files with no owner. Does that sound reasonable? FNIS auto detects whether it's being run from MO, I wonder what it does? Maybe it checks its own file permissions.
0 Tannin Posted July 6, 2016 Posted July 6, 2016 Just check if hook.dll (or usvfs_x64.dll for MO2) is loaded using the getmodulehandle api.
Question
markdf
Is there any way for an application to detect whether it's being run in Mod Organizer? I'm developing a tool that would strongly benefit from being able to detect whether it's accessing the virtual file system or not.
4 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now