Task:
Default drive for setup is D:
In case drive D: isn't fixed (CD or not exists), I need to change target dir to C:
I thought what ROOTDRIVE will solve my problems, but it dosn't work. What should I do? How to set target volume?
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.
How to change target drive?
Started by
Malinovka
, Jul 25 2005 17:33
1 reply to this topic
Posted 09 August 2005 - 19:24
How are u using the ROOTDRIVE?
I suppose that you have a script that is executed in a "Custom Action". and save the new value to ROOTDRIVE.
I recommend you prove this:
function ChangeROOT(hMSI)
STRING NewValue,PathChange
Begin
NewValue="C:\"
MsiGetProperty (hMSI, "NEWPATHUSERCHANGE", PathChange, 256); //Take property's value from MSI Table
if PathChange="1" then //Execute only if the property value is "1"
MsiSetProperty(hMSI,"TARGETDIR",Newvalue); //Put the new value in the TargetDir property
endif
end
// remembers that the UnitDrive must finalize with "\"
Get Luck!!
I suppose that you have a script that is executed in a "Custom Action". and save the new value to ROOTDRIVE.
I recommend you prove this:
function ChangeROOT(hMSI)
STRING NewValue,PathChange
Begin
NewValue="C:\"
MsiGetProperty (hMSI, "NEWPATHUSERCHANGE", PathChange, 256); //Take property's value from MSI Table
if PathChange="1" then //Execute only if the property value is "1"
MsiSetProperty(hMSI,"TARGETDIR",Newvalue); //Put the new value in the TargetDir property
endif
end
// remembers that the UnitDrive must finalize with "\"
Get Luck!!