I'm getting a error when I introduce a script based custom action in the UI sequence of a basic msi project.
Action start 12:15:53: NFS_Set_Time_Stamp.
1: RPC runtime reported exception 0x6bf
Actually I have to create different logs for different subinstallations which are part of my main installer. Each of this subinstaller shall create a log with a distinct time stamp.
In order to achieve that I'm sequencing this custom action that calls a sript function to get the time stamp If I call this custom function lets say on clicking Next button on InstallWelcome dialog then the script is working fine.
Actually I want to set a property by running this function and then pass this property of time stamp on the command line. If u see the custom action NWC_Install_Client_x86 the command line now is
/i "[SETUPEXEDIR]\a.msi" /l*v "C:\Temp\file.log" INSTALLDIR="[INSTALLDIR]\Company\" /qb
Now the requirement is to create a timestamped log file. So I want to pass the time stamp property from the script that I called just before NWC_Install_Client_x86 on the commandline so that the parameter looks something like /l*v "C:\Temp\file_[TIMESTAMP].log".
Another requirement is to create the log files in the directory pointed to by the TEMP. Here I guess IS has a variable TempFolder to use it but it has a value C:\Docum~\ where the problem is in case of paths that have the space. Now when the use the same the path does not get recognized but if i pass the path as "C:\Documents and Setting" meaning the complete path in quotes it shall work. Please let me know how to make the installer beleive in the complete path.
The script used is
function MyFunction4(hMSI)
STRING svResult, svResult1, svResult2, svResult3, svResult4, svResult5;
NUMBER nvResult, nvResult1;
//NUMBER nvFileHandle;
begin
MessageBox ("Entering Time Stamp.", INFORMATION);
GetSystemInfo(DATE,nvResult,svResult);
GetSystemInfo(TIME,nvResult1,svResult1);
if (StrSub (svResult3,svResult1 , 0, 2) < 0) then
MessageBox ("StrSub failed.", SEVERE);
endif;
if (StrSub (svResult4,svResult1 , 3, 2) < 0) then
MessageBox ("StrSub failed.", SEVERE);
endif;
if (StrSub (svResult5,svResult1 , 6, 2) < 0) then
MessageBox ("StrSub failed.", SEVERE);
endif;
svResult2 = "newlog" + svResult + " " + svResult3 + "-" + svResult4 + "-" + svResult5 + ".log";
MessageBox(svResult2,0);
end;
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.
Time Stamp
Started by
wellwisher
, Feb 01 2008 08:13
1 reply to this topic
Posted 04 February 2008 - 17:07
Maybe the built in [Time] property can do what you need, without custom action?
Stefan Krüger
InstallSite.org twitter facebook