really needs to get done
Hey I am having problems with my installer. I added a new page to edit a Registry file. This is before it is put into regedit. I get to this point and it stalls the installer. I was wondering if anyone can tell me how to fix this. Here is my code....
I really need this to be finished up as soon as possible so any info would be greatly apreciated. Thanks
;show regEdit gui---------------------------
Function regEdit
!insertmacro MUI_HEADER_TEXT "Edit the Registry," "read instruction below for this step."
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "RegEditing.ini"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "RegEditing.ini"
FunctionEnd
;-----------------------------------------------------
;Edit Generic NBC Reg Key------------------------------
Function leaveRegEdit
ReadINIStr $7 "$PLUGINSDIR\Regedit.ini" "Field 2" "State"
ReadINIStr $6 "$PLUGINSDIR\Regedit.ini" "Field 1" "State"
Call Regedit1
Call Regedit2
FunctionEnd
;------------------------------------------------------------
;------------------------------------------------------------
Function Regedit1
StrCpy $0 "$6" # set your custom string
StrCpy $1 "/" # set the character to insert
StrLen $2 $0 # get the length of your string to loop through it
StrCpy $3 "0" # init the loop counter
StrCpy $4 "" # init output var
loop: # begin of the loop
StrCpy $5 $0 1 $3 # copy one character of your string to a temp var (offset $3 counts up)
StrCpy $4 "$4$1$5" # add the character extracted and the one to insert everytime
IntOp $3 $3 + 1 # increase counter/offset
IntCmp $2 $3 end loop #stop the loop if end of string reached, else continue
end:
# at this stage, $4 will be "/C/o/m/p/a/n/y"
Push "/I/I/M/S" #text to be replaced
Push $4 #replace with
Push all #replace all occurrences
Push all #replace all occurrences
Push "$INSTDIR\WARN\Dashboard\NBC\Generic NBC reg keys.reg" #file to replace in
Call AdvReplaceInFile
FunctionEnd
;------------------------------------------------------------
;------------------------------------------------------------
Function Regedit2
StrCpy $0 "$7" # set your custom string
StrCpy $1 "/" # set the character to insert
StrLen $2 $0 # get the length of your string to loop through it
StrCpy $3 "0" # init the loop counter
StrCpy $4 "" # init output var
loop1: # begin of the loop
StrCpy $5 $0 1 $3 # copy one character of your string to a temp var (offset $3 counts up)
StrCpy $4 "$4$1$5" # add the character extracted and the one to insert everytime
IntOp $3 $3 + 1 # increase counter/offset
IntCmp $2 $3 end loop1 #stop the loop if end of string reached, else continue
end:
# at this stage, $4 will be "/C/o/m/p/a/n/y"
Push "/C/A/S/P/O/D" #text to be replaced
Push $4 #replace with
Push all #replace all occurrences
Push all #replace all occurrences
Push "$INSTDIR\WARN\Dashboard\NBC\Generic NBC reg keys.reg" #file to replace in
Call AdvReplaceInFile
FunctionEnd
;------------------------------------------------------