Browse the docs

silk.platform.windows.process_image.

Interactive Windows process execution: inherit the terminal, environment, and working directory, wait for the image, and return its exact exit status to the shell.

Import as WindowsProcessImage with import silk.platform.windows.process_image as WindowsProcessImage.

Public declarations: 5.

setVariableBytes#

silk
pub effect fn setVariableBytes(name: &[u8], value: &[u8]) -> bool ! OutOfMemoryError ? &mut Allocator

Sets a live Windows environment variable from canonical WTF-8 host bytes, replacing its value. Returns false for an empty name, = in the name, NUL, invalid WTF-8, or an OS refusal. Allocation failure remains an Effect. Previously captured HostInput snapshots do not change.

setVariable#

silk
pub effect fn setVariable(name: string, value: string) -> bool ! OutOfMemoryError ? &mut Allocator

Sets a live Windows environment variable from text, replacing its value. Returns false for an empty name, = in the name, NUL, or an OS refusal. Allocation failure remains an Effect. Previously captured HostInput snapshots do not change.

setVariableDefaultBytes#

silk
pub effect fn setVariableDefaultBytes(name: &[u8], value: &[u8]) -> bool ! OutOfMemoryError ? &mut Allocator

Sets a default from canonical WTF-8 host bytes, preserving an existing value, including empty. Returns false for invalid WTF-8, NUL, an empty name, = in the name, or an OS refusal. The presence check and update are separate calls; concurrent environment writers may race.

setVariableDefault#

silk
pub effect fn setVariableDefault(name: string, value: string) -> bool ! OutOfMemoryError ? &mut Allocator

Sets a default environment variable from text, preserving an existing value, including empty. Returns false for NUL, an empty name, = in the name, or an OS refusal. The presence check and update are separate calls; concurrent environment writers may race.

replace#

silk
pub effect fn replace(program: &Path, arguments: &[Bytes]) -> bool ! OutOfMemoryError ? &mut Allocator

Runs an explicit executable with inherited standard streams, environment and working directory. Returns false if setup fails. On successful launch it waits and exits with the child's DWORD.

Category: Windows platform.

Profiles: x86_64-pc-windows-msvc.

View the source of this page