<div dir="ltr">You will have to running the latest dev version of QGIS for this to work as --configpath is broken in 1.8. <div><br></div><div>This is what you should do:</div><div><br></div><div><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">start "Quantum GIS" /B "%OSGEO4W_ROOT%"\apps\qgis\</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">bin\qgis-dev.exe </span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">--customizationfile </span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">"%cd%\QUANTU~1\Esm.ini"</span></div>

<div><br></div><div style>If you call the batch file rather then the exe it will set everything up for you</div><div style><br></div><div style><span style="font-size:13px;color:rgb(0,0,0);font-family:arial,sans-serif">"%OSGEO4W_ROOT%"\apps\qgis\</span><span style="font-size:13px;color:rgb(0,0,0);font-family:arial,sans-serif">bin\qgis-dev.bat</span><span style="font-size:13px;color:rgb(0,0,0);font-family:arial,sans-serif">--customizationfile </span><span style="font-size:13px;color:rgb(0,0,0);font-family:arial,sans-serif">"%cd%\QUANTU~1\Esm.ini"</span></div>

<div style><span style="font-size:13px;color:rgb(0,0,0);font-family:arial,sans-serif"><br></span></div><div style><span style="font-size:13px;color:rgb(0,0,0);font-family:arial,sans-serif">the --configpath and --optionpath args just take a folder, there is no convention.  I am using app in my example just to keep it simple but it can be anything.</span></div>

<div style><span style="font-size:13px;color:rgb(0,0,0);font-family:arial,sans-serif"><br></span></div><div style><span style="font-size:13px;color:rgb(0,0,0);font-family:arial,sans-serif">- Nathan</span></div><div><br></div>

<div><div class="gmail_extra"><div class="gmail_quote">On Fri, May 3, 2013 at 11:52 PM, db-esm <span dir="ltr"><<a href="mailto:david@esmarkets.com" target="_blank">david@esmarkets.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

This is from a .bat file:<br>
<br>
start "Quantum GIS" /B "%OSGEO4W_ROOT%"\apps\qgis\bin\qgis.exe --configpath<br>
"%cd%\QUANTU~1\Esm.ini"<br>
<br>
I notice in the example you mentioned that you are not using a file name<br>
with --configpath, you're using only a path.<br>
Is there a specific file name that must be used?<br>
<br>
Thanks for the help.<br>
<br>
David<br>
<br>
<br>
<br>
Nathan Woodrow wrote<br>
<div class="im">> David,<br>
><br>
> Can you paste the command line call you are using.<br>
><br>
> --configpath does work, I use it one of my projects here<br>
> <a href="https://github.com/NathanW2/qmap/blob/master/src/loader_src/qmap.bat" target="_blank">https://github.com/NathanW2/qmap/blob/master/src/loader_src/qmap.bat</a><br>
><br>
> - Nathan<br>
><br>
><br>
</div>> On Fri, May 3, 2013 at 11:15 PM, db-esm &lt;<br>
<br>
> david@<br>
<div><div class="h5"><br>
> &gt; wrote:<br>
><br>
>> When I try to use "code" or "customizationfile" as a command line option,<br>
>> I<br>
>> get an error message like:<br>
>> "The layer C:\Users\Public\ThumbImage\--code is not a valid layer and<br>
>> cant<br>
>> not be added to the map"<br>
>><br>
>> The "--configpath" option doesn't result in an error message, but has no<br>
>> effect: the UI settings are still read from (and written to) the Windows<br>
>> registry.<br>
>><br>
>> Perhaps on Windows, QSettings always uses the registry now?<br>
>><br>
>> David<br>
>><br>
>><br>
>><br>
>> Nathan Woodrow wrote<br>
>> > Yes it works on all platforms.<br>
>> ><br>
>> > - Nathan<br>
>> ><br>
>> ><br>
>> > On Thu, May 2, 2013 at 11:31 PM, db-esm &lt;<br>
>><br>
>> > david@<br>
>><br>
>> > &gt; wrote:<br>
>> ><br>
>> >> Does this work on Windows?<br>
>> >><br>
>> >> Sorry, I should have mentioned from the beginning that we're on<br>
>> Windows.<br>
>> >><br>
>> >> David<br>
>> >><br>
>> >><br>
>> >><br>
>> >> Nathan Woodrow wrote<br>
>> >> > If you save the ini file out and edit it by hand.  It's just a bunch<br>
>> of<br>
>> >> > true and false switches.  You can can then load QGIS using the<br>
>> >> > --customizationfile your.ini option and it will change the UI on<br>
>> load<br>
>> >> ><br>
>> >> > QGIS can also take a --code yourpythonfile.py that will run after<br>
>> the<br>
>> >> > project is loaded.<br>
>> >> ><br>
>> >> > - Nathan<br>
>> >> ><br>
>> >> ><br>
>> >> > On Thu, May 2, 2013 at 5:22 PM, Marco Bernasocchi<br>
>> >> > &lt;<br>
>> >><br>
>> >> > marco@<br>
>> >><br>
>> >> > &gt;wrote:<br>
>> >> ><br>
>> >> >> On 05/01/2013 08:19 PM, db-esm wrote:<br>
>> >> >><br>
>> >> >>> Yes, but we need to have this happen automatically without users<br>
>> >> having<br>
>> >> >>> to do<br>
>> >> >>> it manually.<br>
>> >> >>><br>
>> >> >>>  IIRC you can deploy a customization.ini file, it will be read at<br>
>> >> >>> startup<br>
>> >> >><br>
>> >> >> ciao<br>
>> >> >><br>
>> >> >><br>
>> >> >>><br>
>> >> >>> --<br>
>> >> >>> View this message in context: <a href="http://osgeo-org.1560.x6." target="_blank">http://osgeo-org.1560.x6.</a>**<br>
>> >> >>><br>
>> >><br>
>> <a href="http://nabble.com/How-to-modify-QGIS-**UI-at-start-tp5050659p5050686.**html&lt;http://osgeo-org.1560.x6.nabble.com/How-to-modify-QGIS-UI-at-start-tp5050659p5050686.html&gt" target="_blank">nabble.com/How-to-modify-QGIS-**UI-at-start-tp5050659p5050686.**html&lt;http://osgeo-org.1560.x6.nabble.com/How-to-modify-QGIS-UI-at-start-tp5050659p5050686.html&gt</a><br>


