Old 1st November 2007, 14:26   #1
chamakits
Junior Member
 
Join Date: Oct 2007
Posts: 10
Registry update

Hey guys. I'm having some big problems with the registry.
The program for which i'm doing an installer, had already been installed into a few of our clients computers. That version however is highly outdated, and the previous installer was...well...hard-coded to work. The thing is, right now, the .ocx and the .dll that it used and still uses have change where they are placed. And here comes my problem. Before just registering my .dll and my .ocx, I want to find if the .dll and the .ocx are already registered. If they are, I want to delete those entries, and write my new ones. If they aren't, then just register them. For example, right now, MSWINSCK.OCX had not been properly registered, because it was already registered in the computer where I was testing, but since it changed folder, the program wouldn't run properly.

Any help would be greatly appreciated. Thanks in advance.
chamakits is offline   Reply With Quote
Old 1st November 2007, 17:06   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
If the registry settings are wrong anyway, just delete them and let the new registration process properly recreate them.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 1st November 2007, 17:23   #3
chamakits
Junior Member
 
Join Date: Oct 2007
Posts: 10
Yeah, but the thing is, these are clients computers.
I can't go to them and one by one delete all these entries.
I want to be able to search through the registry, find the key, delete it, and register the new one.

I'm working on a script to do with NSIS, so, I may have it solved, but I'm having some trouble with EnumRegValue and EnumRegKey. But i think i'll get this done soon
chamakits is offline   Reply With Quote
Old 1st November 2007, 17:28   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Why would you need to search the registry if you a well defined set of registered controls? If you know what you've registered the last time, you can easily find out what to remove.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 1st November 2007, 17:38   #5
chamakits
Junior Member
 
Join Date: Oct 2007
Posts: 10
Thats just it.
The previous version of the program wasn't done by me.
Not only that, but since there wasn't much of a formal installer, the program isn't uniform between all our clients, meaning that in different client's computers, the dlls and ocx's may be somewhere different.
chamakits is offline   Reply With Quote
Old 1st November 2007, 17:44   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
But you can still tell which registry keys it updates. Running RegMon in the background, while executing the old installer, might be a good start.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 1st November 2007, 17:56   #7
chamakits
Junior Member
 
Join Date: Oct 2007
Posts: 10
I know which keys I want to update. What I don't know is where they are registered in the registry, and not even exactly sure where they are located in the computer.

Hm... If I did a script with NSIS that searches in the folders for those .dlls and .ocx, can i use UnRegDLL knowing their path?
chamakits is offline   Reply With Quote
Old 1st November 2007, 17:58   #8
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Yes, you can UnregDLL them once you find them. But I'd recommend you find out using RegMon which registry keys they update first. One of those keys may even tell you where the DLL is located.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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

Forum Jump