CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 20

Thread: VB5 program acquires virus when uploaded to Web

  1. #1
    Join Date
    Dec 2014
    Posts
    27

    VB5 program acquires virus when uploaded to Web

    I've written a VB5 program that I want to share on my website.
    It runs fine on my home computer.
    But when I upload it
    (regardless of whether as an .exe file or as a .zip file containing the .exe)
    and download it,
    Microsoft Defender tells me the downloaded version contains a virus and disables it.
    How can I find what is triggering MS Defender?

  2. #2
    Arjay's Avatar
    Arjay is online now Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,315

    Re: VB5 program acquires virus when uploaded to Web

    Do you think maybe the cause is it is a very old 16-bit program?

  3. #3
    Join Date
    Dec 2014
    Posts
    27

    Re: VB5 program acquires virus when uploaded to Web

    I guess you are referring to the fact that it's programmed in VB5, an old language.
    My present computer is 64-bit.
    Does this mean I have to rewrite the program one more time, or is some kind of "conversion" possible?
    Would the prospects be any better if I used VB6?

  4. #4
    Arjay's Avatar
    Arjay is online now Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,315

    Re: VB5 program acquires virus when uploaded to Web

    Any of the traditional VB's like VB5 or VB6 create 16-bit programs. Your OS is 64-bit. It can run 32-bit programs through a 32 bit subsystem, but the ability to run 16-bit programs is disabled by default.

    Now much to my surprise it appears that you can turn NTVDM back on. Search bing or google for "How to enable 16-bit application support in windows 10".

    Hopefully that will get you going but you may want to consider rewriting your app with something newer. Not sure I'd use VB6 as it's 22 years old already.

  5. #5
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,350

    Re: VB5 program acquires virus when uploaded to Web

    Actually VB5 and 6 are both 32bit and create 32bit programs. VB3 was 16 bit, VB4 was a transition the IDE was 32bit but it could build 16 bit apps as well as 32 bit apps

    As for the virus your program is not getting a virus when it is uploaded but rather the virus scanner sees something in your program that it thinks is a virus.

    VB6 and programs built with VB6 work fine under Windows 10
    Last edited by DataMiser; June 25th, 2020 at 04:20 PM.
    Always use [code][/code] tags when posting code.

  6. #6
    Arjay's Avatar
    Arjay is online now Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,315

    Re: VB5 program acquires virus when uploaded to Web

    Quote Originally Posted by DataMiser View Post
    Actually VB5 and 6 are both 32bit and create 32bit programs. VB3 was 16 bit, VB4 was a transition the IDE was 32bit but it could build 16 bit apps as well as 32 bit apps

    As for the virus your program is not getting a virus when it is uploaded but rather the virus scanner sees something in your program that it thinks is a virus.

    VB6 and programs built with VB6 work fine under Windows 10
    Ah, I stand corrected.

  7. #7
    Join Date
    Dec 2014
    Posts
    27

    Re: VB5 program acquires virus when uploaded to Web

    your program is not getting a virus when it is uploaded but rather the virus scanner sees something in your program that it thinks is a virus.
    Nevertheless, there seems to be some crucial change during the upload/download process. I "Make" an .exe file of the program on my computer and call on MS Defender to scan it. Result: "0 threats found". I upload and download the same .exe, and I get the virus message—and Defender deletes the download (regardless of what browser I use). I am not even allowed to say "run it anyhow, I'm acquainted with the source of this program (myself)."
    Even if I knew how to temporarily disable MS Defender, I can't ask my potential users to do so. What to do?

  8. #8
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,189

    Re: VB5 program acquires virus when uploaded to Web

    Does this happen for any user-written .exe or just this one - have you tried just a simple 'hello world' program? Is the program being rejected because it is downloaded and isn't signed?
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2019 (16.7.0)

  9. #9
    Arjay's Avatar
    Arjay is online now Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,315

    Re: VB5 program acquires virus when uploaded to Web

    Does the pribkem hapowned when the program is uploaded/downloaded to a different site?

  10. #10
    Join Date
    Dec 2014
    Posts
    27

    Re: VB5 program acquires virus when uploaded to Web

    Two good suggestions: a simpler program and another server.
    I made Project2.exe to put the Label "Hi there!" on the screen and uploaded it both to my (Weebly) website and to my friend's server.
    In both cases, when I download it and click the downloaded version to run I get the message "Windows protected your PC", and a choice between "More info" and "Don't run". "More info" brings in the option to "Run anyway". And "Run anyway" runs it correctly.
    But with my more complex program, the download from either of those two servers triggers more drastic rejection: "Run anyway" gets the response "Operation did not complete successfully because the file contains a virus or potentially unwanted software," and automatic deletion from the Downloads folder.
    What do you mean by "signed", 2kaud? Does only software with a corporate logo get downloaded safely?

  11. #11
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,189

    Re: VB5 program acquires virus when uploaded to Web

    What do you mean by "signed", 2kaud?
    See https://en.wikipedia.org/wiki/Code_signing

    Also try it with https://www.virscan.org/language/en/ This scans the specified file using 49 different virus scanners.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2019 (16.7.0)

  12. #12
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,350

    Re: VB5 program acquires virus when uploaded to Web

    Quote Originally Posted by leezinho View Post
    Nevertheless, there seems to be some crucial change during the upload/download process. I "Make" an .exe file of the program on my computer and call on MS Defender to scan it. Result: "0 threats found". I upload and download the same .exe, and I get the virus message—and Defender deletes the download (regardless of what browser I use). I am not even allowed to say "run it anyhow, I'm acquainted with the source of this program (myself)."
    Even if I knew how to temporarily disable MS Defender, I can't ask my potential users to do so. What to do?
    Have you tried running the exe on your computer before you upload it? If so what was the result?
    Always use [code][/code] tags when posting code.

  13. #13
    Join Date
    Dec 2014
    Posts
    27

    Re: VB5 program acquires virus when uploaded to Web

    DataMiser: As I said in Post #1, the program, its .exe, runs fine on my computer, before upload. When I right-click on its name and choose "Scan with Windows Defender", as I said in Post #7, I get "No current threats." As I said in that post, "there seems to be some crucial change during the upload/download process."
    2kaud (Post #11): Thanks for the tip on the 49 different virus scanners. They all "Found nothing", both on the pre-upload version and on a post-download version in my Recycle Bin (which gets the virus warning from Windows Defender).

  14. #14
    Arjay's Avatar
    Arjay is online now Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,315

    Re: VB5 program acquires virus when uploaded to Web

    After you download the file, do you unblock it? In explorer, roght click on the downloaded exe, click properties and click the Unblock checkbox.

  15. #15
    Join Date
    Dec 2014
    Posts
    27

    Re: VB5 program acquires virus when uploaded to Web

    Under Properties > General, I found the Unblock box, clicked it, and closed Properties. But still a click on the exe gets the message "Operation did not complete successfully because the file contains a virus or potentially unwanted software." I returned to Properties to confirm that I had marked Unblock, but this time there was no Unblock to be found—only "Attributes: [ ]Read-only [ ]Hidden"

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)