Upload files to any Snapmaker with right-click menu - Windows 11 guide + Alternatives

A way to add sm2uploader to the context menu of Windows 11. Beauty of this method is in using the native Windows 11 interface and ability to add multiple machines into the menu with simple interface.

Supported every Snapmaker machine.

image
image

We will be installing sm2uploader in a way that allows Windows to access it using Environment Variable - “PATH”. A good analogy to explain this will be a desktop link to an app. When instead of spending time to find something in the “Start Menu”, you can create a link to the app on your desktop and start it in the shortest way possible. “Path” will tell Windows where to find sm2uploader, in a fastest way possible. You can read more about “PATH” in this article.
To change system variables you will need Admin rights on your machine. If you are in the environment where you don’t have the admin rights - ask your IT team to follow this guide along.
As a quick and dirty route, after installing sm2uploader, you can skip directly to the last step of adding the sm2uploader to the context menu. I didn’t check this, but seems like no admin rights needed.

Install sm2uploader

  1. Download the sm2uploader from the GitHub repository. Credit to @macdylan .
  2. Unpack sm2uploader in a folder. I named my folder _In_The_Path so I can remember what is it about in the future. I have quite a few portable apps in this folder.
  3. Pasted image 20230926091756

Add your printer to sm2uploader config

You can run the sm2uploader at this point to automatically find your machine/s. If it worked for you, skip next step of manual editing the hosts.yaml file.
This step is optional for those who just want to use it via context menu, if you are like me and running sm2uploader as octoprint emulator for uploading gcode directly from slicers (like PrusaSlicer) - this step is mandatory.

  1. In my case, sm2uploader wasn’t able to autodiscover printers, due to network setup. I had to add Firewall rules to explicitly allow sm2uploader to communicate and edit the hosts.aml file myself.
    1. For this you need the Token. You can get it from your Luban configuration files (assuming you have luban connected to the printer via WiFi).
    2. Paste following path to Explorer address bar and hit Enter.
      1. %appdata%\snapmaker-luban\machine.json

      2. Open file with Notepad or your favorite text editor (not MS Word).

      3. Find your printer in the file, like in the screenshot below

      4. Use this data to fill out the hosts.yaml file - sm2uploader created an empty file when it couldn’t find any printers.

      5. Pay attention to the ID string (right under IP address) - this is how sm2uploader will address your printer by name.

      6. This is an example for Snapmaker 2.0. I don’t have Artisan, not sure how this looks like for Artisan.

      7. I’m attaching my file for template to use - hosts.yaml.zip (254 Bytes)

Adding sm2uploader to the Path - optional

There is a long way to open next window and a short way. For the short way press “Win+R” on your keyboard to open “Run” window. Paste C:\Windows\System32\SystemPropertiesAdvanced.exe
And hit Enter. It will ask for admin credentials if necessary and open the following window.
Pasted image 20230926095013

Follow the screenshot below to add sm2uploader to the “Path” variable.

At this point restarting you computer will ensure the changes are recognized by Windows. On to the next step.

Add sm2uploader to the Main right-click menu of Windows 11

This is a bit tricky since in Windows 11 the context menu is a different animal. We have to use a third party app for this. It is free (unlimited infinite trial period), but to support the developer I purchased it for $0.99 in Microsoft Store.
Install the “Custom Context Menu” form the Microsoft Store. It is an opensource app, you can find it at the Github here.

Real life example below

There is a lazy way to fill out all the fields - copy my config and adopt it to your liking. For this, in the Custom Context Menu app, click “Open menus folder” button and copy file attached to this guide in the folder. Then hit update and new item will appear in the list. Don’t forget to adopt it to your needs. sm2uploader.json.zip (343 Bytes)

Success

Now you need to restart explorer for the changes to take effect. You can do this via Task Manager like in this guide, or simply reboot the computer. Task manager is way faster.

If everything done right, and there are no typos, you will see new menu item.
2023-09-26 12_59_54-Greenshot

And when you click it - sm2uploader will upload the file.

If you only see sm2uploader window blink - something is wrong, check for typos in the settings. Create menu item with file instead of typing everything in.

Alternatives

