require wodim
scan optical devices
wodim -scanbus
wodim --devices
e.g.
# coding: utf8 | |
xml = '''<?xml version="1.0" encoding="UTF-8"?> | |
<soft> | |
<os> | |
<item name="linux" dist="ubuntu"> | |
This text about linux | |
</item> | |
<item name="mac os"> | |
Apple company |
#include <stdio.h> | |
#include <Windows.h> | |
struct Name | |
{ | |
char FirstName[100]; | |
char LastName[100]; | |
char *Array[3]; | |
}; |
#!/bin/sh | |
base=$1 | |
convert "$base" -resize '29x29' -unsharp 1x4 "Icon-Small.png" | |
convert "$base" -resize '40x40' -unsharp 1x4 "Icon-Small-40.png" | |
convert "$base" -resize '50x50' -unsharp 1x4 "Icon-Small-50.png" | |
convert "$base" -resize '57x57' -unsharp 1x4 "Icon.png" | |
convert "$base" -resize '58x58' -unsharp 1x4 "[email protected]" | |
convert "$base" -resize '60x60' -unsharp 1x4 "Icon-60.png" | |
convert "$base" -resize '72x72' -unsharp 1x4 "Icon-72.png" | |
convert "$base" -resize '76x76' -unsharp 1x4 "Icon-76.png" |
internal static class NativeMethods { | |
public static void PreventSleep() { | |
SetThreadExecutionState(ExecutionState.EsContinuous | ExecutionState.EsSystemRequired); | |
} | |
public static void AllowSleep() { | |
SetThreadExecutionState(ExecutionState.EsContinuous); | |
} |
# Get-EvengLog doesn't quite work I guess: | |
# https://stackoverflow.com/questions/31396903/get-eventlog-valid-message-missing-for-some-event-log-sources# | |
# Get-EventLog Application -EntryType Error -Source "DistributedCOM" | |
# The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID | |
#$logs = Get-EventLog -LogName "System" -EntryType Error -Source "DCOM" -Newest 1 -Message "The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID*" | |
# 2 is error | |
# 3 is warning | |
$EVT_MSG = "The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID" | |
# Search for System event log ERROR entries starting with the specified EVT_MSG | |
$logEntry = Get-WinEvent -FilterHashTable @{LogName='System'; Level=2} | Where-Object { $_.Message -like "$EVT_MSG*" } | Select-Object -First 1 |
Office 2016 (32-bit) on a 32-bit version of Windows
cscript "C:\Program Files\Microsoft Office\Office16\OSPP.VBS" /dstatus
Office 2016 (32-bit) on a 64-bit version of Windows
cscript "C:\Program Files (x86)\Microsoft Office\Office16\OSPP.VBS" /dstatus
Office 2016 (64-bit) on a 64-bit version of Windows
;based on https://nsis.sourceforge.io/PowerShell_support but with x64 support | |
!include x64.nsh | |
!ifndef PSEXEC_INCLUDED | |
!define PSEXEC_INCLUDED | |
!macro PowerShellExecMacro PSCommand | |
InitPluginsDir | |
;Save command in a temp file | |
Push $R1 | |
FileOpen $R1 $PLUGINSDIR\tempfile.ps1 w |