![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Adding a hotfix from the login script Good Evening Any help would be apprecitaed with this code. I am trying to install a hotfix over the network to 250 workstations using the logon script; the logon script runs as the user so I have changed the script to run as the local admin. It runs fine without any switches but requires user interaction - I want it to run without any interaction what so ever. I have added the /passive switch and a few others without being able to get it to install - in fact it causes the script to crash. Has any one any ideas to make it run or alternativley an alternate script. I can't use WSUS at the moment (one of it's updates is the root cause) . Thank you ed Dim strpassword, strcommand, command1 command1 = "\\server\share\hotfix\xp-kb958058.exe" strpassword = "password" strcommand = "runas.exe" set = WScript.CreateObject("WScript.shell") WSHShell.run "runas /user:administrator " & command1 WScript.sleep 2500 WSHShell.appActivate "runas.exe" WSHShell.sendkeys strpassword WSHShell.sendkeys "~" |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Adding a hotfix from the login script eddie wrote: Quote: > Any help would be apprecitaed with this code. I am trying to install a > hotfix over the network to 250 workstations using the logon script; the > logon script runs as the user so I have changed the script to run as the > local admin. It runs fine without any switches but requires user > interaction - I want it to run without any interaction what so ever. I > have added the /passive switch and a few others without being able to get > it to install - in fact it causes the script to crash. > > Has any one any ideas to make it run or alternativley an alternate script. > I can't use WSUS at the moment (one of it's updates is the root cause) . > > Thank you > > ed > > > Dim strpassword, strcommand, command1 > > command1 = "\\server\share\hotfix\xp-kb958058.exe" > > strpassword = "password" > strcommand = "runas.exe" > > set = WScript.CreateObject("WScript.shell") > > WSHShell.run "runas /user:administrator " & command1 > WScript.sleep 2500 > WSHShell.appActivate "runas.exe" > WSHShell.sendkeys strpassword > WSHShell.sendkeys "~" permissions (and the security concerns if you hard code credentials), you should find a way to have the patch only run once. Also, SendKeys is notoriously unreliable. Finally, the hotfixes I am familiar with should be deployed to the computer rather than the user. You need to have it run once per computer, not once per user. I have two example VBScript programs to deploy hotfixes in bulk remotely. The first is a bit old, but was designed specifically for hotfixes (based on suggestions from Microsoft). It provides for different executables for different operating systems: http://www.rlmueller.net/PatchInstall.htm I think my second example VBScript program is a better solution. It can deploy any executable (as long as it runs silently with no user interaction) to all computers in a domain group: http://www.rlmueller.net/Deploy.htm You can create a group and add all XP computers to it (if that is the target audience). If the script needs to be run again (because some computers were unavailable the first time), you can adjust the group membership. The program writes a detailed log. Some advantages of these scripts: You know the patch is deployed once per computer. You know which computers have the patch and which do not. You know when the patch is fully deployed. If there are problems or errors, you may know about it. The second program pings each computer before attempting to connect. If the computer does not respond, this is logged and the machine is skipped. It does not matter if anyone is logged on, but the computers must be authenticated to the domain (turned on). They also must have WMI, which comes standard with all OS's from Windows 2000 on (and can be installed on older clients). -- Richard Mueller MVP Directory Services Hilltop Lab - http://www.rlmueller.net -- |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Adding a hotfix from the login script Thank you Richard, that was really helpful "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx> wrote in message news:eacJLmTEKHA.1252@xxxxxx Quote: > eddie wrote: > Quote: >> Any help would be apprecitaed with this code. I am trying to install a >> hotfix over the network to 250 workstations using the logon script; the >> logon script runs as the user so I have changed the script to run as the >> local admin. It runs fine without any switches but requires user >> interaction - I want it to run without any interaction what so ever. I >> have added the /passive switch and a few others without being able to get >> it to install - in fact it causes the script to crash. >> >> Has any one any ideas to make it run or alternativley an alternate >> script. I can't use WSUS at the moment (one of it's updates is the root >> cause) . >> >> Thank you >> >> ed >> >> >> Dim strpassword, strcommand, command1 >> >> command1 = "\\server\share\hotfix\xp-kb958058.exe" >> >> strpassword = "password" >> strcommand = "runas.exe" >> >> set = WScript.CreateObject("WScript.shell") >> >> WSHShell.run "runas /user:administrator " & command1 >> WScript.sleep 2500 >> WSHShell.appActivate "runas.exe" >> WSHShell.sendkeys strpassword >> WSHShell.sendkeys "~" > Installing patches in a logon script is a problem. Besides the lack of > permissions (and the security concerns if you hard code credentials), you > should find a way to have the patch only run once. Also, SendKeys is > notoriously unreliable. Finally, the hotfixes I am familiar with should be > deployed to the computer rather than the user. You need to have it run > once per computer, not once per user. > > I have two example VBScript programs to deploy hotfixes in bulk remotely. > The first is a bit old, but was designed specifically for hotfixes (based > on suggestions from Microsoft). It provides for different executables for > different operating systems: > > http://www.rlmueller.net/PatchInstall.htm > > I think my second example VBScript program is a better solution. It can > deploy any executable (as long as it runs silently with no user > interaction) to all computers in a domain group: > > http://www.rlmueller.net/Deploy.htm > > You can create a group and add all XP computers to it (if that is the > target audience). If the script needs to be run again (because some > computers were unavailable the first time), you can adjust the group > membership. The program writes a detailed log. > > Some advantages of these scripts: > > You know the patch is deployed once per computer. > You know which computers have the patch and which do not. > You know when the patch is fully deployed. > If there are problems or errors, you may know about it. > > The second program pings each computer before attempting to connect. If > the computer does not respond, this is logged and the machine is skipped. > It does not matter if anyone is logged on, but the computers must be > authenticated to the domain (turned on). They also must have WMI, which > comes standard with all OS's from Windows 2000 on (and can be installed on > older clients). > > -- > Richard Mueller > MVP Directory Services > Hilltop Lab - http://www.rlmueller.net > -- > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Problem with login script | General Discussion | |||
| get-hotfix return 'The term 'get-hotfix' is not recognized' | PowerShell | |||
| Adding Remote Users to AD via Script | VB Script | |||
| Login script | VB Script | |||
| Login script | Vista security | |||