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

DIALOG INSTALLCHANGEFOLDER


2 replies to this topic

sanjoygr

sanjoygr
  • Full Members
  • 76 posts

Posted 28 February 2006 - 12:36

USING DIALOG INSTALLCHANGEFOLDER,

USER SHOULD SELECT ONLY WINDOWVOLUME FOLDER
ie C:\, or D:\,... etc.

After seleting that user will not be allowed to give sub folder.
The sub folder will be pushed internally when clicked ok.
The subfolder is the installdir foder. MY application should run under [windowsvolume]\XYZ\. Here xyz is installfolder.


For this I make visible =false for foldername text box (Tail Editpath).

Want to know how to internally manupuliate the folder name So that after selection of dive name user do not give folder name the folder name should be installfolder. So the path becomes DriveName:\installfolder.



thanks
sanjoy

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 28 February 2006 - 16:26

You can use a "set a path" custom action to append your subfolder to the user's drive selection. Note that WindowsVolume is a system variable and shouldn't be changed.

sanjoygr

sanjoygr
  • Full Members
  • 76 posts

Posted 20 March 2006 - 07:28

I have done following process but have some problem.

Created an Custom Action CAChangeInstallDir

Following attributes for CA.
1.VBScript Fie name: MyFxiedFolder.vbs
2.ReturnProcessing:Asynchronous (Waits for exist code)
3.In-script execution:Immediate Execution
4.Execution Scheduling:Execute Only Once

The CA is called from the dialog box InstalledChangeFolder ControlName: OK - Type - Push Button
Event Name - Argument - Condition
DoAction - CAChangeInstallDir - 1
SetTargetPath - [_BrowseProperty] - 1
EndDialog - Return - 1

Coding in MyFxiedFolder.vbs

Option Explicit

Dim MyFixFolder,InstallDefaultPath,InstallDefaultFolder,StrCmpFolder
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")

MyFixFolder="THRTE_4.7.5\"

InstallDefaultPath =Session.Property("INSTALLDIR")

If len(InstallDefaultPath)>3 Then
InstallDefaultFolder=left(InstallDefaultPath,3)
StrCmpFolder = StrComp(MyFixFolder,InstallDefaultFolder)
If StrCmpFolder <> 0 Then
Session.Property("INSTALLDIR")=Right(InstallDefaultPath,3) & MyFixFolder
End If
Elseif len(InstallDefaultPath)=3 then
Session.Property("INSTALLDIR")=InstallDefaultPath & MyFixFolder
End if

WshShell.Quit


While application is installed on selecting the change folder option it canot process and goes to theInstallation complete dialog.
Please let me know here is the fault or what I am missing.

Thanks
Sanjoygr@yahoo.co.in

Edited by sanjoygr, 21 March 2006 - 13:43.