If you are on windows 10 and below - there are no issues with right-click menu (new vs old). You can use a few ways to achive it:

  1. @brent113 made a cool little tool to use direct API to upload files - File Transfer via WiFi - #13 by brent113
  2. You can create a bat file with following string in it
    sm2uploader.exe -fix=0 -host IP_ADDRESS_OF_YOUR_MACHINE "%~1"
    replace the IP_ADDRESS, save the file, put it in the same folder with sm2uploader. Simply drag&drop files on this bat file and it will be uploaded to the snapmaker.
  3. I’ve adopted the kit created by @brent113 for use with sm2uploader on windows 10 and below. It also works on windows 11 but you have to click “Show More Options” to reach new menu item. Here is the archive for this option - BAT files to use with sm2uploader for win10 and below.zip (1.5 KB)
5 Likes

In windows File Manager, type “shell:sendto” in the address bar, then drag “Send to Snapmaker.bat” into that folder, and you’ll get this:

Send to Snapmaker.bat (replace that path to yours)

@COLOR 0A
@d:\sm2uploader\sm2uploader-win64.exe -host YOUR_PRINTER_NAME_OR_IP %*
@PAUSE
3 Likes

*NOTE: This is provided AS-IS. I am not responsible for any damages incurred by editing your registry.

You can create registry entries to add this context menu item in Windows 10 (and probably back as far as at least 7 but I don’t have earlier machines handy). Here is an example batch file (you will have to run as administrator): You will have to change the “YOUR PATH HERE” and “YOURHOST” respectively

@ECHO OFF

ECHO Creating Context Menu Registry Keys
REG ADD HKCR\SystemFileAssociations.gcode\shell\snapmaker /d “Send to SM2” /f > NUL
REG ADD HKCR\SystemFileAssociations.gcode\shell\snapmaker\command /d “"C:\YOUR PATH HERE\sm2uploader-win64.exe" -host YOURHOST "%%1"”
REG ADD HKCR\SystemFileAssociations.nc\shell\snapmaker /d “Send to SM2” /f > NUL
REG ADD HKCR\SystemFileAssociations.nc\shell\snapmaker\command /d “"C:\YOUR PATH HERE\sm2uploader-win64.exe" -host YOURHOST "%%1"”
REG ADD HKCR\SystemFileAssociations.cnc\shell\snapmaker /d “Send to SM2” /f > NUL
REG ADD HKCR\SystemFileAssociations.cnc\shell\snapmaker\command /d “"C:\YOUR PATH HERE\sm2uploader-win64.exe" -host YOURHOST "%%1"”

ECHO.
ECHO Completed…

PAUSE

And consequently to remove them:

@ECHO OFF

ECHO Removing Registry Keys
REG DELETE HKCR\SystemFileAssociations.gcode\shell\snapmaker /f
REG DELETE HKCR\SystemFileAssociations.nc\shell\snapmaker /f
REG DELETE HKCR\SystemFileAssociations.cnc\shell\snapmaker /f

ECHO.
ECHO Context Menu Removed
PAUSE

1 Like

That is exactly what option 3 is doing in the alternative section…

Interesting … Its nice to see some new options for controll comming up … Does somebody know if its possible to get also some kind of FTP or so possibility to manage Snapmakers internal storage from PC? As Im always sending files directly to Snapmaker (as connection stability is almost nonexistant for printing from PC) Im starting to feel I should clear lot of those one-time-print files from it from time to time to not accumulate too much but doing that from that touch screen interface would be pain considering it will be probably 100s of files.

This has been in my all time favorite future requests for a while.
If you could submit a ticket for it - Support Ticket Form it would help a lot.
The more voices we have on this the greater chance we have for implementing this.

I did mentioned some usefull stuff to have including this one while I was resolving some issue with snapmaker support few months back. I dont feel opening support ticket just for feature request is right way and did kinda lost hope SM will ever do something even marginably major with their software except ocassional bug fixes or support of new modules they have money from sadly so my question was more to the community I suppose … but who knows there is still hope I guess :slight_smile:

1 Like

I hear you, but there is no other way to do this :slight_smile: I’m not the kind to whine and cause the drama on social networks. It’s this for me or vote with my wallet…
Besides, there is a post somewhere here, from Riskey, snapmaker staff member, where he says it’s the best way, it even takes priority over GitHub issues.

1 Like

@Colin-LightBurn, hope you are still hanging around. Is there any way to do this inside of the LightBurn?
Seems like right now it’s only possible through USB cable (serial) or LightBurn Bridge (wifi) but the lightburn bridge is a separate device.

