Why doesn't QGIS automatically find the new plugin update during startup?

Why doesn't QGIS automatically find the new plugin update during startup?

I have done a plugin for QGIS and I made a repository (xml) for the end users to install it. Then, I made a new version and update also my repository file with the new one but Qgis doesn't automaticaly find the new update during startup. Where should I flag the new version? I flag the new version in xml file like that:from1.0.0 changed to 1.0.1but Qgis doesn't recognize any new version.

I found it! I haven't update the version attribute in pyqgis_plugin tag:

Why doesn't QGIS automatically find the new plugin update during startup? - Geographic Information Systems

Alternative installation of QGIS without using the Windows registry

This project describes a method for installation and operation of QGIS on Windows where QGIS uses a simple text file (ini file) for storing setup parameters. The default Windows installation of QGIS uses the registry to store configuration parameters.

By removing the dependency on the registry for QGIS a number of advantages is achieved:

  • A local installation can be reduced to copy a directory to the PC and start QGIS. The first use of QGIS will complete the installation. You do not need to generate complex msi scripts for installation.
  • Alternative installations, such as placing the QGIS program on a network drive or installation in a Citrix environment is trivial modifications of the descibed, local installation.
  • All setup parameters are collected in a ini file that are easy to inspect and edit using a simple text editor.
  • By placing the program folder outside the "C:Program Files" or similar directories it's possible to install QGIS without "Local Admin" rights. This can be used by QGIS course instructors for a quick installation of QGIS on a large number of PC's, where you only have normal user rights.
  • Make an installation of QGIS on many PCs having the exact same setup, including pre-installed plugins.

Disadvantages of the method:

  • The method requires more preparatory work compared to a manual standard installation on a single PC.

During a normal installation Qgis is stored at different locations on the PC:

  • Programs are placed in a program folder, for example. "C:Program FilesQGIS Lyon" for QGIS ver. 2.12. This program folder contains the main program, dll's and possibly a number of external programs such as GRASS, SAGA, ORFEUS like. The directory contains no setup parameters or user-specific data. Program folder location depends on the installation method (If you do not know the different installation methods, you can study the QGIS.ORG web site for downloading the program: [] (
  • A folder ".qgis2", usually placed in the user's home directory, eg. "C:Usersvtho.Qgis2" for user "bvtho" of the PC. This folder contains folders for temporary data from Processing, color palettes, templates for project management and code for all non-core plugins. This folder is personalized for each user.
  • One or more branches in the registry, primarily "HKEY_CURRENT_USERSoftwareQGIS". Registry contains all the setup parameters for QGIS.

The goal is to remove Qgis setup parameters from the registry and placing them in a file located in the user folder .qgis2 ( ".qgis2QGISQGIS2.ini")

This operation is split in two phases:

"PREPARE" phase, where the GIS administrator prepares a standard Qgis installation, so it is ready for installation at the the user pc.

"RUN" phase, where the prepared QGIS installation (one directory) is copied to the user pc and the end-user makes the final installation during the first start of QGIS on the PC.

Install an ordinary version of QGIS on your PC. It should not be installed in "C:Program Files" or "C:Program Files" - during the "PREPARE" phase several files will be added or edited in the QGIS directory. Various safety-rules in the "C:progam files" may interfere or prevent this process.

Find the location of the start-up file "qgis.bat" (file * can * have a different name depending on the version and installation method). The file is located in the folder "bin" under QGIS program directory, for example "C:Program FilesQGIS Lyoninqgis.bat".
This .bat file will prepare a number of parameters for Qgis and ends with the actual start of Qgis.

Make a copy of "qgis.bat" with the name "qgis-start.bat" and place the file in the same folder as the original.

Edit "qgis-start.bat" using a text editor like Notepad:

Find the last line in the file - it looks like this:

Insert a line of text before the last line and edit the line itself:

(In the last line --configpath"%QGIS_UDIR% " is added immediately before %* )

Save the edited file. The GitHub distribution contains an example of the edited file. However, you are advised not to use it directly, but only as a guide, as there may be small differences between different QGIS installations.

Copy "qgis-prepare.bat", "qgis.reg.tmpl" and "minised.exe" from Github distribution folder to the same folder as "qgis-start.bat".

During the ordinary Qgis installation two dll - files is copied to directory "C:WindowsSystem32". The files are Microsoft basic support files that is used by Qgis. To ensure that the files are present in subsequent Qgis installations the files has to be copied from "C:WindowsSystem32" to the Qgis program directory, subdirectory "in" (ex. "C:Program FilesQGIS 2.18in")

