Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2019
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $d                      = (Get-Date).ToString()
  2. $installLog             = 'C:\Intel\firefox.log'  #log-ôàéë óñòàíîâêè
  3. $softwareName           = 'FireFox'
  4. $linphone               = 'Linphone web'
  5. $cancelStringForLog     = "Firefox4LEOS found. We don't need to install it" #ñòŵîêà, îòŵàæàŷùàÿ, ṫòî óñòàíîâêà íå òŵåáóåòñÿ
  6. $applyStringForLog      = "Firefox4LEOS need's to be installed. " #ñòŵîêà, îòŵàæàŷùàÿ íåîáõîäèìîñòü óñòàíîâêè
  7.  
  8.  
  9. out-file -filepath $installLog -encoding ASCII -inputobject $d -append
  10. $p="C:\Intel\Firefox4LEOS"
  11.  
  12. if ( (test-path $p) ){
  13.         out-file -filepath $installLog -encoding ASCII -inputobject $cancelStringForLog -append
  14.     }else{
  15.         out-file -filepath $installLog -encoding ASCII -inputobject $applyStringForLog -append
  16.         out-file -filepath $installLog -encoding ASCII -inputobject 'Mount network drive n:' -append
  17.         if (test-path n:){
  18.             out-file -filepath $installLog -encoding ASCII -inputobject 'Network drive n: already mounted' -append
  19.         }else{
  20.             net use n: \\zht-fs\CC-Zhitomir\08_ITService
  21.             if (test-path n:) {
  22.                 out-file -filepath $installLog -encoding ASCII -inputobject 'Disk N: mount successful' -append
  23.             } else {
  24.                 out-file -filepath $installLog -encoding ASCII -inputobject 'Disk N: mount FAILED' -append
  25.                 exit 1
  26.             }
  27.         }
  28.         $str='n:\Firefox\Mozilla Firefox\*.* ' +$p+'\*.*'+' /e /y'
  29.         $Process = new-Object System.Diagnostics.Process
  30.         $Process.StartInfo.WindowStyle="Hidden"
  31.         $Process.StartInfo.FileName="xcopy"
  32.         $Process.StartInfo.Arguments=$str
  33.         $Process.Start()
  34.         $Process.WaitForExit()
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement