.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Registry Entry In Setup Project

17 REPLIES 17
Reply
Message 1 of 18
vampirefromtheITcave2
764 Views, 17 Replies

Registry Entry In Setup Project

I wrote an AutoCAD plugin that needs to be available as soon as AutoCAD starts, so I need to modify the registry. The problem is that I need to install this plugin on about 100 computers, using multiple versions of AutoCAD. I'm using a Visual Studio setup project to install the program on all of these computers and I don't want to make a different setup project for each version of AutoCAD. Since the registry entry is different for each version of AutoCAD, I need a way to change the entry in my project so that it works for all of them. I only need it to be compatible with 2007 and newer versions. Does anyone know how to make this work?
17 REPLIES 17
Message 2 of 18
Anonymous
in reply to: vampirefromtheITcave2

You have to write a custom action for your installer that
queries the registry to see what's installed on the PC.

Building a working deployment for an AutoCAD plugin is
a nightmare, and Visual Studio's MSI-based deployment
architecture is a stinking pile of garbage, that only works
for the simplest scenarios (e.g., Windows executables
that's are not dependent on anything else).

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6339931@discussion.autodesk.com...
I wrote an AutoCAD plugin that needs to be available as soon as AutoCAD starts,
so I need to modify the registry. The problem is that I need to install this
plugin on about 100 computers, using multiple versions of AutoCAD. I'm using a
Visual Studio setup project to install the program on all of these computers and
I don't want to make a different setup project for each version of AutoCAD.
Since the registry entry is different for each version of AutoCAD, I need a way
to change the entry in my project so that it works for all of them. I only need
it to be compatible with 2007 and newer versions. Does anyone know how to make
this work?
Message 3 of 18
Anonymous
in reply to: vampirefromtheITcave2

Hi vampirefromtheitcave2,

If you look at Inno Setup, You can do this easily.

You simply create a series of "pascal script" functions like.

{code}
function R2007AutoCADFound(): Boolean;
begin
Result := RegValueExists( HKLM,
'SOFTWARE\Autodesk\AutoCAD\R17.0\ACAD-5001:409','ProductName')
end;

function R2008AutoCADFound(): Boolean;
begin
Result := RegValueExists( HKLM,
'SOFTWARE\Autodesk\AutoCAD\R17.1\ACAD-6001:409','ProductName')
end;

{code}

You can debug these by stepping through the setup script as needed.
Once satisfactorily debugged move them to an "Include' file for future use

I keep these in a file: "FindAutoCADVersions.pas" which I attached to a
project with:

#include "C:\Installation\__PAS Files\FindAutoCADVersions.pas"

You can then control actions of the Inno Setup script by using the
return from these functions.

eg control copying a file. The Check controls whether the file is copied
and in this case it will only be copied if R2009Civil 3D is found
The {code:GetCivil2009ProgramDir}calls a function which returns a path
to the Civil 3D Program folder

Source: "C:\Installation\LoadMyC3D2009Menu.lsp"; DestDir:
"{code:GetCivil2009ProgramDir}\support\temp\"; Flags: ignoreversion
external; Check: R2009Civil3DFound

I'm sure there are better ways, but I use Inno Setup to append code to
Acad.lsp.

This code checks if the "LoadMyC3D2009Menu.lsp" file exists, runs it if
it does then deletes it.

LoadMyC3D2009Menu.lsp does just what it implies and saves a workspace
containing the new menu items.


Regards,


Laurie Comerford


vampirefromtheitcave2 wrote:
> I wrote an AutoCAD plugin that needs to be available as soon as AutoCAD starts, so I need to modify the registry. The problem is that I need to install this plugin on about 100 computers, using multiple versions of AutoCAD. I'm using a Visual Studio setup project to install the program on all of these computers and I don't want to make a different setup project for each version of AutoCAD. Since the registry entry is different for each version of AutoCAD, I need a way to change the entry in my project so that it works for all of them. I only need it to be compatible with 2007 and newer versions. Does anyone know how to make this work?
>
Message 4 of 18

I don't think I fully understand how to do this. I went to the Inno Setup site and did some research, tried to find Pascal guides and everything, but I wasn't able to make myself understand how to do this any better. I guess I could just manually update all of the registries, but like I said that's gonna be a huge pain. If I'm not saving myself any time though, I guess I should just do it that way.

Is there a list of the registry identifiers anywhere? I came across a 5005:409 today and I'm not sure what that means.

Thanks.
Message 5 of 18
Anonymous
in reply to: vampirefromtheITcave2

Hi vampirefromtheitcave2,

The Inno Web site is not highly informative for learning to use the program.

The best approach to using it is to download the ISTool install. ISTool
is an add on for using the program which makes it much easier for
writing the scripts.

There are other web sites which have lots of information. Also the
sample code provided with the program is very extensive.

There are very active and helpful newsgroups for discussion of how to
use the program.

Autodesk registry identifiers.

The 409 value indicates the English language. Other languages have
other values
5000, 6000, 7000 etc are Civil 3D
5001, 6001, 7001 etc are plain AutoCAD
5002, 6002, 7002 etc are Map

The pattern for other products should be obvious, but I don't know their
values.

The 17.0
17.1
17.2
values are for the R2007 drawing format and represent
R2007, R2008 and R2009

The 5005:409 value you quote would be an English language R2007 version
of ??

Lastly, I've given you all the Pascal script you will need except for
writing to the Acad.lsp file. All you need do is copy it and put in the
appropriate numbers. If you can code .NET, then you should be able to
deal with a simple language like this

Regards,


Laurie Comerford

vampirefromtheitcave2 wrote:
> I don't think I fully understand how to do this. I went to the Inno Setup site and did some research, tried to find Pascal guides and everything, but I wasn't able to make myself understand how to do this any better. I guess I could just manually update all of the registries, but like I said that's gonna be a huge pain. If I'm not saving myself any time though, I guess I should just do it that way.
>
> Is there a list of the registry identifiers anywhere? I came across a 5005:409 today and I'm not sure what that means.
>
> Thanks.
>
Message 6 of 18

Ok thanks
Message 7 of 18
Anonymous
in reply to: vampirefromtheITcave2

I'm not sure why you're paying attention to what this idiot is telling you.

Anyone who thinks that a deployment strategy that involves modifying the end
user's Acad.lsp file is acceptable, is incompetent, and should have nothing to
do with any kind of software engineering.

I told you that you need to research writing custom actions for Visual Studio
deployment projects, which is how a Visual Studio deployment project allows you
inject your own custom code into the installation process.

A custom action is nothing but a managed assembly that has an entry point that
is called by the installer (it is called for both installation and for
uninstallation). Visual Studio can create custom actions for you from within
your deployment project.

When a custom action code is loaded and called by the installer, it can access
various parameters for the installation, such as the user-chosen install folder.

The custom action can be used to write your registry entries (keep in mind that
in order to write to HKEY_LOCAL_MACHINE, the user must have administrator
rights).

That is how you are supposed to do it, and I would strongly urge you to
disregard the bad advice being offered by the the resident moron.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6341865@discussion.autodesk.com...
Ok thanks
Message 8 of 18
Anonymous
in reply to: vampirefromtheITcave2

Hi Tony,

You missed a few things:

There are lots of ways of doing things with software. The optimum
solution is often the one which:

a) works
b) can be implemented economically within the time and resources available

