3

So this one is a doozy. I am getting inconsistent behavior with a VB6 Windows application on a virtual server running Windows Server 2019 that is our application manager portal.

This application lists all of the Windows applications that a user has access to based on their security permissions through active directory groups.

I had this tested by one of my colleagues who is part of our infrastructure team. He is part of this Windows group called RDS Users (Remote Desktop System Users). I am also part of this Windows group and I am also a local administrator on this server in order to install an application that will be listed in this application manager portal.

So this is the result of my colleague when he launches this VB 6 application:

Application Manager Portal Result-Other User Permissions

This is my result when I launch it:

Application Manager Portal Result-My User Permissions-Invalid Picture Error

One of the methods I tried was clearing out the Temp directory under AppData\Local\Temp within my user directory. Then I received this error message:

Application Manager Portal Result-My User Permissions-Failed to load control from MSCOMCTL.OCX

Here are the steps I have tried with the assistance of my colleague that is part of our infrastructure team to solve this issue but have not been successful:

  • Had my ID permissions changed to full control on the directory where the executable and all dependency files reside and received the same issue listed above.
  • Had my ID removed from the local administrator group and remain in the same RDS Users group as my infrastructure colleague.

I have ran Process Monitor against the launching the executable only for my colleague and myself and I am currently looking through results. I am not seeing anything that is standing out at the moment.

My question is to the group: Is there is anything else that I need to look at that I haven't listed above?

Thank you.

UPDATE 01/22/2020:

Going through the process monitor log I notice some interesting things in the registry for my AppMan.exe (application manager portal executable) execution and my colleague's AppMan.exe execution.

I placed a filter in Process Monitor where Process Name is equal to AppMan.exe.

Some registry entries are falling under HKCU for me and my colleague has registry entries under HKU.

Again this is on the SAME VIRTUAL SERVER.

Here is an example.

Mine (Application is causing errors):

RegOpenKey - HKCU\Software\Classes\Local Settings

My colleague's (Application is working):

RegOpenKey - HKU\S-1-5-21-535134994-3874261535-4188770651-24660_Classes\Local Settings

I searched the registry for "S-1-5-21-535134994-3874261535-4188770651-24660" and couldn't find one entry.

I am a local administrator on this virtual server.

Trying to figure out if there is a connection to this.

UPDATE 01/27/2020:

I figured it out after looking at the VB 6 application that this error is being thrown because the INI file references applications that I have access through the AD groups that currently are NOT on this server. WOW!! I thought I was going crazy. This submission can be closed.

