Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

edit  HKEY_CURRENT_USER  registry from app running as a service

Posted on 2004-09-07
4
Medium Priority
?
175 Views
Last Modified: 2010-05-02
hi,

re ;  http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_21091221.html

EDDYKT's answer might be what i need :
-----
You can create another activeX exe to do the registry changes.

Call this activeX from your service

ALso make sure change this activeX exe to run as interactive user from the identity tab by
using dcomcnfg.exe
----

im feeling so dumb,  ive never used active exe's    

pls help me in de right direction,  ive opened a new activex exe project,  a class mod is shown,  ive added the reg edit code,  and in its sub main i call the reg change  ?? is that correct ?

then, how do i call the activex from the service   (sorry for these stupid questions,  i really never had to use active x)

thx a bunch guys

cheers

sander
0
Comment
Question by:mokum95
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 8

Expert Comment

by:mladenovicz
ID: 11995665
you have to create method in your class module (e.g RegChange). Then from your service you should call ActiveX exe in the following way:

Dim MyObject as ProjectName.ClassName

Set MyObject = New ProjectName.ClassName

Call MyObject.RegChange

Set MyObject = Nothing
0
 

Author Comment

by:mokum95
ID: 11996979
thanks M.

im now heading in the right direction,,    looked for a few hours,  seems i need to learn a lot more   !  lol        please any 1 else

got some tips i must be aware of,  being new to active x...

thx a bunch

0
 

Author Comment

by:mokum95
ID: 12121138
im still struggeling :( :(     why have i not gone to college and study more..  fool i am  :D

gents please.. im stuck..

i created a  active x exe.    a cls file is shown, i added the reg change code, and added a  private function regchange..     i updated dconcnfg,  it shows
project1.class1   its identity is now interactive user..

then i wanted to test if it works.. created a new app just to test.. instead of calling it from the service..

:  

Private Sub Form_Load()
Dim myobject As projectname.classname
Set myobject = New Project1.class1
Call Project1.regchange
Set myobject = Nothing
End Sub

(is this correct ?? )

when launched it says,  user defined type not defined..      this usually refers to a reference not set...       only  i dont know which reference...

thnx a bunch
regards, sander
0
 
LVL 8

Accepted Solution

by:
mladenovicz earned 1500 total points
ID: 12121198
First of all regchange function has to be public not private in order to call it outside ActiveX EXE. You should compile your activeX EXE (File menu -? Make ProjectName.exe). In your main app go to Project->References and add reference to your ActivexEXE. You should see it in the list of available references. If it is not there, there is Browse button, so you can browse to exe file you created.
HTH
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question