This is not always the theoretical ideal model as it would be
implemented by someone with years of training and background knowledge.

The method I described is simple to implement and it works reliably. It
adds an immeasurably small overhead to the AutoCAD startup.

I noted that there are other methods for those that want to go through
the exercise of finding them, investigating them and implementing them,
but reading that and understanding that is clearly beyond your
prejudiced mind. You just see a name on your hate list and pull out
your abuse set.

You are so blind to anything that does not fit in your tiny world view
that all you can do is offer abuse. Why don't you re-visit your
psychiatrist and get some help to grow up?

Perhaps you'd care to read the Newsgroup guidelines and confine yourself
to offering help.


Regards,


Laurie Comerford

Tony Tanzillo wrote:
> I'm not sure why you're paying attention to what this idiot is telling you.
>
> Anyone who thinks that a deployment strategy that involves modifying the end
> user's Acad.lsp file is acceptable, is incompetent, and should have nothing to
> do with any kind of software engineering.
>
> I told you that you need to research writing custom actions for Visual Studio
> deployment projects, which is how a Visual Studio deployment project allows you
> inject your own custom code into the installation process.
>
> A custom action is nothing but a managed assembly that has an entry point that
> is called by the installer (it is called for both installation and for
> uninstallation). Visual Studio can create custom actions for you from within
> your deployment project.
>
> When a custom action code is loaded and called by the installer, it can access
> various parameters for the installation, such as the user-chosen install folder.
>
> The custom action can be used to write your registry entries (keep in mind that
> in order to write to HKEY_LOCAL_MACHINE, the user must have administrator
> rights).
>
> That is how you are supposed to do it, and I would strongly urge you to
> disregard the bad advice being offered by the the resident moron.
>
>
Message 9 of 18
Anonymous
in reply to: vampirefromtheITcave2

