Write to Windows event log: Difference between revisions
Added Kotlin
mNo edit summary |
(Added Kotlin) |
||
Line 290:
log.Source <- "Sample Application"
log.WriteEntry("Entered something in the Application Eventlog!")</lang>
=={{header|Kotlin}}==
The following works on Windows 10 with administrative privileges:
<lang scala>// version 1.1.4-3
fun main(args: Array<String>) {
val command = "EventCreate" +
" /t INFORMATION" +
" /id 123" +
" /l APPLICATION" +
" /so Kotlin" +
" /d \"Rosetta Code Example\""
Runtime.getRuntime().exec(command)
}</lang>
=={{header|PicoLisp}}==
|