The names of the two files is msvcp120.dll and msvcr120.dll, if the version of Qgis is 2.18. For earlier Qgis the names might be msvcp110.dll / msvcr110.dll or msvcp100.dll / msvcr100.dll.

NB! If a Qgis 32 bit version is prepared using aWindows 64 bit PC, the dll files has to be copied from directory "C:WindowsSysWOW64" - not "C:WindowsSystem32".

Start Qgis by double-clicking the "qgis-start.bat" (not qgis.bat). The edits in "qgis-start.bat" and the use of "qgis-prepare.bat" means that
1) a new user folder will be created in the QGIS program folder named ".qgis_template" and
2) all setup parameters will be stored in an ini-file "QGIS2.ini" located in a subfolder of the new user folder ".qgis_template".

After starting Qgis you'll have to (re)establish all Qgis setup parameters. The setup-file "QGIS2.ini" contains only the bare minimum of standard options (no existing setups have been copied from the registry).

Setup includes installation of plugins, setting all user preferences regarding digitizing, snap, selection etc. And not least: For the processing to work properly, you have to - under "options for processing" - specify where GRASS, SAGA, ORFEUS etc. are located.

NB! If you have installed these libraries using a separate installation of these additional programs, they must be placed under the Qgis program folder.

NB !! While starting Qgis using "qgis-start.bat" the script "qgis-prepare.bat" will be executed immediately before the start of the main Qgis program. The script includes commands to store the position of the Qgis program folder and the user's home directory during the "PREPARE" phase. This information is later used during the "RUN" phase. Do not change the location of the Qgis program folder or switch to another user during the "PREPARE" phase. However, you may start QGIS several times during "PREPARE" phase, so you don't have to do all the prepapatory work in one session.

Do not proceed to the next step until you have your 'perfect' setup of QGIS running !!

When you're done with the preparation of Qgis re-edit "qgis-start.bat" with the following:

And delete/rename the original "qgis.bat" so a user does not use it inadvertently. Don't make any additional changes in the configuration of Qgis after the last edit of "qgis-start.bat".

You are now ready to distibute.
Copy the prepared Qgis program folder to the user's PC (Tip: You might zip it and distribute the zip file). It's prefectly possible now to place the Qgis directory under directory "C:Program Files" on the user's pc
The prepared QGIS program folder will contain a "template" of the QGIS user folder in the ".qgis_template" directory with all the plugins, setup changes and additions that you made during the "PREPARE" phase - and an ini file with setup parameters, which normally would have been placed in the registry.

Ask the user to start QGIS by double-clicking on the file qgis-start.bat located in the "QGIS program folder"in directory.

The "qgis-start.bat file will - at first run - finish the installation by automatically creating a copy of ".qgis_template" directory in the user directory, create a shortcut on the desktop and generate file associations between .qgs files and the new QGIS program. Finally, all file and directory references inside the "qgis2.ini" file will be adapted to the new locations of QGIS program- and QGIS user-directory on the user's PC.

Subsequent calls of qgis-start.bat will perform an simple, ordinary startup of QGIS.
The installation and start functions described in sections 3 & 4 can be examined by studying the script "qgis-prepare.bat". All steps in this bat-file is commented in detail.

If your IT department wants to make a .msi based install, you can package the prepared program folder and a shortcut for starting QGIS (for example for location on the desktop). You just have to edit "qgis-prepare.bat" and remove a single command line in the file. The command is designed to create a shortcut on the desktop, but this is superfluous as the msi-package will contain this shortcut. The command line is clearly marked using comments in the file "gqis-prepare.bat".

After roll-out of the msi package, the first start-up of QGIS by the user will complete the installation as described in "RUN" phase point. 3.

The version of the file "qgis-prepare.bat" which is available on GitHub is designed to place the QGIS user-folder in a subfolder ".qgis_214" to the user's home directory, for example "C:Usersvtho.qgis_214" (if using the initials "bvtho" on a Windows7 based PC). This is very similar to the original default location where the folder would be called ".qgis2"

It is possible to use another location, just by editing a single setting in "qgis-prepare.bat". Find the lines:

