How to register a ocx control if i dont have an Administration Previllege.
Hi,
I developed a Applicaiton in VB6, Access is the database. I used the FarPoint Control version 7. I compiled the project and created the exe through Package and Deployment Wizard. I installed in a client machine. During the installation i recieve the error
Failure writing to the system regirstry. The registry may be corrupt or you may not have the required permissions to write to the registry.
then if i contrinue after click the OK button for the above error the following error occurs next
Setup has encounered an error in the Registration Database.
and when i click OK , the following error occurs next
Quote:ODBC's SQLInstallDriverManager failed.
and when i click Ok then the following error occurs with the headin Setup Error 168
Setup has encountered a problem updating your system registry.
then the next error is
An error occured trying to update the Windows registration database.
when i click OK button , finally this error repeats for a very long time.
In this company all PC's has restrictions and only certain pervilleges. I think the administrator previlleges is need to register this control. Kindly suggest me is there any alternate way for this - to register controls. itried through regedit, but not suceeded.
I tried in another way, i used the Inno Setup Compiler and tried, still that too have problems but after the installation. But the problem occurs for the same control. fpspr70.ocx.
When i use InnoSetup and install and when i try to use the Form which has the FarPoint Control. the below is the error comes
Quote:Run-time error '339'
Component 'FPSPR70.ocx' or one of its dependencies not correctly registered: a file is missing or invalid.
kindly tell me to solve this.
Thankyou,
Chock.
Re: How to register a ocx control if i dont have an Administration Previllege.
if the administartor Previllege is set on for not leting installation i am not shure if you can. some compenys even put a background app that will destroy the dll files that are bing instaled
is 'FPSPR70.ocx' a custom control?
here is the deal, limited acounts (asumming you got WIN XP) don't have the Previllege to write anything to the regesty, for limited its read only or not accessible at all
Re: How to register a ocx control if i dont have an Administration Previllege.
Hi,
What's the solution for this. I need the administartion previlleges only for installing the first or will this require whenever i use the application or what. Is there any other alternate way to solve this. its going to be a multiuser system.
Thankyou,
Chock.
Re: How to register a ocx control if i dont have an Administration Previllege.
Quote:
Failure writing to the system regirstry. The registry may be corrupt or you may not have the required permissions to write to the registry.
is it a limited account?
If yes,
here is the deal, limited acounts (asumming you got WIN XP) don't have the Previllege to write anything to the regesty, for limited its read only or not accessible at all
Re: How to register a ocx control if i dont have an Administration Previllege.
Hi,
The system has WinXP . i think its a limited account, bcoz if i want to install any software then it will ask for the admin previllege, then i have to call for the admin and he will install with the ADministrator password.
this is what happening here.
the application i prepared is going to be a multiuser system, should i need administrator previlleges to install in all my client pc or what. Even thought if i have the Admin previllege is it possible to install the application and regirter the ocx or not.
Re: How to register a ocx control if i dont have an Administration Previllege.
Quote:
Originally Posted by chockku
the application i prepared is going to be a multiuser system, should i need administrator previlleges to install in all my client pc or what. Even thought if i have the Admin previllege is it possible to install the application and regirter the ocx or not.
I think so yes, if you have administrator previlleges you will have the previllege to install delete system file,dll, ... and also the right to write to regestry and delete from it
Re: How to register a ocx control if i dont have an Administration Previllege.
Quote:
Originally Posted by chockku
Even thought if i have the Admin previllege is it possible to install the application and regirter the ocx or not.
1) I don't understand what it is that you are asking.
2) If you do not have the access rights to write into the registry you cannot install the application.
3) The only resolution to this problem is to log into the machine with an account that has rights to do this. "Power User" can do it as well as "Administrators".
4) Once the app has been installed, a normal user should be able to run it just fine.
Re: How to register a ocx control if i dont have an Administration Previllege.
Dave Sell, if you would read what i wrote him you would understand that that problem was allready explained :lol::lol::lol:
Re: How to register a ocx control if i dont have an Administration Previllege.
Quote:
Originally Posted by wiz126
Dave Sell, if you would read what i wrote him you would understand that that problem was allready explained :lol::lol::lol:
Not really:
Quote:
Even thought if i have the Admin previllege is it possible to install the application and regirter the ocx or not.
This question makes no sense. Maybe its just your English. In this question you state:
"I have Admin Privelege"
This means you must have the ability to install, as all admins can install.
Then you ask:
"is it possible to install the application and regirter the ocx or not"
Answer: yes. All admins can install an OCX.
Re: How to register a ocx control if i dont have an Administration Previllege.
Better question, and I think this is what he was on about...
I make applications with a lot of DLL and OCX dependancies, and normaly I just place them in the application path ({folder_of_exe}\Data) and it loads all of them, there's one it won't load:
THE DREADED VBMP.OCX
I tried even putting it next to the EXE, but it won't load it unless it is registered. I have the source of the application (duh), what can I do to restrict the "look for" path to local?
I found this on google:
Code:
SET DEFAULT TO (JUSTPATH(SYS(16)))
&& or
SET PATH TO (JUSTPATH(SYS(16))) ADDITIVE
Would that work?
What does it do?
Re: How to register a ocx control if i dont have an Administration Previllege.
Quote:
Originally Posted by
d22552000
I tried even putting it next to the EXE, but it won't load it unless it is registered.
As per the above statement, if you compile an EXE that has a dependency on an OCX or COM-based DLL, then when you distribute the EXE to another machine, it is not enough to simply copy the OCX or DLL along with it. The OCX or DLL must first be registered on the OS before the EXE can be properly executed.
During run-time, when the EXE makes a call into a COM-based library, the OS must first search the registry for the CLSID and PROGID in order to find the location of the library on disk.
Not registering some components, because they simply reside next to the EXE in the same folder is not guaranteed to work reliably.
Re: How to register a ocx control if i dont have an Administration Previllege.
Re: How to register a ocx control if i dont have an Administration Previllege.
Quote:
Originally Posted by
Dave Sell
As per the above statement, if you compile an EXE that has a dependency on an OCX or COM-based DLL, then when you distribute the EXE to another machine, it is not enough to simply copy the OCX or DLL along with it. The OCX or DLL must first be registered on the OS before the EXE can be properly executed.
During run-time, when the EXE makes a call into a COM-based library, the OS must first search the registry for the CLSID and PROGID in order to find the location of the library on disk.
Not registering some components, because they simply reside next to the EXE in the same folder is not guaranteed to work reliably.
I have been told twice now that VB has a keyword/command/api function call I can add to tell it where to search for APIs, COMs, and ActiveX OCX files. (( Oh, and I override the looking for COM-DLL files by manually loading them into the PROGRAM's memory, before calling ANY OTHER CODE. (( Hence placing them in {path_to_exe}\Data ))
Now as per the OCX, it doesn't create a nice "memory string", and the program isn't looking in the memory for it :(. I don't even know where in my code I used VBMP, or I'd just work around that control. What does it do again?
I know in VB.NET where I want to load something without registering it I do the same thing, load it into memory, then instead of calling a namespace or api call, I use the "location of memory at" type syntaxs to make it load the memory string instead of looking in the registry, where most computers do not have WRITE on the registry, let alone some that completely deny READ.
Visual Basic Code:
' Custom function, searches for and loads file to memory using a custom searchpath with priority systems and access calculations, + "large memory" support
' String path :Path to file to load, file or localized to ".\Data"
' String con :Variable to make CONST and store addr to.
' @returns boolean :False on fail, + Exception, NULL on success
' THROWABLE: DllNotFoundException ( Main )
' THROWABLE: ArgumentNullException
' THROWABLE: AccessViolationException
' THROWABLE: UnauthorizedAccessException
' THROWABLE: ArgumentException ( Fallback )
' THROWABLE: Exception ( in case of utter failure )
try {
wa_mem_load("ieutils.dll", "ieua")
} Catch ex As DllNotFoundException {
DebugAll.log("Unable to load required file!:", ex.ToString, "", "Errors")
me.close()
}
ieu = AddressOf ieua
' ieu is not instanced as the object itself
' and can be duplicated with new
...
Re: How to register a ocx control if i dont have an Administration Previllege.
Quote:
Originally Posted by
chockku
In this company all PC's has restrictions and only certain pervilleges. I think the administrator previlleges is need to register this control. Kindly suggest me is there any alternate way for this - to register controls. itried through regedit, but not suceeded.
If the application you installing needs it you need to register it.
You don't realy need to be an admin but your user name must have rights to write to the registry which is an option a network admin can give a user without making him admin.
I faintly remember our network admin showing me in AD that rules can be created to allow users to register ActiveX Controls with specific names, etc... check this with your Network Admins too.
Trying to find a way around the security is not only an attempt in trying to hack your security rights given to you by the company but will also most likely breach your company user policy contract. In some companies, attempting to overwrite security policies without consent can get you fired.
Check those policies with your Network Admins and be careful. :)
Quote:
Originally Posted by
chockku
Hi,
the application i prepared is going to be a multiuser system, should i need administrator previlleges to install in all my client pc or what. Even thought if i have the Admin previllege is it possible to install the application and regirter the ocx or not.
For rolling out the Application on all Client PCs, you might find that by giving the OCX to the Network Administrators they can place it on a network share and run a log-in script on the required PCs which will register the OCX control.
Another option would also be to give the application to install to the network admins and they can run it as silent-install through login-scripts (or similar) on the PCs required.
Network Admins can do silent-installs of applications over the network.
You will have to work closely on this with your network Admins to sort this out.
Re: How to register a ocx control if i dont have an Administration Previllege.
it is possible to register dll /ocx, on a per user basis, without admin rights
see http://www.vbforums.com/showthread.php?t=507228
Re: How to register a ocx control if i dont have an Administration Previllege.
Quote:
Originally Posted by
westconn1
VB Code:
Shell "regedit /s """ + strRegFile, vbHide
Out of curiosity...
In a tight company you have security policies applied to not allow you to write to the registry.
If you log in and type regedit and you get an error saying you are not allowed (or similar) but then run the VB6 app and VB6 gets around that security policies, does that make VB6 a security risk ?
Re: How to register a ocx control if i dont have an Administration Previllege.
not really, many programs write to the registry to save settings and other information, security settings can be tightened, but many programs can not run successfully without some reg read, and write to current user hive
blocking regedit, may stop users from breaking windows by uninformed editing of registry
Re: How to register a ocx control if i dont have an Administration Previllege.
Sorry that I up the old topic, but this is quite useful information for Visual Basic developers..
I've been in stuck of registering of ActiveX libraries for my VB6 project too. The only solution I found for registering - ask user to run install with administrator privileges and during installation setup registers ActiveX.
My project is for home users (which are usually are not smart enough) and it was a problem asking them to grant program administrator privileges. Another problem was ability, or really inability, to create portable version that can be run from USB stick from any PC. These reasons really cut me customers and required much time for support.
Starting from begining, why ActiveX can't be registered without admin privileges? Just because registry HKEY_CLASSES_ROOT it write protected for usual Windows user, and program can't write to it.
So the solution for the problem - use registry virtualization.
I have found solution at http://enigmaprotector.com/ it is a freeware program Enigma Virtual Box. It is easy to use, we simply add ActiveX file to Files tree and in the properties for this file enable option Register as ActiveX. Also, Registry virtualization should be enabled.
What advantages I got:
1. No need to register ActiveX control at all, because Enigma Virtual Box does it itself
2. Ability to merge all files of my application into single executable that makes my customer happy to run singe exe from USB as portable version.
I believe you find this post useful.