Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $d = (Get-Date).ToString()
- $installLog = 'C:\Intel\firefox.log' #log-ôàéë óñòàíîâêè
- $softwareName = 'FireFox'
- $linphone = 'Linphone web'
- $cancelStringForLog = "Firefox4LEOS found. We don't need to install it" #ñòŵîêà, îòŵàæàŷùàÿ, ṫòî óñòàíîâêà íå òŵåáóåòñÿ
- $applyStringForLog = "Firefox4LEOS need's to be installed. " #ñòŵîêà, îòŵàæàŷùàÿ íåîáõîäèìîñòü óñòàíîâêè
- out-file -filepath $installLog -encoding ASCII -inputobject $d -append
- $p="C:\Intel\Firefox4LEOS"
- if ( (test-path $p) ){
- out-file -filepath $installLog -encoding ASCII -inputobject $cancelStringForLog -append
- }else{
- out-file -filepath $installLog -encoding ASCII -inputobject $applyStringForLog -append
- out-file -filepath $installLog -encoding ASCII -inputobject 'Mount network drive n:' -append
- if (test-path n:){
- out-file -filepath $installLog -encoding ASCII -inputobject 'Network drive n: already mounted' -append
- }else{
- net use n: \\zht-fs\CC-Zhitomir\08_ITService
- if (test-path n:) {
- out-file -filepath $installLog -encoding ASCII -inputobject 'Disk N: mount successful' -append
- } else {
- out-file -filepath $installLog -encoding ASCII -inputobject 'Disk N: mount FAILED' -append
- exit 1
- }
- }
- $str='n:\Firefox\Mozilla Firefox\*.* ' +$p+'\*.*'+' /e /y'
- $Process = new-Object System.Diagnostics.Process
- $Process.StartInfo.WindowStyle="Hidden"
- $Process.StartInfo.FileName="xcopy"
- $Process.StartInfo.Arguments=$str
- $Process.Start()
- $Process.WaitForExit()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement