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

How to change target drive?


1 reply to this topic

Malinovka

Malinovka
  • Members
  • 3 posts

Posted 25 July 2005 - 17:33

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?

GabrielDR

GabrielDR
  • Members
  • 2 posts

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:
biggrin.gif


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!!