dbTalk Databases Forums  

Register Custom Task automatically

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Register Custom Task automatically in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Frank Matthiesen
 
Posts: n/a

Default Register Custom Task automatically - 07-03-2003 , 03:49 PM






hi ng,

is there any other way to register a custom task (written in VB) in the
DTS-Designer as register it within the DTS-Task-UI?
I've read something about the "Register Custom Task command" on msdn but i
don't find any further information.
Any suggests, hints or informations?


regards

Frank
www.xax.de



Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Register Custom Task automatically - 07-04-2003 , 09:12 AM






Never seen a command to do this, but it can be done by writing some registry
entries.
There is a topic in Books online "Registering a DTS Custom Task".
Unfortunately VB does not offer way to automatically register the task as
per C++, but the registry info is the same
Personally I've manually build the reg entries into a VSI solution and use
the resulting MSI to do my installs. Works quite well even through it can be
a bit fiddly to build.


--
Darren Green
http://www.sqldts.com

"Frank Matthiesen" <fm (AT) xax (DOT) de> wrote

Quote:
hi ng,

is there any other way to register a custom task (written in VB) in the
DTS-Designer as register it within the DTS-Task-UI?
I've read something about the "Register Custom Task command" on msdn but
i
don't find any further information.
Any suggests, hints or informations?


regards

Frank
www.xax.de





Reply With Quote
  #3  
Old   
Frank Matthiesen
 
Posts: n/a

Default Re: Register Custom Task automatically - 07-04-2003 , 09:38 AM



Darren Green wrote:
Quote:
Never seen a command to do this, but it can be done by writing some
registry entries.
There is a topic in Books online "Registering a DTS Custom Task".
Unfortunately VB does not offer way to automatically register the
task as per C++, but the registry info is the same
Personally I've manually build the reg entries into a VSI solution
and use the resulting MSI to do my installs. Works quite well even
through it can be a bit fiddly to build.
hi Darren,

thx for your answer.
Original textline on msdn:
"You also can create custom tasks programmatically, and then integrate them
into DTS Designer using the Register Custom Task command."

Link:
http://msdn.microsoft.com/library/de...us/dnsql2k/htm
l/dts_overview.asp

Anyway:
Do you got a little code snippet/some infos about the registry entries fpr
me?
Wich entries are needed? Do i need to refresh the cache after registering
the new task?

regards

Frank
www.xax.de





Reply With Quote
  #4  
Old   
Darren Green
 
Posts: n/a

Default Re: Register Custom Task automatically - 07-04-2003 , 09:59 AM




"Frank Matthiesen" <fm (AT) xax (DOT) de> wrote

<snip> Link:
Quote:
http://msdn.microsoft.com/library/de...us/dnsql2k/htm
l/dts_overview.asp

I think it means the manual way using the "Register Custom Task" menu item
within the designer.

Quote:
Anyway:
Do you got a little code snippet/some infos about the registry entries fpr
me?
Not with me now, I'll try and dig something out later.

Quote:
Wich entries are needed?
Pretty much as per the books online topic.

Do i need to refresh the cache after registering
Quote:
the new task?

Yes, pretty sure you would, but cannot remember to be honest.


--
Darren Green
http://www.sqldts.com





Reply With Quote
  #5  
Old   
Frank Matthiesen
 
Posts: n/a

Default Re: Register Custom Task automatically - 07-04-2003 , 11:40 AM




"Darren Green" >
Quote:
Not with me now, I'll try and dig something out later.

Wich entries are needed?
Pretty much as per the books online topic.

Do i need to refresh the cache after registering
the new task?
Doesn't matter. I will setup regmon,register some custom task and will see.
Should be possible to get the needed entries.

best regards from bextown/germany

do you interest in beer, do you?


Frank






Reply With Quote
  #6  
Old   
Darren Green
 
Posts: n/a

