Link to home
Start Free TrialLog in
Avatar of Aerocom
AerocomFlag for Sweden

asked on

VB 6 error 5 in windows 10 but not in XP

In an app I have a function that shells to an other executable that checks for available updates. the code used is

Private Sub CmdUpdateprog_Click()
Dim progupdate As String
progupdate = App.path & "\pacsupdate.exe"
Shell progupdate, vbNormalFocus
End Sub

This works fine in XP which the app was developed in but throws up the  warning
Runtime Error 5 invalid proceedure call or argument in some windows 7 and windows 10 PC's

Running the  sheel app  directly  on a windows 10 PC throws up a user account control warning and the app will run normally after permitting it to run
Anybody got a solution
Avatar of Shaun Vermaak
Shaun Vermaak
Flag of Australia image

This is UAC blocking you
Avatar of Aerocom

ASKER

What do you mean by UAC?
ASKER CERTIFIED SOLUTION
Avatar of DonConsolio
DonConsolio
Flag of Austria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Aerocom

ASKER

Thank you That fixed it.
I knew there was a access problem with non Admin users but did not expect it when logged on as Admin. I have now put in a message box instructing users to use the right click/admin open.
Avatar of Aerocom

ASKER

Sorted quickly
You may also want to create a link to your program and in advanced properties select always run as Administrator
Avatar of Aerocom

ASKER

When users install the program it places a link icon on their desktop.  As it is only some users that have the problem and often users cannot change setting themselves because of IT restrictions, I have opted for an error trap with a message box that tells them to run as admin when the error 5 occurs.
Users that have no problems will not see the message.