|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Senior Member
Iscritto dal: Jan 2010
Messaggi: 37089
|
Unire due .vbs
Come da titolo, come si fa ad unire due task vbs in uno solo? Gli asterischi dividono i due task. Qualcuno sa come fare?
Codice:
' Desktop.vbs - to Refresh Icons on the Desktop ' Example VBScript to re-activate the Desktop Shell ' Author Jeremy H. & Guy Thomas http://computerperformance.co.uk/ ' Version 2.1 - October 2005 ' -------------------------------------------------------------' SET WshShell = CreateObject("WScript.Shell") SET oExec=WshShell.Exec("taskkill /F /T /IM programxxx.exe") SET oExec= Nothing SET WshShell =Nothing ***************** Option Explicit Dim WSHShell, strDesktop Set WSHShell = WScript.CreateObject("WScript.Shell") strDesktop = WSHShell.SpecialFolders("Desktop") WSHShell.AppActivate strDesktop WSHShell.SendKeys "{F5}" WScript.Quit ' End of VBScript to refresh the desktop
__________________
Analemma - Slowdive - Facebook Motto Microsoft: "If it's broken, and I'm the one who broke it, don't fix it!" ![]() ![]() Ultima modifica di Eress : 10-11-2015 alle 19:26. |
![]() |
![]() |
![]() |
#2 |
Senior Member
Iscritto dal: May 2005
Messaggi: 8697
|
Codice:
Option Explicit Dim WshShell, strDesktop, oExec Set WshShell = WScript.CreateObject("WScript.Shell") Set oExec = WshShell.Exec("taskkill /F /T /IM programxxx.exe") strDesktop = WshShell.SpecialFolders("Desktop") WshShell.AppActivate strDesktop WshShell.SendKeys "{F5}" Set oExec = Nothing Set WshShell = Nothing Set strDesktop = Nothing WScript.Quit
__________________
. Thread Ufficiali: EasyCrypt ~ Old Files Manager ~ OSD Clock The real me is no match for the legend . |
![]() |
![]() |
![]() |
#3 |
Senior Member
Iscritto dal: Jan 2010
Messaggi: 37089
|
Grazie Master, lo sto testando, sembra funzionare bene. In effetti ho scoperto anche che lo script di aggiornamento desktop, basta trascinarlo su desktop e agisce. I vbs comunque, sono molto più potenti dei batch.
|
![]() |
![]() |
![]() |
#4 |
Senior Member
Iscritto dal: May 2005
Messaggi: 8697
|
Il VBScript è sicuramente più potente dei batch e tra i due è quello che più si avvicina ad un linguaggio di programmazione. Powershell avrebbe dovuto sostituire i batch anni fa ma Microsoft non ha mai preso e ancora deve prendere questa decisione.
__________________
. Thread Ufficiali: EasyCrypt ~ Old Files Manager ~ OSD Clock The real me is no match for the legend . |
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 04:42.