Default Re: Register Custom Task automatically - 07-05-2003 , 03:36 AM



In article <be4aks$13c18$1 (AT) ID-151790 (DOT) news.dfncis.de>, Frank Matthiesen
<fm (AT) xax (DOT) de> writes
Quote:
"Darren Green"
Not with me now, I'll try and dig something out later.

Wich entries are needed?
Pretty much as per the books online topic.

Do i need to refresh the cache after registering
the new task?

Doesn't matter. I will setup regmon,register some custom task and will see.
Should be possible to get the needed entries.

best regards from bextown/germany

do you interest in beer, do you?

Of course!

I used Visual Studio Installer (VSI) to create my MSI packages, from a
VB project. I set the compiled DLL to self-register, and also add the
following registry keys manually to the VSI solution-

HKEY_CLASSES_ROOT
-----------------

Key: CLSID\{Class ID for Component.CTaskClass}

Name: (default)
Value: Component.CTaskClass
Type: String

Name: AppID
Value: {Class ID for Component.CTaskClass}
Type: String

Name: DTSIconFile
Value: \path\iconfile.ext|\path\customtask.dll
Type: String

Name: DTSIconIndex
Value: 0
Type: DWORD

Name: DTSTasKDescription
Value: Default Task Description
Type: String


Key: CLSID\{Class ID for Component.CTaskClass}\Implemented
Categories\{Class ID for DTS Library}

HKEY_CURRENT_USER
-----------------
(SQL Server 2000 Only)

Key: SOFTWARE\Microsoft\Microsoft SQL
Server\80\DTS\Enumeration\Tasks\{Class ID for Component.CTaskClass}

HKEY_LOCAL_MACHINE
------------------
Same keys and values as HKEY_CLASSES_ROOT above


I'm not that good on COM, but if you register the custom task manually,
and then use the "OLE View" tool that comes with Visual Studo 6..0 you
will see a nice section for custom tasks. Compare yours with the others
for interest, and it will also give your the CLSID.

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com




Reply With Quote
  #7  
Old   
Frank Matthiesen
 
Posts: n/a

Default Re: Register Custom Task automatically - 08-20-2003 , 05:21 PM



In News-Entry:ZhOrSZC$TwB$Ewt5 (AT) sqldts (DOT) com,
wrote Darren Green

Quote:
Let me know how you get on, and how you actually write the install
routine.

Hi Darren,

i figured it out. I've coded know the whole customtask in vb.net.
There is know no need to execute the task on the main thread and it does not
suffer from thread affinity
Below there is a sample template (from Microsoft) to register the task
automatically.

kind regards from

bremen / germany

Frank

<template>
Windows Registry Editor Version 5.00HKEY_CLASSES_ROOT\CLSID\{<The
GUID>}]@="<The Prog ID>""AppID"="{<The GUID>}""DTSIconFile"="<Path to the
DLL>""DTSIconIndex"=dword:00000000"DTSTaskDescript ion"="<The Task
Description>" [HKEY_CLASSES_ROOT\CLSID\{<The GUID>}\Implemented Categories]
[HKEY_CLASSES_ROOT\CLSID\{<The GUID>}\Implemented Categories\
{10020200-EB1C-11CF-AE6E-00AA004A34D5}] [HKEY_CLASSES_ROOT\CLSID\{<The
GUID>}\Implemented Categories\ {40FC6ED5-2438-11CF-A3DB-080036F12502}]
[HKEY_CLASSES_ROOT\CLSID\{<The GUID>}\InprocServer32]@="<Path to the
DLL>""ThreadingModel"="Both" [HKEY_CLASSES_ROOT\CLSID\{<The
GUID>}\ProgID]@="<The PROGID>" [HKEY_CLASSES_ROOT\CLSID\{<The
GUID>}\Programmable] [HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL
Server \80\DTS\Enumeration\Tasks\<The GUID>]@="<The PROGID>"</template>




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.