<div dir="ltr"><div>Hi Edwin,</div><div><br></div><div>Is each of the dispatchers working on his own computer? why don't you just prepare a profile for each type of person and set it as default in their machines? That way, whatever the project is, they will always see it in non editing mode. Would that work?</div><div><br></div><div>Alexandre Neto<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 18, 2021 at 5:13 PM Charles Dixon-Paver <<a href="mailto:charles@kartoza.com">charles@kartoza.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">OK... I'll do my best to assist assuming all dispatchers are using Windows and QGIS is installed using the OSGeo4W with default settings.<br><br>Assuming you had dispatchers named "foo" and "bar", and you had user profiles called "foo" and "bar", you could a text file called "qgis-foo.cmd" and put the following content in it to fire up QGIS as the user "foo":<br><br>----------<br>@echo off<br>@setlocal enableextensions<br>@cd /d "%~dp0"<br><br>Set "MYPROFILE=foo"<br><br>%COMSPEC% /C "CALL C:\OSGeo4W64\bin\qgis.bat --profile %MYPROFILE% %*"<br>----------<br><br>Then you can do the same for "qgis-bar.cmd" and change the file to say Set "MYPROFILE=bar"<br><br>If you wanted to call a particular project, you could use "myproject-foo.cmd" and add another parameter like so:<br><br>----------<br>@echo off<br>@setlocal enableextensions<br>@cd /d "%~dp0"<br><br>Set "MYPROFILE=foo"<br><br>%COMSPEC% /C "CALL C:\OSGeo4W64\bin\qgis.bat --profile %MYPROFILE% --project C:\projects\myproject.qgz %*"<br>----------<br><br>If at all possible I would avoid any spaces in the path to your project, or put your cmd file in the same folder as the project and replace C:\projects\myproject.qgz with %~dp0\myproject.qgz (%~dp0 just means "path to the cmd file")<br><br>If, on the other hand, foo and bar log into windows as separate users, you could simply copy the relevant profile from your appdata directory and place it in their user directory, renaming it to the relevant generic profile name. So, for example, you could copy the directory "C:\Users\MisterAdministrator\AppData\Roaming\QGIS\QGIS3\profiles\foo" to "C:\Users\foo\AppData\Roaming\QGIS\QGIS3\profiles\911"<br><br>Then you could just give each user a link to "qgis.cmd" which has the following inside:<br><br>----------<br>@echo off<br>@setlocal enableextensions<br>@cd /d "%~dp0"<br><br>Set "MYPROFILE=911"<br><br>%COMSPEC% /C "CALL C:\OSGeo4W64\bin\qgis.bat --profile %MYPROFILE% %*"<br>----------<br><br>You could also set the system or user PATH variable to point to "qgis.cmd", so all "qgs" and "qgz" files are opened with that launcher by default, but that's a bit out of scope for the current conversation.<br><br>I hope that helps and is not too confusing.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 18 Mar 2021 at 18:39, Ed Hawkins <<a href="mailto:elh1964@gmail.com" target="_blank">elh1964@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thanks for the reply Charles,  I will see if I can try this.  I have VERY little programming experience, and haven't done much with batch files since the days of DOS.  I work at a Emergency 911 and want to give our dispatchers a customized version of QGIS without the editing capability, but there are 3 of us that go and collect addresses and I want to set some variables that will populate certain fields based on who is collecting or editing data(I have figured this part out already) but knowing some of the other collectors they may think it is too much trouble to select a profile  which is why I would like them to be forced to select their profile.  I would have figured this would have already been tried by someone else but I can't find anyone who has done it.<div>Thanks again,</div><div>Ed<br clear="all"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><p class="MsoNormal"><b><i><span style="font-family:"Brush Script MT";color:rgb(31,78,121)"><br></span></i></b></p><p class="MsoNormal"><b><i><span style="color:rgb(31,78,121)"><font face="comic sans ms, sans-serif">Edwin L. Hawkins
Jr.,</font></span></i></b><b><i><span style="color:rgb(31,78,121)"><font face="comic sans ms, sans-serif">AASGIS, GISP</font><font face="Freestyle Script"><span></span></font></span></i></b></p>

<p class="MsoNormal">Henderson County TN E911</p><p class="MsoNormal">GIS Administrator</p><p class="MsoNormal">Cell 731.358.7932<br></p><p class="MsoNormal"><br></p><p class="MsoNormal"><span></span></p>

<br><br></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 18, 2021 at 4:24 AM Charles Dixon-Paver <<a href="mailto:charles@kartoza.com" target="_blank">charles@kartoza.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Creating a custom shortcut/ launcher is also the only way I can think of. There was a related thread on this previously in which various possible solutions using python, bash scripts or windows batchfiles were provided, which may be useful for your needs.<div><br></div><div><a href="http://osgeo-org.1560.x6.nabble.com/Have-QGIS-prompt-for-profile-to-use-everytime-td5448226.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/Have-QGIS-prompt-for-profile-to-use-everytime-td5448226.html</a><div><br></div><div>User profiles are usually stored in the user/ appdata directory on the OS though, so you can also manage access permissions/ profiles through that depending on your environment setup.<br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 18 Mar 2021 at 03:40, Alexandre Neto <<a href="mailto:senhor.neto@gmail.com" target="_blank">senhor.neto@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Ed,</div><div><br></div><div>The only way I think of is by creating a shortcut that launches QGIS using the command line tools. Using this, you can specify which profile to use and which project:<br><br><a href="https://docs.qgis.org/3.16/en/docs/user_manual/introduction/qgis_configuration.html#command-line-and-environment-variables" target="_blank">https://docs.qgis.org/3.16/en/docs/user_manual/introduction/qgis_configuration.html#command-line-and-environment-variables</a></div><div><br></div><div>Best regards,</div><div><br></div><div>Alexandre Neto</div><div>QGIS Support<br></div><div><a href="http://www.cooperative.net" target="_blank">www.cooperative.net</a><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 17, 2021 at 10:44 PM Ed Hawkins <<a href="mailto:elh1964@gmail.com" target="_blank">elh1964@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">I have created 4 profiles a reader qith no editing capabilities and 3 editors. I want to force someone opening a project to select a user profile. Is that possible and if so how?<div dir="auto">Ed Hawkins </div><div dir="auto">Henderso County E911 </div><div dir="auto"><br></div></div>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote></div>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote></div>