I'm not going to denigrate myself by having a discussion with someone that lacks
the basic skills and competence needed to understand why what they only seem to
think 'works', really doesn't work.

You really don't have the skills or experience needed to adivise anyone here,
yet you keep trying to disprove that and with every attempt, you do exactly the
opposite - to further confirm it.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

"Laurie" wrote in message
news:6341961@discussion.autodesk.com...
Hi Tony,

You missed a few things:

There are lots of ways of doing things with software. The optimum
solution is often the one which:

a) works
b) can be implemented economically within the time and resources available

This is not always the theoretical ideal model as it would be
implemented by someone with years of training and background knowledge.

The method I described is simple to implement and it works reliably. It
adds an immeasurably small overhead to the AutoCAD startup.

I noted that there are other methods for those that want to go through
the exercise of finding them, investigating them and implementing them,
but reading that and understanding that is clearly beyond your
prejudiced mind. You just see a name on your hate list and pull out
your abuse set.

You are so blind to anything that does not fit in your tiny world view
that all you can do is offer abuse. Why don't you re-visit your
psychiatrist and get some help to grow up?

Perhaps you'd care to read the Newsgroup guidelines and confine yourself
to offering help.


Regards,


Laurie Comerford

Tony Tanzillo wrote:
> I'm not sure why you're paying attention to what this idiot is telling you.
>
> Anyone who thinks that a deployment strategy that involves modifying the end
> user's Acad.lsp file is acceptable, is incompetent, and should have nothing to
> do with any kind of software engineering.
>
> I told you that you need to research writing custom actions for Visual Studio
> deployment projects, which is how a Visual Studio deployment project allows
> you
> inject your own custom code into the installation process.
>
> A custom action is nothing but a managed assembly that has an entry point that
> is called by the installer (it is called for both installation and for
> uninstallation). Visual Studio can create custom actions for you from within
> your deployment project.
>
> When a custom action code is loaded and called by the installer, it can access
> various parameters for the installation, such as the user-chosen install
> folder.
>
> The custom action can be used to write your registry entries (keep in mind
> that
> in order to write to HKEY_LOCAL_MACHINE, the user must have administrator
> rights).
>
> That is how you are supposed to do it, and I would strongly urge you to
> disregard the bad advice being offered by the the resident moron.
>
>
Message 10 of 18

I would just like to chime in and say that custom actions was the most effective for me. Good luck to you.
Message 11 of 18
Anonymous
in reply to: vampirefromtheITcave2

Hi Tony,

You don't want to get into an argument. Ha Ha!! Your ridiculous posts
lead to more useless argumentative posts on this newsgroup than any
other 10 people combined. If you actually knew how to discuss a factual
item without attacking other posters or hiding behind bluster, then this
and many other posts would be totally superfluous.

You far prefer to make ludicrous statements about which you know nothing
and hope the person at the far end will bow to your "superior" opinion.

The system I described does work and nothing you allege can change that
fact.

You're right about the fact that I don't have much in the line of .NET
skills. I'm in learning mode and will post some queries in due course,
but then I don't offer advise about .NET.


Regards,


Laurie Comerford

Tony Tanzillo wrote:
> I'm not going to denigrate myself by having a discussion with someone that lacks
> the basic skills and competence needed to understand why what they only seem to
> think 'works', really doesn't work.
>
> You really don't have the skills or experience needed to adivise anyone here,
> yet you keep trying to disprove that and with every attempt, you do exactly the
> opposite - to further confirm it.
>
>
Message 12 of 18
Anonymous
in reply to: vampirefromtheITcave2

Laurie - Only idiots argue with idiots.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

"Laurie" wrote in message
news:6342627@discussion.autodesk.com...
Hi Tony,

You don't want to get into an argument. Ha Ha!! Your ridiculous posts
lead to more useless argumentative posts on this newsgroup than any
other 10 people combined. If you actually knew how to discuss a factual
item without attacking other posters or hiding behind bluster, then this
and many other posts would be totally superfluous.

You far prefer to make ludicrous statements about which you know nothing
and hope the person at the far end will bow to your "superior" opinion.

The system I described does work and nothing you allege can change that
fact.

