Hey i'm testing out my program, and some of the pc's that run it I get these ocx errors. So I did some looking around and I found VbRuntime 6.. but that doesnt fix the problem..
The package and development thing only sets up my program to install the program locally, I intend to run this on the server with links on the pc.. do I need a newer version of VB runtime?
any ideas comments or suggestions are greatly appreciated..
I have said it before and I'll say it again. Do yourself a HUGE favor and get installshield express or another after market setup program. You will drive yourself nuts trying to get that damn Microsoft install stuff to work properly. Actually I recommend Installshield Professional windows installer edition, it is a little expensive at about $900 but it works excellent. Or take a look at indigorose.com for setup factory or Wise.
- However do be warned you'll need a bit of time to work through these tutorials. Nonetheless, its certainly well worth it & generally with other Installation packages (such as Install Shield) you have an enormous array of information thrown at you, (right from the start), which would take you quite a while to muster anyway.
Why not use native VB? - Especially if its free...
Diplomacy is being able to tell someone to go to hell in such a way, that they actually look forward to the trip.
You need the runtime on the client even if you are installing and running the EXE on the server.
So just creat the setup with the package and deplowment wizard, And remove the EXE.
And have a shortcut to the exe on the server.
But i dont see why you wouldn't want to execute it locally?
What you will find is that you won't be able to remove the exe from the Setup as it is a Core component of the Setup Script and indeed of your application actually running.
The reason why? - Well, if you run an exe off a Server rather than locally, (in a Multi-user situation), when you need to update everyone's version of the exe...
Diplomacy is being able to tell someone to go to hell in such a way, that they actually look forward to the trip.
What you will find is that you won't be able to remove the exe from the Setup as it is a Core component of the Setup Script and indeed of your application actually running.
The reason why? - Well, if you run an exe off a Server rather than locally, (in a Multi-user situation), when you need to update everyone's version of the exe...
First you could remove from your package the exe.
Try it.
Two it uses alot of network resources to run a App thru the network.
You could have the Application updat itself when launched with the newest version.
This way you dont knock of anyone when installing the newer version on the server.
However, How do you get a program to update itself without using another entity as a third step?
Also, I have tried to remove the exe fro the Setup, and it did tell me that the setup required it. It probably is possible to bypass, however on the same token, you could write a batch file which you could get the setup to run once it has completed to delete the exe too.
-Wasteful perhaps, but lets stop arguing about trivial, meaningless, drivel. Shall we?
Diplomacy is being able to tell someone to go to hell in such a way, that they actually look forward to the trip.
287 If Dir(ntwrkloc & App.EXEName & ".txt") = "" Then
288 Answer = MsgBox("There is no version information on the server, Or you did not correctly select the server. Press yes to continue, No to re-select. Do you want to continue?", vbYesNo, "Network Update")
If Answer = vbYes Then Exit Sub
289 If Answer = vbNo Then GoTo reselect
290 End If
291 Open ntwrkloc & App.EXEName & ".txt" For Input As #1
292 Line Input #1, SS
293 Close #1
294 If SS Like App.EXEName & "*" Then
295 SS = Right$(SS, Len(SS) - (Len(App.EXEName) + 4))
296 Else
297 Beep
Exit Sub
298 End If
299 If CDbl(SS) > CDbl(App.Major & "." & App.Minor & App.Revision) Then
300 Answer = MsgBox("New Update Available. Do you wish to Upgrade now.", vbYesNo, "Live Network Update")
If Answer = vbNo Then Exit Sub
301 Open App.Path & "\UpdateN.bat" For Output As #2
312 Answer = MsgBox(Err.Number & " In Network Update Line Number: " & Erl & " - " & Err.Description & " Click on Yes to RESUME, on No to RESUME NEXT, And On Cancel to Reselect Server Location. Do You Want To RESUME?", vbYesNoCancel + vbCritical, "Error Message")
Answer = MsgBox("There is no version information on the server, Or you did not correctly select the server. Press yes to continue, No to re-select. Do you want to continue?", vbYesNo, "Network Update")
If Answer = vbYes Then Exit Sub
If Answer = vbNo Then GoTo reselect
End If
Open ntwrkloc & App.EXEName & ".txt" For Input As #1
Line Input #1, SS
Close #1
If SS Like App.EXEName & "*" Then
SS = Right$(SS, Len(SS) - (Len(App.EXEName) + 4))
Else
Beep
Exit Sub
End If
If CDbl(SS) > CDbl(App.Major & "." & App.Minor & App.Revision) Then
Answer = MsgBox("New Update Available. Do you wish to Upgrade now.", vbYesNo, "Live Network Update")
Answer = MsgBox(Err.Number & " In Network Update Line Number: " & Erl & " - " & Err.Description & " Click on Yes to RESUME, on No to RESUME NEXT, And On Cancel to Reselect Server Location. Do You Want To RESUME?", vbYesNoCancel + vbCritical, "Error Message")
Could you please Define what your Variable names are the next time you decide to post some code (Option Explicit will help you remember if you forget) as it is a lot easier to understand if you do declare it rather than just using variable names all-over-the-shop.
thx.
Also it is good to see somone using Absolute Path's (& I s'pose if you don't declare the majority of your variables then you probably do need to use Absolute Paths), however have you ever heard of the "Me" object? (ie. With Me ...End With) or perhaps instead of saying Module1.SomeFunctionName, have you ever considered declaring your Function as being Public? - That way when you use that Function's Name VB will know which Function you're actually talking about?
ie.
VB Code:
[B]Public[/B] Function MyFunctionName() as Boolean
ps. This is your 618th Post (@ time of Writting), I certainly hope the rest of your 617 posts, don't have code as woeful as the above example, as indeed *shock, horror* some VB programmers actually use the code posted on these forums.
DB9633,
Sorry, no such thing, although you might want to check out this post.
Last edited by T-Bone; Aug 24th, 2001 at 12:39 AM.
Diplomacy is being able to tell someone to go to hell in such a way, that they actually look forward to the trip.
Could you please Define what your Variable names are the next time you decide to post some code (Option Explicit will help you remember if you forget) as it is a lot easier to understand if you do declare it rather than just using variable names all-over-the-shop.
thx.
Also it is good to see somone using Absolute Path's (& I s'pose if you don't declare the majority of your variables then you probably do need to use Absolute Paths), however have you ever heard of the "Me" object? (ie. With Me ...End With) or perhaps instead of saying Module1.SomeFunctionName, have you ever considered declaring your Function as being Public? - That way when you use that Function's Name VB will know which Function you're actually talking about?
ie.
VB Code:
[B]Public[/B] Function MyFunctionName() as Boolean
ps. This is your 618th Post (@ time of Writting), I certainly hope the rest of your 617 posts, don't have code as woeful as the above example, as indeed *shock, horror* some VB programmers actually use the code posted on these forums.
I dont know if you program in Vb, but if you do the above code works by itself without having to add declarations to anywhere.
And the one that calls CloseHiddenPreviosApp Doesn't need to be explained what it does if you know some english.
And why should Imake the function public if a call it once before Updating.
And Please be more specific with any other problems with the code, Thats if you are a vb programmer.
At my company, currently everyone (about 250 users) all use the same executable off of the network via a shortcut on their desktop. The key to it is that there is already a different application on their machine designed to look for a newer version everytime they click the shortcut.
1) The application designed to look for a newer version is run.
A) It looks at the version of the Main Application via a text file
and compares that to the registry setting for the main app.
B) If the text file and the registry are different the app calls the
install for the main app to install the newer version.
C) If they are the same the main application is called.
2) Runtime files seldom ever change for this application, but the
registry changes everytime a new release is released. We
currently put the whole setup package out there, but basically
all I would need to do is run a registry update.
3) I modified the Setup1 so that the user does not have to do
anything, and also puts a shortcut on their desktop.
We have been doing this for about a year now and there has never been any problems and the user doesn't know that the 2nd application exists, they all think the main app is installed locally because it either opens or updates automatically with no input from them.
I don't believe that hacking on someone else's coding style is productive either. We all code how we understand or are taught or by the standards of the company we work for. Everyone's learning curve is different and I think that if we are truely here to help one another, than all this idle talk about who's code looks better is mute...
poooof
Wizard Since 1997
SQL Server 7.0:2K, Oracle, VB 6.0 EE, VBScript, C/C++, COBOL, RPG ILE, HTML, XML, Perl
use Bitarts Fusion, to pack your project and dependencies to ONE exe-file...
i'll run on every windows based pc...
only problem: files get BIG (> 730kb, coz vb-main-dll has 700kb...)
Answer = MsgBox("There is no version information on the server, Or you did not correctly select the server. Press yes to continue, No to re-select. Do you want to continue?", vbYesNo, "Network Update")
If Answer = vbYes Then Exit Sub
If Answer = vbNo Then GoTo reselect
End If
Open ntwrkloc & App.EXEName & ".txt" For Input As #1
Line Input #1, SS
Close #1
If SS Like App.EXEName & "*" Then
SS = Right$(SS, Len(SS) - (Len(App.EXEName) + 4))
Else
Beep
Exit Sub
End If
If CDbl(SS) > CDbl(App.Major & "." & App.Minor & App.Revision) Then
Answer = MsgBox("New Update Available. Do you wish to Upgrade now.", vbYesNo, "Live Network Update")
Answer = MsgBox(Err.Number & " In Network Update Line Number: " & Erl & " - " & Err.Description & " Click on Yes to RESUME, on No to RESUME NEXT, And On Cancel to Reselect Server Location. Do You Want To RESUME?", vbYesNoCancel + vbCritical, "Error Message")
If Answer = vbYes Then Resume
If Answer = vbNo Then Resume Next
If Answer = vbCancel Then GoTo reselect
End Sub
shragrel,
Well, sorry to say, but if people are determined to post poor code, I'm determined to tell them to pull their head in & clean it up.
However some people are so *obtuse*, that they aren't even aware of the fact that they might've used two variables such as ntwrkloc and nwtwrkloc, when they've only declared one of them. These people also seem to have used a meaningless variable name such as SS, (which ironically isn't declared either). But we shouldn't mention any names now, should we?
So although you may swear that you have used this code quite frequently, I'm suprised it works at all.
As for knowing how to Program in VB goes, according to your comment in your profile, you're telling us that VB6 (with SP5) is the most buggiest version that you've ever seen. This only goes to show that your Quack is obviously not doing a very good job in treating you. Either that, or your not open enough to the treatment that they're offerring.
Nevertheless, some day your VB.Code will eventually have some VB.Professionalism and you might even start to use Option Explicit once in a while. Although I suppose that might just be pushing it...
Last edited by T-Bone; Aug 27th, 2001 at 04:16 AM.
Diplomacy is being able to tell someone to go to hell in such a way, that they actually look forward to the trip.
shragrel,
Well, sorry to say, but if people are determined to post poor code, I'm determined to tell them to pull their head in & clean it up.
However some people are so *obtuse*, that they aren't even aware of the fact that they might've used two variables such as ntwrkloc and nwtwrkloc, when they've only declared one of them. These people also seem to have used a meaningless variable name such as SS, (which ironically isn't declared either). But we shouldn't mention any names now, should we?
So although you may swear that you have used this code quite frequently, I'm suprised it works at all.
As for knowing how to Program in VB goes, according to your comment in your profile, you're telling us that VB6 (with SP5) is the most buggiest version that you've ever seen. This only goes to show that your Quack is obviously not doing a very good job in treating you. Either that, or your not open enough to the treatment that they're offerring.
Nevertheless, some day your VB.Code will eventually have some VB.Professionalism and you might even start to use Option Explicit once in a while. Although I suppose that might just be pushing it...
However some people are so *obtuse*, that they aren't even aware of the fact that they might've used two variables such as ntwrkloc and nwtwrkloc, when they've only declared one of them.
Now for one. If you do know Vb code as you claim you will see that the line with the wrong variable isn't used at all. It was just put in to test what it return's. look it over again if you wish.
And about using Option Explicit look up a old thread with the pros and cons of using it. Alot of developers dont.
And about using ss fo a variable, it does mean something to me, It means program version in my language.
And please take a course in vb language.
Hmmm
I agree with using Option Explicit but i also disagree with T-Bone's arrogant attitude to telling ppl what to do and what not to do. I saw prev posts containing such wise words. An example was the post http://www.vbforums.com/showthread.p...threadid=98668 . Looping thru all days in order to answer something that of course is based on simple formula and constants - good code? hmmm. I think that you should spend less time in being so rude to others and more time on improving ur own code. I would love to see u teaching a child how to ride a bike. "Damn stupid kid u do it this way!"
Regards
Stuart
Hi T-Bone
Look, i completely understand your frustration at some of the items that are posted as answers on this forum and some from ppl that should know better. I personally don't like to see obvious beginners handed a huge API routine and such but hey this is a forum and for every one of those answers, there will be another few good answers. The good answers may not even be in a particular poster's thread but i am sure they can search around in the forum for more answers on their topic and as they progress with VB they will learn to differentiate the good from the bad.
I guess that my main point was that a forum works by cooperation and interaction and that there are better ways to voice ur concern about posted answers than to aim directly at the poster. A much better way i think is to produce a better or more appropriate answer and to explain why u have done it this way instead of the other way. The poster will hopefully see ur logic and make use of it. Even the 'incorrect' answerer may learn something new instead of getting their back up.
Anyhow, so i apologise if i also got a bit annoyed at ur answers. I just dont want the forum to become dysfunctional because it is a place of anger and oneupmanship. So please continue to be a part of it and enunciate your views on good code and design etc.
Regards
Stuart