LightBurn has some UDP commands, which you may be able to hack together for this functionality.

They were made for the (very old/depreciated) Coreldraw plugin, so what you see is what you get for the most part. It’s not a general interface, never should be, and probably can’t be, due to the limitations of UDP. We have a LightBurn API on the future feature hit list which may be worth waiting for. Hope that helps!

1 Like

@Colin-LightBurn, thanks for fast reply!
I went over the topic you linked, the example of the Python commands that can be used and the SendUDP tool.
From what I understand, these has to be run outside of the Lightburn. Meaning that if I want to send something to machine, the workflow would be Save Lightburn Project > Start "SendUDP.exe project.lbrn2"(outside of Lightburn)
Current workflow Save g-code to a file from Lightburn > start sm2uploader to send file"
If I understand it right - there is no improvement in the workflow, two steps = two steps.

I’ve searched the lightburn forum with “script” key word, didn’t come up with any good results. Looks like there are only two ways available for Lightburn to communicate - serial/usb or lightburn bridge.
There is no way to add third option - run executable that would take care of communication?
I guess the workflow within lightburn will have to be changed for this, in order to do pass exported g-code in the background.

I am struggling to get this woking on MacOS. Is there a guide for that somewhere? I’m no coder.
When I tried setting it up from Automator get a terminal window saying:
zsh: no such file or directory: /Volumes/X
I got the file path by draging sm2uploader-darwin-arm64 into terminal and pasting what it gave me.

I tried setting it up through Shortcuts and got the error:
Expected “"” but found unknown token.

any help would be really appreciated, wanted this feature for a while.

Also would love to have it integrated into PrusaSlicer but that seems like a lot more work.

It’s not very clear what is it you can’t do. Would be helpful if you could provide information. Maybe a screenshot.

Setting up sm2uploader with prusa slicer is easy. You just need to make it executable by

chmod +x sm2uploader

Start it.
And then create a printer in Prusa
image

2 Likes

Alright I got it working with PrusaSlicer on MacOS. I didn’t want to waste your time with a lot of questions (especially when I didn’t know what I needed to ask to get it working) but I thought I’d share what I did to help those with my (low) knowledge level of terminal commands. My issue was getting the Octoprint server running. I could run sm2uploader but only got

2024/03/06 12:45:39 Discovering …
2024/03/06 12:45:43 Printer IP: 192.168.0.216
2024/03/06 12:45:43 Printer Model: Snapmaker 2 Model A350
2024/03/06 12:45:43 No input files

my effort to make it executable by running

chmod +x sm2uploader

returned nothing even when in the right directory

Clearly I was not doing these things correctly. But after some reading & guessing what did work for me is just dragging the file into terminal and typing

-octoprint :8844

to the end of that file path. Bingo!

2024/03/06 12:47:03 Discovering …
2024/03/06 12:47:07 Printer IP: 192.168.0.216
2024/03/06 12:47:07 Printer Model: Snapmaker 2 Model A350
2024/03/06 12:47:07 Starting OctoPrint server on :8844 …
2024/03/06 12:47:07 Server started, now you can upload files to http://[::]:8844

This was the easy way for me without terminal knowledge. Hope it helps others out there. Thank you @nweolu for your help and @macdylan for the wonderful files to get this working!

Is there any way to get the printer to not require the “Wi-Fi Connection Request” screen? To remember it? Also I’m assuming this needs to be run and terminal kept open whenever used, correct?
Thanks!!

2 Likes

I applaud your effort!
you are correct about keeping the terminal open with server running.
As for the authorization, you can grab the token from your Luban data folder, as described in the first post (correct for macos path to Luban) and save it in config file, where you have the sm2uploader.

There is a bit of a learning curve to the terminal commands. I’d probably be bale to tell exactly what went wrong here with few screenshots. But you already made it work.

2 Likes

I just got it working on macOS using Automator. Create a new Quick Action with the settings in the attached screenshot. Substitute the path where you stored the application and the IP address of your Artisan; if there are spaces in the application file path, make sure you enclose it in double-quotes. I haven’t figured out how to get auto discovery to work. Once you save the workflow, you can access it using the Quick Actions menu when you right-click on the file(s) in the Finder.

1 Like