Jump to content

Recommended Posts

Posted

Could be done to directly install file to location without copying from TempDir like:

MsgBox(4, "File", "Install to C:\file.txt")

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = 6
            FileInstall("file.txt", "C:\file.txt", 1) ;  ??
            MsgBox(0, "File", "Installed")
        Case Else
            Exit
    EndSelect
WEnd

because this one working, but without MsgBox

$INSTDIR = "INSTDIR"
$regpath = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\_
        Kaspersky Anti-Virus Personal\UninstallInformation\Kaspersky Anti-Virus Personal", $INSTDIR)

If @error Then
    MsgBox(0, "Kaspersky Anti-Virus", "   Was not updated !")
Else
    DirCreate(@AppDataCommonDir & "\Kaspersky Anti-Virus Personal\5.0\Policy")
    FileInstall("policy.dat", @AppDataCommonDir & "\Kaspersky Anti-Virus Personal\5.0\Policy\policy.dat", 1) ;  ??
    RegWrite("HKLM\SOFTWARE\KasperskyLab\InstalledProducts\Kaspersky Anti-Virus Personal", "UserAskStartStop", "REG_DWORD", "0")
    RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "KAVPersonal50")
    MsgBox(0, "Kaspersky Anti-Virus", "Was updated successfully")
EndIf
Posted

Sure you can.

A few examples below.

;~ $Destination = 'C:\'; 1, Direct FileInstall to...
;~ $Destination = FileSelectFolder('FileInstall', @HomeDrive); 2, Browse for folder, to fileinstall.
$Destination = InputBox('FileInstall', 'Where do you want it?', 'C:\'); 3, Input address to fileinstall

If @error Then Exit

FileInstall('file.txt', $Destination & '\')
Posted

Thanks MHz, Your suggestion helped me!

FileInstall can work through function (without TempDir and Copy).

Func _InstallFiles()
    FileInstall("FlashFXP.ini", $string & "\FlashFXP.ini", 1)
    FileInstall("Sites.dat", $string & "\Sites.dat", 1)
EndFunc

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...