You're right about the fact that I don't have much in the line of .NET
skills. I'm in learning mode and will post some queries in due course,
but then I don't offer advise about .NET.


Regards,


Laurie Comerford

Tony Tanzillo wrote:
> I'm not going to denigrate myself by having a discussion with someone that
> lacks
> the basic skills and competence needed to understand why what they only seem
> to
> think 'works', really doesn't work.
>
> You really don't have the skills or experience needed to adivise anyone here,
> yet you keep trying to disprove that and with every attempt, you do exactly
> the
> opposite - to further confirm it.
>
>
Message 13 of 18

Check this out. The installer to this application does just what you need by means of a custom action. It first detects whether Autocad is installed and whether it is the correct version, then moves the application's libraries from the installer target folder to the corresponding Autocad installation folder. Additionally it creates the registry keys for autoload on demand.

For Autocad 2007. Net Framework 2.0 required
http://klbostoragearea.com/klbostoragearea/KLBO%20Store/programas/KLBO_Profile2007.msi

For Autocad 2008. Net Framework 2.0 required
http://klbostoragearea.com/klbostoragearea/KLBO%20Store/programas/KLBO_Profile2008.msi

For Autocad 2009. Net Framework 3.0 required
http://klbostoragearea.com/klbostoragearea/KLBO%20Store/programas/KLBO_Profile2009.msi

For Autocad 2010. Net Framework 3.5 required
http://klbostoragearea.com/klbostoragearea/KLBO%20Store/programas/KLBO_Profile2010.msi
Message 14 of 18
Anonymous
in reply to: vampirefromtheITcave2

Your links are to .msi files your application.

I don't see what use they are to the OP or others
who would like to know how to build a deployment
with a custom action.

What's the point, aside from promoting your app?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6343453@discussion.autodesk.com...
Check this out. The installer to this application does just what you need by
means of a custom action. It first detects whether Autocad is installed and
whether it is the correct version, then moves the application's libraries from
the installer target folder to the corresponding Autocad installation folder.
Additionally it creates the registry keys for autoload on demand.

For Autocad 2007. Net Framework 2.0 required
http://klbostoragearea.com/klbostoragearea/KLBO%20Store/programas/KLBO_Profile2007.msi

For Autocad 2008. Net Framework 2.0 required
http://klbostoragearea.com/klbostoragearea/KLBO%20Store/programas/KLBO_Profile2008.msi

For Autocad 2009. Net Framework 3.0 required
http://klbostoragearea.com/klbostoragearea/KLBO%20Store/programas/KLBO_Profile2009.msi

For Autocad 2010. Net Framework 3.5 required
http://klbostoragearea.com/klbostoragearea/KLBO%20Store/programas/KLBO_Profile2010.msi
Message 15 of 18

In the middle of this dispute, it does confirm that custom actions is the way to go ... in not so many words. Besides, if that's what he needs, he's free to ask.
Message 16 of 18
Anonymous
in reply to: vampirefromtheITcave2

Oh, and BTW, the custom action in your installer doesn't
roll back and abort the installation if it detects that AutoCAD
is not installed.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6343453@discussion.autodesk.com...
Check this out. The installer to this application does just what you need by
means of a custom action. It first detects whether Autocad is installed and
whether it is the correct version, then moves the application's libraries from
the installer target folder to the corresponding Autocad installation folder.
Additionally it creates the registry keys for autoload on demand.

For Autocad 2007. Net Framework 2.0 required
http://klbostoragearea.com/klbostoragearea/KLBO%20Store/programas/KLBO_Profile2007.msi

For Autocad 2008. Net Framework 2.0 required
http://klbostoragearea.com/klbostoragearea/KLBO%20Store/programas/KLBO_Profile2008.msi

For Autocad 2009. Net Framework 3.0 required
http://klbostoragearea.com/klbostoragearea/KLBO%20Store/programas/KLBO_Profile2009.msi

For Autocad 2010. Net Framework 3.5 required
http://klbostoragearea.com/klbostoragearea/KLBO%20Store/programas/KLBO_Profile2010.msi
Message 17 of 18

Unellegant way of aborting installation indeed.
Thanks for your notes
Message 18 of 18
Anonymous
in reply to: vampirefromtheITcave2

You need to invoke your custom action (or a second one
that just checks for what AutoCAD's are installed) at an
earlier stage.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6343566@discussion.autodesk.com...
Unellegant way of aborting installation indeed.
Thanks for your notes

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost