vendredi 17 avril 2015

Windows 8 permission havoc on VB6 Shell Call

I'm attempting to call a command prompt to copy a text file to a port in a compiled OCX written in VB6. It's doing this via the copy command in command prompt, sending a text file to a port like "LPT1", etc. This works great on XP and on 7, but Windows 8 will not allow it to happen. I've taken the following steps:



  • Make the service using this OCX run under a specific administrator's account instead of the local system's account

  • Use "ShellExecute" in the VB6 code, ensuring to use the correct syntax. (This works on Windows 7 fine, but again fails in Windows 8)

  • Make an executable out of a batch file that included the Administrator manifest, but no dice.

  • I've made sure to register the OCX as administrator each and every time


Due to the command working on both Windows XP and 7, I'm inclined to believe this is a permissions issue with Windows 8, but all of the workarounds have failed so far. If more information is required, please let me know and I will provide it. Thanks!


Edit: I've found out that the OCX behaves properly under debugging... My guess is that the debugging of the OCX grants it the privileges that the IDE has, which is Visual Studio 6.


Aucun commentaire:

Enregistrer un commentaire