tmosson
  • 41
  • 5
  • 1
    https://answers.microsoft.com/en-us/windows/forum/all/kb3139940-breaks-vb6-application-with-error-about/da4707bb-bdee-4f22-8d17-2b3924115bf3? – GSerg Jan 15 '20 at 18:20
  • I suspect you may be running into this: https://stackoverflow.com/questions/54253845/how-does-icon-image-format-support-vary-by-version-of-windows That problem occurs if you use a 32-bit image when only a lower bitness is supported - and this seems to vary with Windows version. – StayOnTarget Jan 16 '20 at 12:28
  • And some related / similar details: https://stackoverflow.com/a/54136587/3195477 – StayOnTarget Jan 16 '20 at 12:29
  • Thanks everyone. I will look into these. What is puzzling is why is it working for my colleague executing it via RDC but I get these errors when executing. If it was happening for both of us, then it would pretty cut and dry to try a possible solution. Do any of you think it may be permissions issue? – tmosson Jan 16 '20 at 14:17
  • @UuDdLrLrSs, did you ever encounter or know someone where execution of a VB6 application from a remote desktop connection on a server worked for one user but another user on the same server through a RDC connection encountered the errors listed above. Are these links still viable for this situation? – tmosson Jan 17 '20 at 17:19
  • I actually use windows RDP connections regularly when running VB6 programs and have never seen then cause any problem. So it sounds like what you are saying is that on the SAME PC, it works for one user but not another? – StayOnTarget Jan 17 '20 at 17:43
  • @UuDdLrLrSs, yes that is correct. I mean I can try some of these solutions and see if it doesn't resolve the issue. Might as well take a shot. – tmosson Jan 17 '20 at 17:47
  • Have you looked into the mscomctl version issue? That second error message is much more detailed & useful than the original one... could be a good lead. It might mean the file version # (which is 6.1.98.46 on my PC) or maybe the COM type library version. – StayOnTarget Jan 17 '20 at 18:22
  • Talking to my colleague from the infrastructure team this is first time that this VB6 application has been deployed to a Windows Server 2019. My colleague has verified that the VB6 application works through a Windows 10 virtual desktop and Windows Server 2016. I need to research more on Windows Server 2019 and legacy VB6 applications. @UuDdLrLrSs, just seen your reply. Ok. Will do. I will follow-up on this first. Thanks again. – tmosson Jan 17 '20 at 18:26
  • @UuDdLrLrSs, found out the version of mscomctl.ocx we have is 6.0.88.62. Going to locate the latest version out on Microsoft and re-register the new file. – tmosson Jan 17 '20 at 19:51
  • Are you running the application with the same [compatibility settings](https://support.microsoft.com/en-us/help/15078/windows-10-make-older-apps-or-programs-compatible) each time? – GSerg Jan 22 '20 at 20:44
  • @GSerg, my colleague has executed the VB 6 application with no changes to the compatibility settings on the executable. He is able to bring it up with no errors. For myself, I run it the first time and get an "Invalid Picture" error, clear out the temp directory (AppData\Local\Temp), and then get cannot load "ImageList" from MSCOMCTL.OCX. Run it as administrator gives me the "Invalid Picture" error. – tmosson Jan 23 '20 at 17:12
  • I am investigating something to do with checking the corporate active directory within this app against the user's name to see what application groups they have permissions to which in turn shows the application in the list that corresponds with the AD group. I have a good lead right now and I am hoping this is it. – tmosson Jan 23 '20 at 18:38
  • So my hunch turned out to be a dead end. I think I might have to open up a ticket with Microsoft because I have ran out of options. – tmosson Jan 24 '20 at 19:19
  • I just sent an e-mail to my manager and my IT colleagues that I am going to re-write this application in C# so I don't have to deal with the unpredictability of VB6 and since that is the goal to convert these apps from this archaic unsupported technology. – tmosson Jan 27 '20 at 14:08

3 Answers3

0

There might be a “problem” with some picture from your ImageList controls. Try replacing them with “vanilla” bmp and gif images.

An application of mine worked fine on WinXP/Win7 but raised an “Invalid picture” error on Win Server 2012 just because I used some .ico file for MouseIcon property of some label. After I changed it to .cur file my app worked fine.

Smith
  • 710
  • 1
  • 7
  • 11
0

Copy mscomctl.ocx from a working machine to the server 19's C:\Windows\SysWow64 directory then run cmd as administrator and execute

C:\Windows\SysWOW64\regsvr32.exe C:\Windows\SysWOW64\MSCOMCTL.OCX

PsuFan
  • 39
  • 3
  • I tried this and I am still getting the error. I copied over the MSCOMCTL.OCX from my Windows 10 machine, unregistered the old version, and registered this version under C:\Windows\SystWOW64\. I will keep looking into this. – tmosson Jan 22 '20 at 13:54
  • You don't happen to have MS Office x64 installed on the server do you? I just ran into a PC the other day giving unspecified errors running VB with Office x64. Installed x86 and magically started working. – PsuFan Jan 23 '20 at 14:19
  • No Office 64-bit installed. – tmosson Jan 23 '20 at 18:39
0

Once I got this error - "Invalid picture" in vb6 application on Windows Server 2003 when the C: drive had zero bytes free. After I cleaned some space the error gone.

Leo
  • 19
  • 2