Closed internationalTD closed 1 year ago
if exist <file> <command>
. Perhaps drop the ampersand.
> touch file.ext
[ R:\ ]
> if exist file.ext (echo exist) else (echo dont)
exist
Just noticed this is mridgers
repo issue tracker. You might while here to install the up-to-date and maintained fork located here: https://github.com/chrisant996/clink/
I am actually using that version, I should have double checked where I was. Sorry for wasting your time!
If some programs add if
commands in the AutoRun string, then they're going to cause problems with other things that also want to use AutoRun.
Clink can't realistically prevent those kinds of problems.
Just noticed that OP has indeed a valid IF EXIST
statement, my bad.
I installed miniconda and downloaded clink afterwards.
because of that, clink had the autorun registry value as
native : if exist "C:\Users\-SNIP-\AppData\Local\Temp\_MEI62242\condabin\conda_hook.bat" "C:\Users\-SNIP-\AppData\Local\Temp\_MEI62242\condabin\conda_hook.bat" & "C:\Program Files (x86)\clink\clink.bat" inject --autorun
the
if exists
stopped clink from injecting. I needed to swap the two statements around the & to get it working.(sidenote, the set command didn't work for me, something about unknown option -u, so i set it using regedit.exe, at
HKEY_CURRENT_USER\Software\Microsoft\Command Processor