Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[VB6] How to get an UAC prompt?


erkro1
 Share

Recommended Posts

> Hmm, has it been able to download the RAR-file, and does it contain everything that is required? Also, are there are any errors being shown when updating?
>
> Yours faithfully,
>
> S.J.R. van Schaik.

I don't know if it downloads the .rar, I'm sure it requires everything required (because it works on other pc's) and there are no errors when updating.

The problem is that it only occurs on someone elses Windows 7 system so its kinda hard to debug.
Link to comment
Share on other sites

It's kind of hard to pin-point the exact cause, as the process consists of multiple steps:

* Read the local INI file for the local version.
* Download and read the remote INI file for the current version (possible problem: downloading may not work due to insufficient rights; msinet.ocx may be missing).
* If the local version does match, exit the process.
* Download the RAR-package (possible problem: downloading may not work due to insufficient rights; msinet.ocx may be missing).
* Extract the RAR-package (possible problem: unrar.dll may be missing).
* Update the local INI-file (possible problem: writing may not work due to insufficient rights).

Yours faithfully,

S.J.R. van Schaik.
Link to comment
Share on other sites

Now I have made it so that it defaults runs it as an administrator so I don't think its something with the privileges.

Both unrar.dll and msinet.ocx are in thesame folder as the updater, but I guess if there aren't registered or something it will trow an error right?

And I believe everything from the INI's is working, because it will update the INI's with the downloaded version number.

So I think it has something to do with the RAR.
Link to comment
Share on other sites

Normally, Microsoft Windows will look in the same path as where the executable is located for those system libraries. Therefore you normally won't have to register them. However, you might want to try registering them, as it won't do any harm.

Yours faithfully,

S.J.R. van Schaik.
Link to comment
Share on other sites

It's already registering the msinet.ocx because I had problems with that previously, it uses this code:

```
Public Declare Function RegMsinet Lib "MSINET.OCX" _

Alias "DllRegisterServer" () As Long

Public Const S_OK = &H0

Sub RegisterMsinet()

On Error GoTo Err_Registration_Failed

If Not RegMsinet = S_OK Then

DestroyUpdater

End If

Exit Sub

Err_Registration_Failed:

MsgBox "Error: " & Err.Number & " " & Err.Description

End Sub
```

Which is called before doing anything, but I will try registering the dll and see if that fixes the problem.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...