eJan Posted May 27, 2005 Posted May 27, 2005 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
MHz Posted May 28, 2005 Posted May 28, 2005 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 & '\')
eJan Posted May 28, 2005 Author Posted May 28, 2005 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now