I can't for the life of me figure out why this call to DoInstall doesn't work.
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
DoInstall Problem
Started by
spdygnlz
, Mar 15 2006 22:33
1 reply to this topic
Posted 15 March 2006 - 22:33
CODE |
szProductName = "DSStudio"; svFileName = SRCDIR ^ szProductName ^ "Setup.inx"; LongPathToQuote(svFileName, FALSE); szCmd = "Suite"; //Suite switch - makes it not display the UI if (Is(FILE_EXISTS, svFileName)) then MessageBox("The file: " + svFileName + " exists", INFORMATION); else MessageBox("The file: " + svFileName + " does not exist", INFORMATION); endif; nResult = DoInstall (svFileName, szCmd, WAIT); if (nResult < 0) then szError = FormatMessage(nResult); MessageBox(szError, SEVERE); endif; |
Every time I try to run it, the Is(FILE_EXISTS, svFileName) returns TRUE and the the file is found. I verified that the file actually exists manually, too. When I try to call DoInstall() on the file, it keeps throwing a -2147024893 error (The system cannot find the path specified.). I've tried to add quotes to the path, remove quotes from the path, remove spaces from the path, add spaces to the path, etc.
Can anyone see what I am doing wrong?
-- spdygnlz --
Posted 16 March 2006 - 00:55
Ok, I finally figured it out after about 8 hours of moving it around, putting quotes, passing empty parameters and stuff. I realized that the .inx file that I was trying to call was somehow corrupted. I rebuilt that project and everything worked as expected.
Not the first time that I've had misleading error messages from IS. I mean really, how could I guess that the install file was corrupt when it is telling me that there's something wrong with the path? Sheesh!
Not the first time that I've had misleading error messages from IS. I mean really, how could I guess that the install file was corrupt when it is telling me that there's something wrong with the path? Sheesh!
-- spdygnlz --