and customize "%USERPROFILE%.qgis_214" to the new location. (%USERPROFILE% is an environment variable that points to the user's home directory)

Use Case: Installation of QGIS on a pc, on which you do not have "Local Admin" privileges.

This can be accomplished without any edits at all to "qgis-prepare.bat" file. Simply copy the QGIS program folder to a location where a ordinary user has write access rights, for example somewhere in the user's home directory.

Use Case: Central installation of QGIS on a network drive

Instead of placing the QGIS application folder on a local drive on the user's pc it's possible to place this folder on a networked drive, for example. "X:Programsqgis". No changes to "qgis-prepare.bat" is necessary.

Since QGIS do not write/update setup data to the QGIS program directory, it can be can be shared by many users. The only drawback is longer start-up time because network shares generally is slower than a local drive.

Use Case: Installation of Qgis on Citrix

On most Citrix installations each user have a personal network based folder, for example "M:personal". Instead of placing the Qgis user folder on the local drive of the Citrix server, you can place the user folder on the user's personal network drive. Since the modified Qgis installation doesn't use the registry, the individual Citrix server will not contain any user specific setup data at all, only program files and additional files like help files. This simplifies the Qgis installation and daily use of Qgis installed in a Citrix server farm.

If the user's personal directory is called "M:personal" you can do the following:

In "qgis-prepare.bat" change the line:

Prepare Qgis as described on a normal pc (not Citrix). After preparation and the last change to "qgis-start.bat", copy the prepared Qgis program folder on the Citrix server - or servers, if it's a Citrix server farm.

The first time a user starts the Citrix - Qgis, it will create the use user environment and this environment will be placed in a location not on the Citrix server. The following startups of the Citrix - Qgis will be normal, because the user environment already exists even if the started Qgis is placed on another server in the Citrix server farm

Use Case: Installation of 2 different QGIS versions on the same PC with different user setup for each QGIS version

  • An existing setup of QGIS that must not be changed (We call it QGIS 2.8!)
  • At the same time want to have an alternative installation (We call it QGIS 2.14!)
  • The two systems must not interfere with one another, i.e. neither share user setup or plugins.

This can be done by following (We assume that QGIS 2.8 is standard installed, ie. using the registry and storing other user data in the folder ".qgs2" in the user's home directory).

  1. Install Qgis 2.14 on a "fresh" PC, ie. without an existing Qgis installation
  2. Complete the "PREPARE" phase on the new installation, and make sure that Qgis 2.14 will use another user directory than ".qgis2", for example ".qgis_214"
  3. Copy the Qgis 2.14 program folder the the PC with the existing version 2.8 of Qgis, and make sure the Qgis 2.14 program folder is different from the existing Qgis 2.8 program foleder.

At the first startup of the new Qgis 2.14 will create the new user folder ".qgis_214". The existing user directory for Qgis 2.8 is not affected. And the new installation does not use the registry, so it won't interfere with Qgis 2.8 setup

The process can be completed with several versions/newer versions of Qgis: Qgis 2.16/".Qgis_216", QgisG 2.18/".Qgis_218" and so on.

How to fix 'Could not find the Qt platform plugin &ldquoWindows&rdquo in &ldquo&rdquo' when implementing qgis in custom Python3 application?

I am implementing qgis 3.4.3 in a custom application, but when I instantiate the QgsApplication() class, I receive the error "Could not find the Qt platform plugin "Windows" in "".

I've attempted using various installs of qgis 3.x+ including the standalone installer and OSGeo4W web installer. I currently am sticking with the OSGeo4W web installer installation. I am using a Python 3.7 installation separate from what comes with OSGeo4W and attempting to integrate qgis functionality.

I have followed the instructions in the following QGIS help doc under the section: "Using PyQGIS in Custom Applications"

After attempting to run the script I realized a dll plugin was missing. After some research, I found its the qwindows.dll that qt uses. The qwindows.dll is included in the OSGeo4W installation under: C:OSGeo4WappsQt5pluginsplatforms

I changed the QT_PLUGIN_PATH variable on the local command prompt to include the directory above, but the same error prevailed. I also changed the QT_DEBUG_PLUGINS variable to 1 which printed out the locations Qt is looking for plugins. Interestingly, it wasn't looking for plugins in the path I specified in the QT_PLUGIN_PATH variable.

2 Answers 2

Instead of enabling the add-in every time Excel is started, you need to find the cause which leads to disabling the add-in.

Microsoft Office applications can disable VSTO Add-ins that behave unexpectedly. If an application does not load your VSTO Add-in, the application might have hard disabled or soft disabled your VSTO Add-in.

Hard disabling can occur when a VSTO Add-in causes the application to close unexpectedly. It might also occur on your development computer if you stop the debugger while the Startup event handler in your VSTO Add-in is executing.

Soft disabling can occur when a VSTO Add-in produces an error that does not cause the application to unexpectedly close. For example, an application might soft disable a VSTO Add-in if it throws an unhandled exception while the Startup event handler is executing.

When you re-enable a soft-disabled VSTO Add-in, the application immediately attempts to load the VSTO Add-in. If the problem that initially caused the application to soft disable the VSTO Add-in has not been fixed, the application will soft disable the VSTO Add-in again.

So, I'd suggest enabling logging and find which line of code fires an exception at runtime and why the add-in is automatically disabled. See How to: Re-enable a VSTO Add-in that has been disabled for more information.

4 Answers 4

For individual containers, there is a restart policy you can apply. That's set with docker run --restart=. when starting the container, or a restart: . line in the compose yml file. You can change the restart policy in an existing container with:

To list all containers and their restart policies, you can run this from bash:

no Do not automatically restart the container when it exits. This is the default.

on-failure[:max-retries] Restart only if the container exits with a non-zero exit status. Optionally, limit the number of restart retries the Docker daemon attempts.

always Always restart the container regardless of the exit status. When you specify always, the Docker daemon will try to restart the container indefinitely. The container will also always start on daemon startup, regardless of the current state of the container.

unless-stopped Always restart the container regardless of the exit status, but do not start it on daemon startup if the container has been put to a stopped state before.

A restart policy of always would result in an unexpected container restart after the docker daemon restarts like you are seeing, even if you had intentionally stopped the container. For this reason, I typically create standalone containers with a unless-stopped restart policy.

If you are using docker swarm mode, then services will automatically start up a new container any time the target state doesn't match the current state. For a single node swarm cluster often seen with laptops, this means the container will restart when you restart docker, but also if you just stop or delete the running container.

The permanently stop and remove a service:

If a service is configured with replicated mode, and you simply want to stop it temporarily without deleting the service, you can update the target replicas to 0:

And services may be deployed as part of a stack. To remove the entire stack:

3 Answers 3

If you must hack core, consider doing so in a way that makes it extensible for others.

Add an Action Hook

Nine times out of ten, you could do what it is you wanted if only there was an extra do_action call in a specific file. In that case, add the action, document it, and submit a patch via Trac. If there's a good reason for your patch (i.e. you're not the only one who would ever use it) then you can probably get it added to core.

Next, build a custom plug-in (you don't have to release/distribute it!) that ties in to this new hook and performs whatever function you need it to do.

Refactor a core file

Other times, you might just need a piece of code to behave differently. Pass a variable by reference, for example, or return a value rather than echo it. Take some time to sit down and refactor the code so it does what you need it to do . then submit a patch via Trac so the rest of us can benefit from your work.

Do you see a theme developing here? Hacking core isn't necessarily a no-no . just something most developers will highly discourage for new users or novice programmers (if you're asking us how to do something, we'll suggest a plug-in every time before even considering to suggest you hack core).

Hacking core is the way WordPress develops and evolves, but it's dangerous for someone just learning PHP or with no experience working with WP files. Please start with a plug-in before touching core - if you break a plug-in you can uninstall it quickly (removing via FTP if necessary) . but if you break core, bad things can happen to your site and potentially to your database as well.

But if you are in a situation where a core hack is unavoidable, then make the change. Also, publish your change in a prominent location (if your blog is highly visible, that might be sufficient . but I suggest Trac because that's how community changes get pulled into the next release). Your change might be the magic bullet that could fix problems in a hundred different sites . so contribute back to the community that helped you build your site.

If the change gets committed, then your hack becomes part of core and you won't need to worry about it in the future. If it doesn't, at least you have detailed documentation on how to re-implement the hack after you upgrade WP in 3 months.

4 Answers 4

W32time will not start automatically if the PC is not in a domain. Damn Microsoft!

Try to run this: sc triggerinfo w32time start/networkon stop/networkoff

One possible explanation, from this thread:

The way I understood it, basically the service won't be turned on until you or a task or a piece of hardware or network, start an event to turn it on. When you try to update the time, you call on the service and trigger the event 'Start xyz service'. It can also turn the service off when finished. That's very simplified. It is one reason why seven is faster, because many services are only running when needed instead of running all the time waiting for something to use them. In effect you don't have to try to decide which services you need or don't, they can take care of themselves.

He's talking about the new kernel in Windows 7.

Since Windows Server 2008 R2 and Windows 7 do share the same kernel, I wonder if the resolution is the same?

They recommend setting the service to automatic/delayed start to fix this.

I still maintain it's downright insane that a service set to automatic wouldn't be started . and I don't fully understand the semantic difference between a delayed auto-start and an auto-start, but if it works, I guess I won't complain.

Dart/ flutter: application crashes on startup

I have this very interesting issue, where I can run my application on the emulator just fine, flutter build apk is successful, I can either release the new version on Google Play or just install the apk on my phone (Pixel 2 XL, currently on April security patch).

But when I launch it on my phone, it instantly crashes. I haven't tried installing the debug apk yet, first I want to apply the May patch.

I already tried upgrading flutter several times, but doesn't seem to be any issue there either:

I recently switched laptops and checked out the git repository of my code on this new one. There were some problems, but I eventually fixed those. The only difference is that that the project name now is simply osszefogasaszanhuzokert , while the package name is osszefogasaszanhuzokert2 - but I don't think this should cause any problem.

My guess is that the problem will lie somewhere in my AndroidManifest.xml :

Android studio marks several attributes as not allowed, but as you can see I pretty much left everything as default - except I changed the android:label for obvious reasons.

EDIT: I installed the debug apk and it runs perfectly. However, I was able to get adb logcat of the crash of the release apk, and the problem seems to be the following:

Everything says Applocker is supposed to work: Why doesn't it?

I've setup a basic group policy consisting of the default Applocker rules. Per Microsoft's technet article on the subject, any files not explicitly allowed to run by the policy are supposed to be blocked from running. After deploying this policy and verifying it was being applied to the correct user using gpresult , I was still able to download and run an exe from the internet, an exe that was saved to the user profile's temp folder. It was at that point I did more googling, and saw that the App Identity service had to be running, and it wasn't: So, like any good admin, I started it, set it to automatic, and rebooted just in case. The policy still didn't work after restarting. Below is a screenshot of the current policy.

I added the deny rules explicitly because the default rules weren't working. I correctly applied the policy to the machine and verified that the rules are enforced (it says so in the screenshot). I used the Test-AppLockerPolicy cmdlet to verify that the rule is should be blocking the EXEs and MSIs from running, but it doesn't. Open to most suggestions, no matter how ludicrous they may sound.

Forgot to add that I checked the event log for AppLocker during this whole fiasco, and it was blank. Not a single entry the entire time.

I use a file ( onetime.php ) in my include-folder inc , which is included in the functions.php , and deleted from there after the use.

In my onetime.php my function f711_my_onetime_function() is placed. As it could be any function. I assume your script is tested and works correctly.

To achieve the control over the execution of the script, I use both

Capability control

To stop other users from accidentally executioning my script:

A transient

to stop myself from accidentally executing the script more than once.

The file for executing the script in my function f711_my_onetime_function() would look like that:

The reason I set the transient immediately after the check if it exists is that I want the function to be executed after the script has been locked from beeing used twice.

If I need any output from my function, I either print it out as a comment in the footer, or sometimes I even filter the content.

7 Answers 7

After several attempts I finally found the file that is created during the installation process. So to prevent AnyDesk from starting at login, you need to delete the file,

That solved my issues with autostarting AnyDesk at login.

/Library (former is the system library, latter is your users' library folder) &ndash Simon Fredsted Oct 6 '18 at 8:50

I looked into the plist file (/Library/LaunchAgents/com.philandro.anydesk.Frontend.plist) suggested in one of the answers here.

You can open the file using any text editor and change the lines:

Update for file path: /Library/LaunchAgents/com.philandro.anydesk.Tray.plist

Open your terminal and type this :

Basically this will set the auto start boolean value in the *.plist file from true to false which as a result would disable the autostart function. It's practically the same thing as the above solutions but much simpler.

User was on version 5.0.1 at the time of this answer.

For Windows users, you have to disable the application on startup and change the service startup type to manual.

For example on Windows 10 you should do the following:

  1. Task Manager => Startup tab => right click on AnyDesk and change it to disable.
  2. Control Panel => Administrative Tools => Services => AnyDesk Service => Right click and select properties => Startup type from [Automatic] to [Manual] => also you can press on stop button.

Next time when you want to start the application, windows will ask for permission (UAC) to start the AnyDesk service and also after quitting the application windows will ask for permission (UAC) to stop the service.