Guest User

Untitled

a guest
Dec 19th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. <TextBox x:Name="Information" HorizontalAlignment="Left" Margin="10,116,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Grid.ColumnSpan="3" Height="255" Width="678"/>
  2.  
  3. $WPFMapping.Add_Click({
  4. {
  5. $WPFInformation.Text = " We Will try to map the drives"}
  6. if (((New-Object System.IO.DriveInfo("N:")).DriveType -ne
  7. "NoRootDirectory"))
  8. {
  9. $WPFInformation.Text = " N drive is already mounted and accessible"}
  10. else {
  11. net use /persistent:yes N: "this drive"
  12. Write-Host "mounting"}
  13. if (((New-Object System.IO.DriveInfo("V:")).DriveType -ne
  14. "NoRootDirectory"))
  15. {
  16. $WPFInformation.Text = " V drive is already mounted and accessible"}
  17. else {
  18. $WPFInformation.Text = " V drive mapping in progress"}
  19. net use /persistent:yes V: "this drive"
  20. $WPFInformation.Text = " V drive mapping has been completed"
  21. })
Add Comment
Please, Sign In to add comment