revCopyFile producing virus threat in WIN 10

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jalz
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 340
Joined: Fri Sep 12, 2008 11:04 pm

revCopyFile producing virus threat in WIN 10

Post by jalz » Wed May 09, 2018 6:51 pm

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

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: revCopyFile producing virus threat in WIN 10

Post by FourthWorld » Wed May 09, 2018 6:59 pm

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

ClipArtGuy
Posts: 253
Joined: Wed Aug 19, 2015 4:29 pm

Re: revCopyFile producing virus threat in WIN 10

Post by ClipArtGuy » Wed May 09, 2018 7:02 pm

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:"

jalz
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 340
Joined: Fri Sep 12, 2008 11:04 pm

Re: revCopyFile producing virus threat in WIN 10

Post by jalz » Wed May 09, 2018 7:54 pm

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?

ClipArtGuy
Posts: 253
Joined: Wed Aug 19, 2015 4:29 pm

Re: revCopyFile producing virus threat in WIN 10

Post by ClipArtGuy » Wed May 09, 2018 8:22 pm

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.

Klaus
Posts: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: revCopyFile producing virus threat in WIN 10

Post by Klaus » Wed May 09, 2018 8:49 pm

Everything that is not pure TEXT (txt, csv etc.) needs to be copied via BINFILE of the resulting file may get corrupted.

jalz
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 340
Joined: Fri Sep 12, 2008 11:04 pm

Re: revCopyFile producing virus threat in WIN 10

Post by jalz » Wed May 09, 2018 9:32 pm

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.

ClipArtGuy
Posts: 253
Joined: Wed Aug 19, 2015 4:29 pm

Re: revCopyFile producing virus threat in WIN 10

Post by ClipArtGuy » Wed May 09, 2018 10:49 pm

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.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: revCopyFile producing virus threat in WIN 10

Post by FourthWorld » Wed May 09, 2018 11:04 pm

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/
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply

Return to “Windows”