touchcursor icon indicating copy to clipboard operation
touchcursor copied to clipboard

Run from USB-Stick / portable version?

Open rpnfan opened this issue 2 years ago • 6 comments

I found the configuration file is created in a Windows roaming folder. Is there an option to tell touch cursor to use the file from the installation folder to run it as a portable program? Would be sometimes very convenient to be able to do this. :-)

rpnfan avatar Dec 30 '22 19:12 rpnfan

This should already work when run from a removable drive. Have you tried it? (Here's the code that does it.)

martin-stone avatar Dec 30 '22 19:12 martin-stone

Thanks Martin, I wrote "run from USB-stick", but meant that more as an example of a portable program, which uses the config files from the installation folder.

For example on my work laptop I can not use a USB-stick (USB-ports are deactivated for storage devices), but I can copy a portable program into a folder on the hard drive and run it from there generally. This does not work although with touch-cursor. I tried that and copied the settings file to the installation folder of touch-cursor before starting it, but the program ignores that file and creates a new one with the default values in the roaming folder. :-(

Similar when I am on the go and must use another computer. I might be able to download a portable version from touch-cursor and run it, but will not have a USB-stick with me often - even if it can be used technically.

rpnfan avatar Dec 30 '22 20:12 rpnfan

That makes sense. It shouldn't be hard to add -- Just needs an extra condition in the code I linked. I'm not sure what condition would be best to trigger portable behaviour. ".exe is not in program files" might be suficient. Alternatively "config folder not found in roaming folder" (and have the installer create the default config folder instead of the options loader).

I don't get a lot of time for maintaining this code (I don't even have a suitable dev environment for compiling it right now) so a PR would be welcome if you're able.

martin-stone avatar Dec 31 '22 11:12 martin-stone

Thanks Martin, I understand. Unfortunately I do not program in C/C++/C# and do not have the option to add that myself. Maybe someone who reads this message and also finds it worthwhile can do that, like the 64-Bit compiled version, which AFAIK is not available directly, when one wants to download the program, just is linked in one of the comments here.

Would be great if that can be added to the official download. I might also provide a link to the 64-bit copy on my keyboard blog, where I will mention your program in one of the following articles.

rpnfan avatar Dec 31 '22 12:12 rpnfan

After trying to update the project to compile with latest tools (and despairing), I discovered https://github.com/donniebreve/touchcursor-win, which may do what you want. I'm running it now, and it seems to work well. The installer puts the exe and config in Program Files (x86), but it looks like it you can just copy the exe and config to wherever you like and run it there.

To be honest, if I were to write TouchCursor now, I'd probably go for a similar lightweight program like this, with no GUI, and no compile dependencies.

martin-stone avatar Jan 01 '23 15:01 martin-stone

Thanks Martin for your efforts and for the pointer. For me the alternative program does not run, because of two missing dlls which are not on a system normally. I found that the program was compiled as a debug version and would instead need to be compiled as a release version. There is even an open ticket for that. I asked there for an update :-) EDIT: got it working by finding a copy of the dlls, but miss some functions (combo keys do not seem possible)... :-(

rpnfan avatar Jan 01 '23 21:01 rpnfan