borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (two columns in Combo Box )Next Topic (Run-time error '7') New Topic New Poll Post Reply
AndreaVB Forum : VB General : Is It Possible
Poster Message
Tedcat
Level: Guest


icon Is It Possible  Archived to Disk

I am trying to create a program that will run without doing an install first. I need some way to change the path to the ocx files that the exe needs. Is there any way to do that? I wanted to use VB6 instead of C++ to do this program if possible. I need this program to run from a CD, and not have to be installed first. Any help would be great.

11-07-2002 at 04:49 PM
| Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1617
icon Re: Is It Possible  Archived to Disk

If the OCX's are standard windows ones, and the VB Runtimes (Win98 and NT with SP4-5 already have I believe), the program should run without problems anyway.

If you mean custom controls, if they're in the program's folder, normally it will work without them needing to be installed (although not always).

However you can always create a "loader" program that will install the controls, then run the executable (from the loader program).

If you do the last option the following are handy:
For ActiveX EXE
filename.exe /regserver
filename.exe /unregserver

For OCX/DLL:

'---START CODE ----

Declare Function DllRegisterServer Lib "NAME_OF_FILE.OCX/DLL" () As Long
Declare Function DllUnregisterServer Lib "NAME_OF_FILE.OCX/DLL" () As Long

Const ERROR_SUCCESS = &H0

' To register your OCX use this function:
If DllRegisterServer = ERROR_SUCCESS Then
    MsgBox "Registration Successful"
Else
    MsgBox "Registration Unsuccessful"
End If

' To unregister your OCX use this function:
If DllUnregisterServer = ERROR_SUCCESS Then
    MsgBox "UnRegistration Successful"
Else
    MsgBox "UnRegistration Unsuccessful"
End If

'---END CODE---

11-07-2002 at 06:03 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
AndreaVB Forum : VB General : Is It Possible
Previous Topic (two columns in Combo Box )Next Topic (Run-time error '7') New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder