1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extern crate powershell_script;
use std::io::{stdin, Read};

/// Creates a shortcut to notpad on the desktop
fn main() {
    let create_shortcut = include_str!("script.ps");
    match powershell_script::run(create_shortcut) {
        Ok(output) => {
            println!("{}", output);
            println!("Press ENTER to continue...");
            stdin().read(&mut [0]).unwrap();
        }

        Err(e) => {
            println!("Error: {}", e);
        }
    }
}