wir verwenden in einigen Winst-Scripten FileExists mit Wildcards, um z. B. sicherzustellen, dass nötige Lizenzschlüssel existieren:
Code: Alles auswählen
[Sub_PrepareSetup]
if not(FileExists("%ScriptPath%\*.key"))
LogError "Fatal! License file not found."
IsFatalError
endif
Code: Alles auswählen
[Aktionen]
if not(FileExists("C:\tmp\*.key"))
LogError "*.key not found"
IsFatalError
endif
Code: Alles auswählen
[1] [02.07.2014 11:56:22] opsi-winst 4.11.2.5 started at 02.07.2014 11:56:20
[1] [02.07.2014 11:56:22]
[1] [02.07.2014 11:56:22] ============ Version 4.11.2.5 WIN32 script "C:\Programme\opsi.org\opsi-client-agent\opsi-winst\test.ins"
[1] [02.07.2014 11:56:22] start: 2014-07-02 11:56:22
[1] [02.07.2014 11:56:22] on client named "VM-MARTIN-XP4"
[1] [02.07.2014 11:56:22] loggedin user "martin"
[1] [02.07.2014 11:56:22] winst running as "martin"
[1] [02.07.2014 11:56:22] winst running with admin privileges
[1] [02.07.2014 11:56:22] winst running in standard script mode
[1] [02.07.2014 11:56:22] [executing: "C:\Programme\opsi.org\opsi-client-agent\opsi-winst\winst32.exe"]
[1] [02.07.2014 11:56:22] system infos:
[1] [02.07.2014 11:56:22] 08-00-27-30-46-9C - PC hardware address
[1] [02.07.2014 11:56:22] vm-martin-xp4 - IP name
[1] [02.07.2014 11:56:22] 10.0.0.113 - IP address
[1] [02.07.2014 11:56:22] DEU - System default locale
[1] [02.07.2014 11:56:22] MS Windowds 5.1 32 Bit
[1] [02.07.2014 11:56:22]
[6] [02.07.2014 11:56:22] Registry key [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion] opened
[6] [02.07.2014 11:56:22] Key closed
[5] [02.07.2014 11:56:22]
[5] [02.07.2014 11:56:22] If
[6] [02.07.2014 11:56:22] Starting query if file exist ...
[5] [02.07.2014 11:56:22] FileExists("C:\tmp\*.key") <<< result true
[5] [02.07.2014 11:56:22] not(FileExists("C:\tmp\*.key")) <<< result false
[5] [02.07.2014 11:56:22] Then
[5] [02.07.2014 11:56:22] EndIf
[1] [02.07.2014 11:56:22] ___________________
[1] [02.07.2014 11:56:22] script finished
[1] [02.07.2014 11:56:22] 0 errors
[1] [02.07.2014 11:56:22] 0 warnings
[1] [02.07.2014 11:56:22]
[1] [02.07.2014 11:56:22]
[6] [02.07.2014 11:56:22] Delete "c:\opsi.org\tmp\_winstbat_*"
[6] [02.07.2014 11:56:22] Search "c:\opsi.org\tmp\"
[1] [02.07.2014 11:56:32] ============ winst Version 4.11.2.5 WIN32 is regularly exiting. Time 2014-07-02 11:56:32 .
Code: Alles auswählen
[1] [Jul 02 12:07:34:203] opsi-winst 4.11.4.4 started at 02.07.2014 12:07:32
[1] [Jul 02 12:07:34:204]
[1] [Jul 02 12:07:34:204] ============ Version 4.11.4.4 script "C:\Program Files (x86)\opsi.org\opsi-client-agent\opsi-winst\test.ins"
[1] [Jul 02 12:07:34:205] used script encoding: cp1252
[1] [Jul 02 12:07:34:205] used system encoding: cp1252
[1] [Jul 02 12:07:34:206] start: 2014-07-02 12:07:34
[1] [Jul 02 12:07:34:207] on client named "MARTIN-W7-64"
[1] [Jul 02 12:07:34:208] loggedin user "martin"
[1] [Jul 02 12:07:34:209] winst running as "martin"
[1] [Jul 02 12:07:34:209] winst running with admin privileges
[1] [Jul 02 12:07:34:209] winst running in standard script mode
[1] [Jul 02 12:07:34:211] executing: "C:\Program Files (x86)\opsi.org\opsi-client-agent\opsi-winst\winst32.exe"
[1] [Jul 02 12:07:34:212] system infos:
[1] [Jul 02 12:07:34:216] 08-00-27-1A-7D-9A - PC hardware address
[1] [Jul 02 12:07:34:217] MARTIN-W7-64 - IP name
[1] [Jul 02 12:07:34:218] 10.0.56.52 - IP address
[1] [Jul 02 12:07:34:219] DEU - System default locale
[1] [Jul 02 12:07:34:220] MS Windowds 6.1 64 Bit
[1] [Jul 02 12:07:34:221]
[6] [Jul 02 12:07:34:222] Registry key [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion] opened
[6] [Jul 02 12:07:34:223] Key closed
[6] [Jul 02 12:07:34:267] If
[6] [Jul 02 12:07:34:270] Starting query if file exist ...
[5] [Jul 02 12:07:34:271] "C:\tmp\*.key":
[5] [Jul 02 12:07:34:272] FileExists("C:\tmp\*.key") <<< result false
[5] [Jul 02 12:07:34:273] not(FileExists("C:\tmp\*.key")) <<< result true
[6] [Jul 02 12:07:34:274] Then
[3] [Jul 02 12:07:34:275] Error: *.key not found
[5] [Jul 02 12:07:34:276] Error level set to fatal
[5] [Jul 02 12:07:34:277] Process aborted
[1] [Jul 02 12:07:34:281] ___________________
[1] [Jul 02 12:07:34:282] script finished
[1] [Jul 02 12:07:34:283] 1 error
[1] [Jul 02 12:07:34:284] 0 warnings
[1] [Jul 02 12:07:34:285]
[1] [Jul 02 12:07:34:286]
[6] [Jul 02 12:07:34:287] Delete "c:\opsi.org\tmp\_winstbat_*"
[6] [Jul 02 12:07:34:288] Search "c:\opsi.org\tmp\"
[1] [Jul 02 12:07:59:301] ============ opsi-script Version 4.11.4.4 is regularly exiting. Time 2014-07-02 12:07:59 .