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

How to put the autoupdater before the client opens


Warden
 Share

Recommended Posts

Hello,im using robin's autoupdater (http://www.touchofdeathforums.com/smf/index.php/topic,58493.0.html) and i want it to open if you open client.exe,then theres a button "connect" and it checks if ur version is updated,if it is then it will open the client and if its not it will update and will open client after that,any help?thank you
Link to comment
Share on other sites

What you do is, don't tell everyone to open your client first.
Make it so everyone open the AutoUpdater.exe

Now you can set up the updater normally but you'll have to source edit a bit.
Basically, have a button or a method that open the Client. I believe it's "Shell".
Shell "Path\Client.exe", vbNormalFocus

You can get fancy with it. I use the If Then Else Statement that already existed during the check if there is a new version and depend on that, the button will show as either Update or Launch.

Sincerely,
Rtihy
Link to comment
Share on other sites

hmm okay,but how to delete a button?i thought that i should do like that if its up to date or updated it will remove button "lblConnect" and will show the button "lblPlay"

edit: i got it thanks :P
Link to comment
Share on other sites

You have two choice in VB6\. Either open one of the form first or run Sub Main() first.

To go Project > Project Properties > Start Up Object.

Sincerely,
Rithy

EDIT : Oh and I love how you used the edit button. I personally myself accidentally double post sometime but I try to avoid doing that much as I can. If only new members can follow the rules like you…
Link to comment
Share on other sites

There already is a check for outdated versions, that uses the client's project properties and server defined constants (CLIENT_MINOR, CLIENT_MAJOR, CLIENT_REVISION) to make sure the client is up to date. Search for an alert box that comes up starting with "Version Outdated" (no quotes) client-side. Then, after that, add:
Shell "updater.exe"

Once the updater is done increment the number. Make sure both of them are in sync.

Lastly, here's another small thing, make the updater run the client (shell "client.exe") and then put the client in another folder. They'll run your updater first, and then it will update and run the client.
Link to comment
Share on other sites

hmm…but now i did put the autoupdater src files and client ones together and renamed autoupdater's frmMain to frmUpdater,and i wanted it to open the frmUpdater first if you run the exe file but it gives me the error "error number '52' Bad file name or number"
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...