>> >> ;<br>
>> >> >>> Sent from the Quantum GIS - Developer mailing list archive at<br>
>> >> >>> Nabble.com.<br>
>> >> >>> ______________________________**_________________<br>
>> >> >>> Qgis-developer mailing list<br>
>> >> >>><br>
>> >><br>
>> >> > Qgis-developer@.osgeo<br>
>> >><br>
>> >> >>><br>
>> >><br>
>> <a href="http://lists.osgeo.org/**mailman/listinfo/qgis-**developer&lt;http://lists.osgeo.org/mailman/listinfo/qgis-developer&gt" target="_blank">http://lists.osgeo.org/**mailman/listinfo/qgis-**developer&lt;http://lists.osgeo.org/mailman/listinfo/qgis-developer&gt</a><br>


>> >> ;<br>
>> >> >>><br>
>> >> >>><br>
>> >> >><br>
>> >> >> --<br>
>> >> >> Marco Bernasocchi<br>
>> >> >> <a href="http://opengis.ch" target="_blank">http://opengis.ch</a><br>
>> >> >><br>
>> >> >> ______________________________**_________________<br>
>> >> >> Qgis-developer mailing list<br>
>> >> >><br>
>> >><br>
>> >> > Qgis-developer@.osgeo<br>
>> >><br>
>> >> >><br>
>> >><br>
>> <a href="http://lists.osgeo.org/**mailman/listinfo/qgis-**developer&lt;http://lists.osgeo.org/mailman/listinfo/qgis-developer&gt" target="_blank">http://lists.osgeo.org/**mailman/listinfo/qgis-**developer&lt;http://lists.osgeo.org/mailman/listinfo/qgis-developer&gt</a><br>


>> >> ;<br>
>> >> >><br>
>> >> ><br>
>> >> > _______________________________________________<br>
>> >> > Qgis-developer mailing list<br>
>> >><br>
>> >> > Qgis-developer@.osgeo<br>
>> >><br>
>> >> > <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
>> >><br>
>> >><br>
>> >><br>
>> >><br>
>> >><br>
>> >> --<br>
>> >> View this message in context:<br>
>> >><br>
>> <a href="http://osgeo-org.1560.x6.nabble.com/How-to-modify-QGIS-UI-at-start-tp5050659p5050959.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/How-to-modify-QGIS-UI-at-start-tp5050659p5050959.html</a><br>


>> >> Sent from the Quantum GIS - Developer mailing list archive at<br>
>> Nabble.com.<br>
>> >> _______________________________________________<br>
>> >> Qgis-developer mailing list<br>
>> >><br>
>><br>
>> > Qgis-developer@.osgeo<br>
>><br>
>> >> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
>> >><br>
>> ><br>
>> > _______________________________________________<br>
>> > Qgis-developer mailing list<br>
>><br>
>> > Qgis-developer@.osgeo<br>
>><br>
>> > <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> --<br>
>> View this message in context:<br>
>> <a href="http://osgeo-org.1560.x6.nabble.com/How-to-modify-QGIS-UI-at-start-tp5050659p5051179.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/How-to-modify-QGIS-UI-at-start-tp5050659p5051179.html</a><br>


>> Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.<br>
>> _______________________________________________<br>
>> Qgis-developer mailing list<br>
>><br>
<br>
> Qgis-developer@.osgeo<br>
<br>
>> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
>><br>
><br>
> _______________________________________________<br>
> Qgis-developer mailing list<br>
<br>
> Qgis-developer@.osgeo<br>
<br>
> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
<br>
<br>
<br>
<br>
<br>
--<br>
</div></div>View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/How-to-modify-QGIS-UI-at-start-tp5050659p5051188.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/How-to-modify-QGIS-UI-at-start-tp5050659p5051188.html</a><br>


<div class=""><div class="h5">Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</div></div></blockquote></div><br></div></div></div>