20 lines
593 B
Plaintext
20 lines
593 B
Plaintext
#
|
|
# ID: 9b5c17
|
|
# Nazwa: Otwieranie napędu CD Powershellem
|
|
# Opis: Skrypt na otwieranie tacki napędu CD w Powershellu
|
|
# Publiczny: 1
|
|
# Data utworzenia/ostatniej edycji (UTC): 2023-10-11 14:48:08
|
|
#
|
|
|
|
$MemDef =@"
|
|
|
|
[DllImport("winmm.dll", CharSet = CharSet.Ansi)]
|
|
|
|
public static extern int mciSendStringA(
|
|
|
|
string lpstrCommand,
|
|
|
|
string lpstrReturnString,
|
|
|
|
int uReturnLength,
|
|
|
|
IntPtr hwndCallback
|
|
|
|
);
|
|
|
|
"@
|
|
|
|
|
|
|
|
$winmm = Add-Type -memberDefinition $MemDef -ErrorAction 'SilentlyContinue' -passthru -name mciSendString
|
|
|
|
$winmm::mciSendStringA("set cdaudio door open", $null, 0,0) |