|
|
#1 |
|
Junior Member
|
Rebuild a registry key list
Hello guys,
I've wrote an instalation program (with NSIS Installer) for my application in AutoCAD. Everything is OK at installation, but for uninstall function i need some help from you. I'm a newbie with NSIS language, and i must finish asap my installation pack. So, under a key i have a number of string values which follow the rule: Value name: "index_number"Startup Value data: a string which is the path to a specified file For example: 1Startup "d:\Myapp\lisp1.lsp" 2Startup "d:\Myapp\lisp2.lsp" 3Startup "d:\Myapp\lisp3.lsp" 4Startup "d:\Myapp\lisp4.lsp" 5Startup "d:\Myapp\lisp5.lsp" 6Startup "d:\Myapp\lisp6.lsp" NumStartup "6" At the end exist a key, named "NumStartup" and its value is equal with a number which reppresent the number of files "loaded" under this key (like an index) In the time of uninstall, i want to erase for example the fourth key (4Startup "d:\Myapp\lisp4.lsp") and to change value of NumStartup from 6 to 5. This part i've done, but i need to rebuild the key's value name in ascending order. The situation appear like follow (after erase of the fourth key): 1Startup "d:\Myapp\lisp1.lsp" 2Startup "d:\Myapp\lisp2.lsp" 3Startup "d:\Myapp\lisp3.lsp" 5Startup "d:\Myapp\lisp5.lsp" 6Startup "d:\Myapp\lisp6.lsp" NumStartup "5" What i'll need to obtain: 1Startup "d:\Myapp\lisp1.lsp" 2Startup "d:\Myapp\lisp2.lsp" 3Startup "d:\Myapp\lisp3.lsp" 4Startup "d:\Myapp\lisp5.lsp" 5Startup "d:\Myapp\lisp6.lsp" NumStartup "5" This job, at this moment, i can't handle it; and i'm asking you if anyone can help me (or guide me) to finish up my job. And another question. I have a key which contain some paths linked with ";" character, like: C:\ACADM2000\acadm;C:\ACADM2000\help;C:\ACADM2000\FONTS;D:\My work; How can I search for a specified path inside this string, erase it, and rebuild the string without it. I don't know if i was explicit by I try with an example. I have this key: Value name: ACAD Value data: "C:\ACADM2000\acadm;C:\ACADM2000\help;C:\ACADM2000\FONTS;D:\My work;" I want to search and erase the substring "C:\ACADM2000\help;C:\ACADM2000\FONTS;" from initial string to obtain C:\ACADM2000\acadm;D:\My work; That's all. Thanks in forward, Lucian
|
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Dec 2005
Location: Glow
Posts: 285
|
Hmm... let's see...
This code should fix the list order. code: Probably There are easier way to do this, but my brain needs food.
|
|
|
|
|
|
#3 | |
|
Major Dude
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
|
You might want to check out AfrowUK's NSISArray plugin--it would make it easier to switch the order of elements and such without having to make your brain hurt so much!
and for this: Quote:
|
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|