Jump to content


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.
Photo

Works on Network, not on CD


5 replies to this topic

schweitz77

schweitz77
  • Members
  • 7 posts

Posted 03 February 2003 - 22:40

We have a problem:
Our install works fine when running from the network, but when we burn it to CD it doesn't.  The problem is with an .ini file we have along with the install files.  We have a custom action that reads this .ini file and copies a line, based on what install options are selected, into another .ini file we create in the install directory.  We have no explanation for why it works from the network, but not off of a CD.

Any thoughts/suggestions?

Thanks in advance,
Scott

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 04 February 2003 - 12:29

Does a log file reveal any information?

schweitz77

schweitz77
  • Members
  • 7 posts

Posted 04 February 2003 - 15:28

No, it says the action runs, but it isn't doing anything.

Action start 8:12:11: MoveINIFileSettings.
MSI (s) (60:A4): Creating MSIHANDLE (96) of type 790542 for thread 420
Action ended 8:12:11: MoveINIFileSettings. Return value 1.

Here is the action(installscript):

function MoveINIFileSettings(hMSI)
  NUMBER iValue, nSize, nVal;
  STRING sFilePath, sSection, sKey, sResult, sSDir, sTDir;
begin
  nSize = 255;
  sSDir = "";
  sTDir = "";
  iValue = MsiGetProperty (hMSI, "SourceDir", sSDir, nSize);
  iValue = MsiGetProperty (hMSI, "INSTALLDIR", sTDir, nSize);
  nSize = 6;
  iValue = MsiGetProperty (hMSI, "INSTALLLEVEL", sResult, nSize);
  StrToNum(nVal, sResult);
  if nVal = 100 then
     //Network
     sKey = "SettingsN";
  elseif nVal = 200 then
     //Standalone
     sKey = "SettingsS";
  else
     //Defualt to Standalone
     sKey = "SettingsS";
  endif;
  sSection = "Config";
  sFilePath = sSDir ^ "SetupBVS.INI";
  iValue = GetProfString(sFilePath, sSection, sKey, sResult);
  sFilePath = sTDir ^ "BVS.INI";
  sKey = "Settings";
  iValue = WriteProfString(sFilePath, sSection, sKey, sResult);

end;


Thanks for your reply, maybe you can see something in this code that I am missing.

Scott

hambone

hambone
  • Members
  • 206 posts

Posted 04 February 2003 - 16:23

i do not see where the sTDir is getting set to anything other then a null string ?  

is it possible that this is assuming the cd root drive and due to read-only access can not perform this operation ?

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 04 February 2003 - 16:31

After this line:

iValue = MsiGetProperty (hMSI, "SourceDir", sSDir, nSize);

you should insert

nSize = 255;

MsiGetProperty sets nSize to the number of character it has retrieved. If your SourceDir is shorter than your INSTALLDIR it will be cut off in in the next call.

schweitz77

schweitz77
  • Members
  • 7 posts

Posted 04 February 2003 - 17:54

That did it, THANK YOU VERY MUCH!!!!! :)  :)  :)