Hello Everybody.
I have a problem with my installer I try to use two pluggins but they use the same variable $1 How can I change this variable?
I need to use this pluggins for my installer
FontName.nsh
FileFunc.nsh
WriteEnvStr.nsh
Problem with pluggins
14 posts
In what way are they using $1? Do they use it internally, or by how you are using them?
Some sample code would help us identify the problem and produce a solution.
-Stu
Some sample code would help us identify the problem and produce a solution.
-Stu
Hello I send you the code of my installer
Sorry a forget the file. But I send you.
The file contains my intaller and the pluggins that I used
The file contains my intaller and the pluggins that I used
I still don't understand what the problem is. You aren't even using $1 in any of your own code and the BgImage plugin doesn't use it.
If you want to use $1 in your script and find that something is changing its value, just use a different variable or perhaps create your own with the Var instruction.
-Stu
If you want to use $1 in your script and find that something is changing its value, just use a different variable or perhaps create your own with the Var instruction.
-Stu
Thanks a lot I sorted out the problem with my installer. but I have another problem, when I try to create a Shortcut with this instruction
CreateShortCut "$DESKTOP\SIG-TC ZMVM.lnk" "$BLA" ""
The variable $BLA contains the value
"C:\Archivos de programa\TransCAD\tcw.exe" -q -a C:\SIG-TC\compilacion\gis-tc -ai SIG-TC -n "SIG-Transporte de carga ZMVM"
But when the installer creates the shortcut on the DESKTOP, it has this value:
"C:\"C:\Archivos de programa\TransCAD\tcw.exe" -q -a C:\SIG-TC\compilacion\gis-tc -ai SIG-TC -n "SIG-Transporte de carga ZMVM" "
How I can clear value "C:\ at the begining of the string and " in the last part?
CreateShortCut "$DESKTOP\SIG-TC ZMVM.lnk" "$BLA" ""
The variable $BLA contains the value
"C:\Archivos de programa\TransCAD\tcw.exe" -q -a C:\SIG-TC\compilacion\gis-tc -ai SIG-TC -n "SIG-Transporte de carga ZMVM"
But when the installer creates the shortcut on the DESKTOP, it has this value:
"C:\"C:\Archivos de programa\TransCAD\tcw.exe" -q -a C:\SIG-TC\compilacion\gis-tc -ai SIG-TC -n "SIG-Transporte de carga ZMVM" "
How I can clear value "C:\ at the begining of the string and " in the last part?
Try using ' around the value.
'"C:\Archivos de programa\TransCAD\tcw.exe" -q -a C:\SIG-TC\compilacion\gis-tc -ai SIG-TC -n "SIG-Transporte de carga ZMVM"'
CreateShortCut requires the parameters to be separate from the target path:
CreateShortCut
link.lnk target.file [parameters [icon.file [icon_index_number [start_options [keyboard_shortcut [description]]]]]]
Where does your target path come from exactly?
Is it a constant value set at compile time or a path read from somewhere at run time?
-Stu
CreateShortCut
link.lnk target.file [parameters [icon.file [icon_index_number [start_options [keyboard_shortcut [description]]]]]]
Where does your target path come from exactly?
Is it a constant value set at compile time or a path read from somewhere at run time?
-Stu
Hello
I send you a basic example, it only creates a Shortcut on the desktop.
In the code I read from the registry, this value is the target path that I want in the shortcut, but I don't know why in the shorcut the value appears like this:
"C:\"C:\Archivos de programa\Microsoft Office\OFFICE11\WINWORD.EXE" \n \dde"
And the correct path is:
"C:\Archivos de programa\Microsoft Office\OFFICE11\WINWORD.EXE" \n \dde
Thanks a lot for help me
I send you a basic example, it only creates a Shortcut on the desktop.
In the code I read from the registry, this value is the target path that I want in the shortcut, but I don't know why in the shorcut the value appears like this:
"C:\"C:\Archivos de programa\Microsoft Office\OFFICE11\WINWORD.EXE" \n \dde"
And the correct path is:
"C:\Archivos de programa\Microsoft Office\OFFICE11\WINWORD.EXE" \n \dde
Thanks a lot for help me
Well like I've already said, CreateShortCut must be like the following:
CreateShortCut "icon file.lnk" "target file.exe" "parameters"
Use this function to get the path in the quotes:
If you need the parameters as well, I can probably update the function to return the rest of the string not in quotes (in this case it'd be the parameters).
CreateShortCut "icon file.lnk" "target file.exe" "parameters"
Use this function to get the path in the quotes:
If you need the parameters as well, I can probably update the function to return the rest of the string not in quotes (in this case it'd be the parameters).
-StuReadRegStr $R0 HKLM SOFTWARE\Classes\Applications\WINWORD.EXE\shell\edit\command ""
Push $R0
Call GetInQuotes
Pop $R0
CreateShortCut "$DESKTOP\TEST.lnk" $R0
Hello Again Thaks a lot for help me.
I did all that you said me. but the target path now is:
"C:\Archivos de programa\Microsoft Office\OFFICE11\WINWORD.EXE"
and the correct is
"C:\Archivos de programa\Microsoft Office\OFFICE11\WINWORD.EXE" \n \dde
How can I obtain the rest of the string not in quotes?
I send you again my code
Thanks
I did all that you said me. but the target path now is:
"C:\Archivos de programa\Microsoft Office\OFFICE11\WINWORD.EXE"
and the correct is
"C:\Archivos de programa\Microsoft Office\OFFICE11\WINWORD.EXE" \n \dde
How can I obtain the rest of the string not in quotes?
I send you again my code
Thanks
Code of TEST
Assuming that the path part of the string you read from registry is always in quotes...
!include "StrFunc.nsh"
${StrStrAdv}
Name "Test"
OutFile "Test.exe"
Section ""
ReadRegStr $0 HKLM SOFTWARE\Classes\Applications\WINWORD.EXE\shell\edit\command ""
${StrStrAdv} $R0 $0 "$\" " > < 1 0 0 #get path
${StrStrAdv} $R1 $0 "$\" " > > 0 0 0 #get the rest
StrCpy $R0 $R0 -1 #trim ending space character from path
CreateShortCut "$DESKTOP\TEST.lnk" $R0 $R1
SectionEnd
Thanks for help me. My installer is OK