Page 1 of 1

revCopyFile producing virus threat in WIN 10

Posted: Wed May 09, 2018 6:51 pm
by jalz
Hey Guys,

I'm using the revCopyFile command to copy over a sqlite database in a backup folder on my local drive to a specific folder in the documents folder. Everytime I run my script, I get a Windows Security Alert pop up, unauthorised changes blocked.... cmd.exe from making changes to my destination folder. I've added my Livecode application in the Windows Defender Security Centre but its to no avail.

I take it the LIvecode environment uses the windows cmd to run commands such as moving files etc?

Anyone give me hints on how I can get this feature to work on a Windows 10 machine?

Best wishes
Jalz

Re: revCopyFile producing virus threat in WIN 10

Posted: Wed May 09, 2018 6:59 pm
by FourthWorld
If you have a script which is the simplest example needed to provoke that warning I'll be happy to try it here and see what can be done about it.

Re: revCopyFile producing virus threat in WIN 10

Posted: Wed May 09, 2018 7:02 pm
by ClipArtGuy
Can you use URLs to do this?

Code: Select all

get URL ("file:"& ThePathToFileToBeCopied)
put it into URL("file:" & specialfolderpath("documents") & WhereverYouWantItCopiedTo)
You might need to use "binfile:" instead of "file:"

Re: revCopyFile producing virus threat in WIN 10

Posted: Wed May 09, 2018 7:54 pm
by jalz
Hi Richard

Here is some simple code that produces the threat

Code: Select all


global gConnID

on mouseUp
   put specialFolderPath("documents") & slash & "app" & slash & "Newfile.sqlite" into tFileDest
   put "C:/myProject/backup/MyBackup20180503.sqlite" into tFileSrc
   revCopyFile tFileSrc,tFileDest
end mouseUp
ClipArtGuy,
I'll try using the URL method to do this, pity as the the revCopyFile method seems to work on Mac OK when testing. Just wondering what other commands may also trigger of an alert?

Re: revCopyFile producing virus threat in WIN 10

Posted: Wed May 09, 2018 8:22 pm
by ClipArtGuy
jalz wrote:
Wed May 09, 2018 7:54 pm
Just wondering what other commands may also trigger of an alert?
It could be the UAC or smartscreen in Win 10. I turned all of that off on my Windows machine.

I think you can replace your sample revcopy handler with this one liner:

Code: Select all

put URL ("file:"&specialFolderPath("documents")&"/app/Newfile.sqlite")into URL ("file:C:/myProject/backup/MyBackup20180503.sqlite")

Again, it's possible you may need to use "Binfile" instead of "file", I'm not too familiar with sqlite files.

Re: revCopyFile producing virus threat in WIN 10

Posted: Wed May 09, 2018 8:49 pm
by Klaus
Everything that is not pure TEXT (txt, csv etc.) needs to be copied via BINFILE of the resulting file may get corrupted.

Re: revCopyFile producing virus threat in WIN 10

Posted: Wed May 09, 2018 9:32 pm
by jalz
Thanks all,

I've used the URL binfile method and Windows doesn't produce the security alert. Now I need to test the rest of the application.

Re: revCopyFile producing virus threat in WIN 10

Posted: Wed May 09, 2018 10:49 pm
by ClipArtGuy
You should probably also check "the result" afterwards. If everything went smoothly, it will be empty. If not, It might give a clue as to what happened.

Re: revCopyFile producing virus threat in WIN 10

Posted: Wed May 09, 2018 11:04 pm
by FourthWorld
If revCopyFile is triggering a system warning they'll want to update that. It would be very helpful if you could submit a bug report:
https://quality.livecode.com/