# How to modify mainwindow in startup without using .slicerrc.py file

**URL:** <https://discourse.slicer.org/t/how-to-modify-mainwindow-in-startup-without-using-slicerrc-py-file/21278>\
**Category:** Development\
**Created:** [December 30, 2021, 1:58pm UTC](https://discourse.slicer.org/t/how-to-modify-mainwindow-in-startup-without-using-slicerrc-py-file/21278 "2021-12-30T13:58:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dwij\_Mistry](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/dwij_mistry/32/15265_2.png) [@Dwij\_Mistry](https://discourse.slicer.org/u/Dwij_Mistry)\
**Post date:** [December 30, 2021, 1:58pm UTC](https://discourse.slicer.org/t/how-to-modify-mainwindow-in-startup-without-using-slicerrc-py-file/21278/1 "2021-12-30T13:58:45Z")

</div>

We are having [script repository](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html) in Slicer which we have to keep in executable folder. (So while loading it will do the changes)

But I dont want to use rc file.  
Is there any method to call .py file in startup in the EXE. (Hard coded)

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [December 30, 2021, 2:04pm UTC](https://discourse.slicer.org/t/how-to-modify-mainwindow-in-startup-without-using-slicerrc-py-file/21278/2 "2021-12-30T14:04:54Z")

</div>

You could manually edit the `NameOfYouAppLauncherSettings.ini` file and append `--python-script script.py`

---

<div class="post-metadata">

**Author:** ![Dwij\_Mistry](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/dwij_mistry/32/15265_2.png) [@Dwij\_Mistry](https://discourse.slicer.org/u/Dwij_Mistry)\
**Post date:** [December 30, 2021, 2:33pm UTC](https://discourse.slicer.org/t/how-to-modify-mainwindow-in-startup-without-using-slicerrc-py-file/21278/3 "2021-12-30T14:33:25Z")

</div>

```auto
viewNode = slicer.app.layoutManager().threeDWidget(0).mrmlViewNode()
viewNode.SetBackgroundColor(0,0,0)
viewNode.SetBackgroundColor2(0,0,0)
viewNode.SetBoxVisible(0)
viewNode.SetAxisLabelsVisible(0)

```

Is there any way to directly use those functions?
