# Possible to make sketch create a shortcut in windows?

**URL:** <https://discourse.processing.org/t/possible-to-make-sketch-create-a-shortcut-in-windows/41327>\
**Category:** Project Guidance\
**Created:** [March 16, 2023, 7:14pm UTC](https://discourse.processing.org/t/possible-to-make-sketch-create-a-shortcut-in-windows/41327 "2023-03-16T19:14:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aryszin](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@Aryszin](https://discourse.processing.org/u/Aryszin)\
**Post date:** [March 16, 2023, 7:14pm UTC](https://discourse.processing.org/t/possible-to-make-sketch-create-a-shortcut-in-windows/41327/1 "2023-03-16T19:14:44Z")

</div>

Is it possible to create a shortcut using the sketch (for linux too) **or**  
am i somehow able to open the compiled sketch exe (bc it doesnt start, bc it needs the files in the folder?

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [March 16, 2023, 7:38pm UTC](https://discourse.processing.org/t/possible-to-make-sketch-create-a-shortcut-in-windows/41327/2 "2023-03-16T19:38:05Z")

</div>

> [@Aryszin](#):
>
> am i somehow able to open the compiled sketch exe (bc it doesnt start, bc it needs the files in the folder?

see [How can i add a "Open with" function? - #2 by mnse](https://discourse.processing.org/t/how-can-i-add-a-open-with-function/41062/2)

ie run.bat content:

```auto
cd /D <path_to_MySketch.exe>
MySketch.exe %1

```

Hope that helps …

and then start run.bat

(it has been explained)

---

<div class="post-metadata">

**Author:** ![Aryszin](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@Aryszin](https://discourse.processing.org/u/Aryszin)\
**Post date:** [March 16, 2023, 7:42pm UTC](https://discourse.processing.org/t/possible-to-make-sketch-create-a-shortcut-in-windows/41327/3 "2023-03-16T19:42:00Z")

</div>

how do i run bat content? create a bat and paste it there? does it then also consider the files?

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [March 16, 2023, 7:52pm UTC](https://discourse.processing.org/t/possible-to-make-sketch-create-a-shortcut-in-windows/41327/4 "2023-03-16T19:52:19Z")

</div>

That’s all Win, not Linux

It’s a bit black magic.

A batch file is a txt file, just change the extension from txt to bat using rename in the local context menu.

Start by placing the bat file on your Desktop.

Paste the content in it (like working with a txt file) :

```auto
    cd /D <path_to_MySketch.exe>
    MySketch.exe %1

```

run bat by double clicking.

* * *

> [@Aryszin](#):
>
> does it then also consider the files?

from the other thread it sounds, the Sketch works then. Haven’t tried.

**Common Folder**

Win can also have a few paths that it checks automatically.

That means you can

- either enter your Sketch’s Path into Win
- OR add a folder (for example `C:\Program Files (x86)\mypath\` ) and place the batch file into it, that then open the Sketch’s folder and runs the Sketch.

**How to add a folder to Win**

1. 

```
Right-click on the Start Button.

```

2. 

```
Select “System” from the context menu.

```

3. 

```
Click “Advanced system settings”

```

4. 

```
Go to the “Advanced” tab.

```

5. 

```
Click “Environment Variables…”

```

6. 

```
Click variable called “Path” and click “Edit…”

```

7. 

```
Click “New”

```

8. 

```
Enter the path to the folder containing the binary you want on your PATH.

```

Chrisir

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [March 16, 2023, 8:28pm UTC](https://discourse.processing.org/t/possible-to-make-sketch-create-a-shortcut-in-windows/41327/5 "2023-03-16T20:28:50Z")

</div>

Another bat example

```auto
@echo off

echo Hello you

REM comment 1
REM comment 2

pause

```

see also [Can we run processing code by clicking on a icon like a desktop applications - #2 by kll](https://discourse.processing.org/t/can-we-run-processing-code-by-clicking-on-a-icon-like-a-desktop-applications/16515/2)
