create_shortcut/main.rs
1extern crate powershell_script;
2use std::io::{stdin, Read};
3
4/// Creates a shortcut to notpad on the desktop
5fn main() {
6 let create_shortcut = include_str!("script.ps");
7 match powershell_script::run(create_shortcut) {
8 Ok(output) => {
9 println!("{}", output);
10 println!("Press ENTER to continue...");
11 stdin().read(&mut [0]).unwrap();
12 }
13
14 Err(e) => {
15 println!("Error: {}", e);
16 }
17 }
18}