Avoid multiple instances of QGIS on a shared drive - qgis

Is it possible to prompt an error/warning box when opening a QGIS-file that is already opened by another user on a shared drive?
At work we are using QGIS to more and more tasks meaning more and more people are using the different QGIS-files. We are starting to see an issue of multiple people opening the same QGIS-file at the same time and are making changes. My thougt is that ot would work the same way AutoCAD, Word, Excel and other programs work where when you attempt to open a shared file that is already opened by another user, you will be warned. Often you will be able to open a "read only"-version but that won't be neccesary in QGIS, in my opinion. It will be sufficient to be advised that the file is already open in another instance in some form of dialog box.
Anyone having had the same issue and perhaps have come up with a solution?

Related

How to prevent files from opening automatically while using Live Share on VS Code?

When multiple users are coding a project and one user opens a file, the same file is opened for all other users. This becomes really annoying as several files get stacked in your VS code app. Is there a way to disable this?

Is there a way to script Microsoft Word to save all open documents automatically?

My father can't seem to shutdown his computer, ever, so I'm using Task Scheduler to have it automatically power off every night. Thing is, he also can't seem to save his documents, so I need to make sure every open document has it's changes saved when it shuts down. Is it possible to do this using AutoHotkey, VBA, or with some MS Word feature I'm not aware of?
I'm aware of the AutoRecover feature. But, as I understand it, that just saves a copy in another folder that gets thrown away when the document is opened again. It's not as reliable as a manual save.
Any help on this is appreciated. It physically hurts to watch tech-illiterates abuse their PCs.

Revert/Reload all open files in Visual Studio Code?

I have been trying to figure this out, and cannot determine if it is possible or not.
Essentially, I commonly work with a VSCode window containing many files located on an external network drive (CIFS mount in Linux). When these files are changed "on-disk", they do not update in the editor until I switch focus to each file by changing the active editor tab. This means I have to switch tabs, wait for the update to process, and then repeat for all open tabs (could be 10 or 20 tabs).
Is there anyway to force all open editors to refresh or revert at once? That would ease my workflow a lot for examining differences between these open files on the fly. There's a command to "Revert File", but that only works on the open file, rather than all currently-opened ones. I've looked in the settings and browsed for an extension, but I can't find anything to accomplish this task.
Well, You can try to map the external network drive to local disk and give appropriate permission for read and write restriction.
If your computer has firewall or anti virus installed, then you must exclude vs access restriction from fw/av inspection.
Otherwise you can also improve your network adapter performance, associate to buffers, throughput, packet latency, etc.
Alternatively, you can use any source control, so your codes could be persist locally and could be synchronized from/to source control server.
Hope this could helps.

how to check if a .html file is open, if yes, close it using windows PowerShell script

I am new to PowerShell scripting. I would like to know if i can check whether a html file is open. If it is opened, then i would like to re-open it after running the same script.
My script creates a html file and using Invoke-Item, i am opening it. The next time i run the same script, the updated html file gets opened in the new tab. I want my script to close the previously opened file right before opening the new one or some similar logic.
By using Invoke-Item you actually are asking Windows' Explorer to open the file with the default application that's registered for .html files. In out of the box configuration, that's Internet Explorer or Edge. This, of course, can be customized.
Depending on the browser used, there might be a COM interface for querying browser status. As how to do that is subject to another a question, as it really depends on the browser. Looking for, say, file handles might or might not work, as browsers tend to open files in read only mode - they are not supposed to modify it anyway.
Anyway, this sounds like another a XY problem. Please edit the question and describe what problem are you really trying to solve; maybe there's better a way.

VS2005 - Automatically requesting checkout of form on open, with "View Designer"

I'm trying to integrate our Source Control(SourceAnywhere) with VS and are getting a lot of push back because of this one issue.
Almost every time we open some of our Windows forms using 'View Designer' it edits the file (* appears beside file name). Nothing has yet been changed, I've tried comparing the before and after files and they are exactly the same. If we have the solution bound it will check the file out, but even if its not bound it still 'edits' the file. When you try to check the file back in, it doesn't get a new version or anything.
I've done some searching and haven't been able to find any way to change this behavior.
This is a huge pain point for me as if someone already has the form checked out and someone else tries to open it, they just get told that it can't be checked out, and the form won't open. Or, someone who has no intention to edit the form, will now have the form checked out but hasn't made any changes.
Thoughts?
This usually happens when there are controls within the form that have "Dock" set. If the IDE feels it needs to resize the form, then those controls will also be resized, and all of that information needs to get re-written to the source file. In the case where you're editing a form named "Form1" this source file is not Form1.cs, but rather Form1.Designer.cs - try comparing that file with the version from source control.
Alternatively, move to a source control system that doesn't use locking by default (for example, Subversion) or disable that feature in SourceAnywhere. This will require users to manage merge conflicts, but allows multiple users to work on a single file at the same time.