ich habe schon hier im Forum gelesen und auch schon google ausgereizt, finde aber meinen Fehler nicht. Ich habe folgendes Script, bei dem ich Abfrage ob es einen Ordner gibt.
Code: Alles auswählen
[Initial]
ExitOnError=true
StayOnTop = true
[Actions]
DefVar $ProductId$
Defvar $Installfile$
DefVar $ExitCode$
DefVar $Zielpfad$
DefVar $TestPath$
set $ProductId$ = "Microsoft Office 365 Business"
set $TestPath$ = "c:\dkit\"
ShowBitmap "%ScriptPath%\office365_business_x86.png" "MS Office 365"
Message "Installing " + $ProductId$
comment "Start setup program"
set $Installfile$ = "setupodt.exe"
Sub_CheckPath
Files_copy
PatchTextFile_Outlook "$Zielpfad$\config-business.xml"
Winbatch_install
Files_delete
Sub_check_exit_code
[Sub_CheckPath]
if FileExists($TestPath$)
set $Zielpfad$ = "c:\dkit"
else
set $Zielpfad$ = "C:\WetIT"
endif
Code: Alles auswählen
(93) [6] [Nov 19 10:03:21:555] [office365_business_x86] Set $ProductId$ = "Microsoft Office 365 Business"
(94) [6] [Nov 19 10:03:21:555] [office365_business_x86] The value of the variable "$ProductId$" is now: "Microsoft Office 365 Business"
(95) [6] [Nov 19 10:03:21:555] [office365_business_x86] Set $TestPath$ = "c:\dkit\"
(96) [6] [Nov 19 10:03:21:555] [office365_business_x86] The value of the variable "$TestPath$" is now: "c:\dkit\"
(97) [5] [Nov 19 10:03:21:600] [office365_business_x86] message Installing Microsoft Office 365 Business
(98) [5] [Nov 19 10:03:21:603] [office365_business_x86] comment: Start setup program
(99) [6] [Nov 19 10:03:21:603] [office365_business_x86] Set $Installfile$ = "setupodt.exe"
(100) [6] [Nov 19 10:03:21:604] [office365_business_x86] The value of the variable "$Installfile$" is now: "setupodt.exe"
(101) [6] [Nov 19 10:03:21:604] [office365_business_x86]
(102) [6] [Nov 19 10:03:21:604] [office365_business_x86] ~~~~~~~ Start Sub ~~~~~~~ Sub_CheckPath
(103) [6] [Nov 19 10:03:21:604] [office365_business_x86] If
(104) [6] [Nov 19 10:03:21:604] [office365_business_x86] Starting query if file exist ...
(105) [6] [Nov 19 10:03:21:604] [office365_business_x86] FileExists($TestPath$) <<< result true
(106) [6] [Nov 19 10:03:21:604] [office365_business_x86] Then
(107) [6] [Nov 19 10:03:21:604] [office365_business_x86] Set $Zielpfad$ = "c:\dkit"
(108) [6] [Nov 19 10:03:21:604] [office365_business_x86] The value of the variable "$Zielpfad$" is now: "c:\dkit"
(109) [6] [Nov 19 10:03:21:604] [office365_business_x86] Else
(110) [6] [Nov 19 10:03:21:605] [office365_business_x86] EndIf
(111) [6] [Nov 19 10:03:21:605] [office365_business_x86]
(112) [6] [Nov 19 10:03:21:605] [office365_business_x86] ~~~~~~~ End Sub ~~~~~~~ Sub_CheckPath
(113) [6] [Nov 19 10:03:21:605] [office365_business_x86]
(114) [5] [Nov 19 10:03:21:605] [office365_business_x86] Execution of: Files_copy
(115) [5] [Nov 19 10:03:21:605] [office365_business_x86]
(118) [3] [Nov 19 10:03:21:605] [office365_business_x86] Error: Directory c:\dkit does not exist and cannot be created
(119) [5] [Nov 19 10:03:21:605] [office365_business_x86] Finished of: Files_copy
Vielen Dank schonmal für eure Hilfe
Gruss, Sascha