bigbangnet Posted February 22, 2012 Posted February 22, 2012 (edited) I got this code which copies some files in my network to pcs with open office. Really useful if you got lots of pc's. How would I "display" a message that the file was copied successfully ? A bit lost since I use a case here. I know i could call the filecopy in a variable but since I verify if the os is windows 7, xp or 2k thats where I get lost a bit. like this but its not enough since i don't have my os verification going on : $variable = FileCopy ( $CompletePath & "mission" & $NextMis & ".mis", $CompletePath & "currentmis.mis",1 ) If $variable = 1 then ;Do something Else ;Do something else Endif This is my current code Local $os = @OSVersion If Not IsDeclared("iMsgBoxAnswer") Then Local $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(4, "Vérification de la version de OpenOffice", "Est-ce que la version 3.3 ou supérieur de openOffice est installé ?") Select Case $iMsgBoxAnswer = 6 ;Yes If $os = "WIN_7" Then FileCopy("192.168.1.126clientsappsScriptregistrymodifications.xcu", @AppDataDir & "OpenOffice.org3user", 1) Else If $os = "WIN_XP" Then FileCopy("192.168.1.126clientsappsScriptregistrymodifications.xcu", @AppDataDir & "OpenOffice.org3user", 1) Else If $os = "WIN_2000" Then MsgBox(1, "OpenOffice 3.3", "Ne pas installer ou utiliser Openoffice sur Windows 2000") EndIf EndIf EndIf Case $iMsgBoxAnswer = 7 ;No Exit EndSelect Edited February 22, 2012 by bigbangnet ** Warning **Noobie ahead. handle with caution
bigbangnet Posted February 22, 2012 Author Posted February 22, 2012 Nevermind, I used a variable for filecopy and used it after I verify if my windows is win7 or xp...should of done that before posting here.. sorry ** Warning **Noobie ahead. handle with caution
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