Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <TextBox x:Name="Information" HorizontalAlignment="Left" Margin="10,116,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Grid.ColumnSpan="3" Height="255" Width="678"/>
- $WPFMapping.Add_Click({
- {
- $WPFInformation.Text = " We Will try to map the drives"}
- if (((New-Object System.IO.DriveInfo("N:")).DriveType -ne
- "NoRootDirectory"))
- {
- $WPFInformation.Text = " N drive is already mounted and accessible"}
- else {
- net use /persistent:yes N: "this drive"
- Write-Host "mounting"}
- if (((New-Object System.IO.DriveInfo("V:")).DriveType -ne
- "NoRootDirectory"))
- {
- $WPFInformation.Text = " V drive is already mounted and accessible"}
- else {
- $WPFInformation.Text = " V drive mapping in progress"}
- net use /persistent:yes V: "this drive"
- $WPFInformation.Text = " V drive mapping has been completed"
- })
Add Comment
Please, Sign In to add comment