# Portable installation for Windows (core ST)

**URL:** https://forum.syncthing.net/t/portable-installation-for-windows-core-st/8830
**Category:** Feature
**Created:** [December 19, 2016, 9:06am UTC](https://forum.syncthing.net/t/portable-installation-for-windows-core-st/8830 "2016-12-19T09:06:17Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![cosas](https://forum.syncthing.net/user_avatar/forum.syncthing.net/cosas/32/14159_2.png) [@cosas](https://forum.syncthing.net/u/cosas)
#### Post date: [December 19, 2016, 9:06am UTC](https://forum.syncthing.net/t/portable-installation-for-windows-core-st/8830/1 "2016-12-19T09:06:18Z")

</div>

Only Linux user, I wandered how I could convince my friends to give a try to syncthing. Strangely, even after several months of harrasment and punctilious hard work on translation with transifex for French I didn’t get any success, although it is well known that most Win users are kind of “Install-first-think-after”… Maybe this is thanks to my warnings… or because of my complicated/crappy advices ☹Whatever, I don’t throw in the towel, and for the end of year gifts I will offer them a portable USB stick with ST 🙂Here is the job: _ **Stick layout** _: \Program\32bits \Program\64bits \Shares _ **Files** _: **\autorun.inf** : [autorun] open=Program\syncthing.bat label=Start syncthing icon=syncthing.ico #optionnal line. Remove if you don’t want/care with stick icon

[Content] MusicFiles=false PictureFiles=false VideoFiles=false

[MesCouilles] AutoRunIsRemovedFromWindows7+=true (du cul)

**\StartManu.bat** : @echo OFF echo. echo \*\*\*\*\*\* INFO 1 \*\*\*\*\*\* echo To cancel now, hit Ctrl+C echo. echo. echo. echo. echo. echo \*\*\*\*\*\* INFO 2 \*\*\*\*\*\* echo Once I run, you should stop syncthing if you want to eject the USB stick: echo. echo by clicking “Action-\>Shutdown” in the management web page. echo. echo. echo. echo. echo. PAUSE call .\Program\syncthing.bat

**/If You Redistribute.txt:** IMPORTANT!!! Keep this file if you redistribute. Subfolder x:\Program\Syncthing MUST NOT EXIST. It will be created/populated on first run. It contains user’s secret key.

**\Program\syncthing.bat** : @echo off %~d0 IF %~d0==C: GOTO WARN IF %~d0==D: GOTO WARN cd “%~dp0” IF %ERRORLEVEL%==0 GOTO PATH\_IS\_OK exit :PATH\_IS\_OK set STNODEFAULTFOLDER=1 IF NOT %PROCESSOR\_ARCHITECTURE% == x86 GOTO ST64 ELSE ( start “syncthing” /B /LOW .\32bits\syncthing.exe --no-console --home="%~dp0\Syncthing" exit ) :ST64 start “syncthing” /B /LOW .\64bits\syncthing.exe --no-console --home="%~dp0\Syncthing" exit :WARN echo. echo. echo \*\*\* This is no more INFO, this is a problem \*\*\* echo It seems you launched me from your HDD, but I am a launcher for a portable setup. echo Hit a key to kill me. Whatever, I won’t do anything else. echo Bye bye PAUSE exit

**\Program\syncthing.ico** : unsheathe your GIMP # optionnal

**\Program\32bits\syncthing.exe** : 32 bits **\Program\64bits\syncthing.exe** : 64 bits

---

<div class="post-metadata">

### Author: ![canton7](https://forum.syncthing.net/user_avatar/forum.syncthing.net/canton7/32/9528_2.png) [@canton7](https://forum.syncthing.net/u/canton7)
#### Post date: [December 19, 2016, 9:28am UTC](https://forum.syncthing.net/t/portable-installation-for-windows-core-st/8830/2 "2016-12-19T09:28:59Z")

</div>

SyncTrayzor has a portable installation 😃

If you want to go ahead and do things manually, a couple of criticisms:

1. ~~Just ship 32-bit: it runs fine on x64~~
2. Don’t redefine APPDATA - use the `-home` flag to Syncthing

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [December 19, 2016, 9:33am UTC](https://forum.syncthing.net/t/portable-installation-for-windows-core-st/8830/3 "2016-12-19T09:33:57Z")

</div>

> [@canton7](#):
>
> Just ship 32-bit: it runs fine on x64

The 32 bit version is prone to crashing on larger setups and I’d generally avoid it unless absolutely necessary, so I disagree a little with this. To get started however, it may be easier.

> [@canton7](#):
>
> Don’t redefine APPDATA

And, if I understand the above correctly, definitely do not stick the secret key files in C:\Program Files or so.

---

<div class="post-metadata">

### Author: ![cosas](https://forum.syncthing.net/user_avatar/forum.syncthing.net/cosas/32/14159_2.png) [@cosas](https://forum.syncthing.net/u/cosas)
#### Post date: [December 26, 2016, 5:57pm UTC](https://forum.syncthing.net/t/portable-installation-for-windows-core-st/8830/4 "2016-12-26T17:57:35Z")

</div>

> [@canton7](#):
>
> Don’t redefine APPDATA - use the -home flag to Syncthing

Well, I checked the new APPDATA is for the currently running bash only. I wouldn’t like to break anything changing the global user variable.@calmh, on first run a folder Syncthing is created in the stick in Program folder, beside 32bits/64bits folder. I didn’t use -home because I didn’t understand how it works. Now, just trying --home it’s all fine. I added a check to exit if the batch is ran from c: or d: : I don’t know why (maybe I double-clicked a copy of the batch I had in my hard-drive and I didn’t remove in it the APPDATA redefinition, I got a system crash from my firewall driver.sys - this sometimes happens when burst prompts occur on my poorly responsive XP machine - on reboot I ended in a %users%\TEMP profile ☹ - I got rid of this closing the session, switching to admin, have a look in HKLM\winnt…\ProfileList\ where I saw my own entry with a .bak suffix =\> renamed, close admin session, log in as Me OK ☀ )
