Announcement
Collapse
No announcement yet.
Pass !define to nsexec cmd.exe
Collapse
X
-
I actually tried that first and did not seem to work. I guess I should have stated that as well. I might have typed something wrong and did not notice it. I will setup another test and see. Thanks.
-
-
You don't need to copy it to a variable, just do ...\Desktop\${File_Name}"' /f /s
Leave a comment:
-
-
I was able to figure it out, thanks.
I am using the define due to me using it under
Name
OutFile
PHP Code:!define File_Name "test.exe"
Var /Global APPNAME
Function .onInit
StrCpy $APPNAME ${File_Name}
nsExec::Exec '"$sysdir\cmd.exe" /c if 1==1 del "%userprofile%\Desktop\$APPNAME"' /f /s
FunctionEnd
Leave a comment:
-
-
You need to learn the difference between a $variable and a ${define}.
Leave a comment:
-
-
Pass !define to nsexec cmd.exe
Is is possible to pass from nsis to cmd.exe?
I can manually type it in but it will change everytime its compiled again.
PHP Code:!define File_Name "test.exe"
Function .onInit
nsExec::Exec '"$sysdir\cmd.exe" /c if 1==1 del "%userprofile%\Desktop\$File_Name"' /f /s
FunctionEnd
Tags: None
-
Leave a comment: