Jump to content

chrismholmes

Member
  • Posts

    2
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Everything posted by chrismholmes

  1. Here is a script I wrote this evening to add wireless profiles to a pc. I am still very new at writing vbs but this was my last resort for adding these connections. I am using a guirunonce at the end of a image to detect what model and run certain scripts per model. This is one of those scripts. I hope it helps someone. Set Shell=WScript.CreateObject("Shell.Application") Shell.MinimizeAll Dim objShell Set objShell=CreateObject("Wscript.Shell") 'Begin Script With objShell .Run "Control ncpa.cpl" wscript.sleep 8000 .AppActivate "Network Connections" wscript.sleep 5000 .SendKeys "w" .sendkeys "{ENTER}" wscript.sleep 3000 .SendKeys "%V" wscript.sleep 3000 .AppActivate "Wireless Network Connection" .SendKeys "+{TAB}" wscript.sleep 1000 .sendkeys "+{TAB}" wscript.sleep 1000 .sendkeys "{ENTER}" wscript.sleep 3000 .SendKeys "%A" wscript.sleep 3000 .SendKeys "Corp" .SendKeys "{TAB}" wscript.sleep 1000 .sendkeys "{DOWN}" wscript.sleep 1000 .sendkeys "{DOWN}" wscript.sleep 1000 .SendKeys "{TAB}" wscript.sleep 3000 .sendkeys "{UP}" wscript.sleep 1000 .SendKeys "{TAB}" wscript.sleep 1000 .sendkeys "{TAB}" wscript.sleep 1000 .sendkeys "{TAB}" wscript.sleep 1000 .sendkeys "{TAB}" wscript.sleep 1000 .sendkeys "{RIGHT}" wscript.sleep 2000 .sendkeys "{TAB}" wscript.sleep 1000 .sendkeys "{UP}" wscript.sleep 1000 .sendkeys "%R" wscript.sleep 2000 .sendkeys "%VE" wscript.sleep 1000 .sendkeys "{ENTER}" .sendkeys "{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{RIGHT}" .SendKeys "%C" .SendKeys "{ENTER}" wscript.sleep 2000 .SendKeys "%A" wscript.sleep 2000 .SendKeys "Guest" .sendkeys "+{TAB}" .sendkeys "{RIGHT}" wscript.sleep 1000 .sendkeys "%E" .sendkeys "+{TAB}" .sendkeys "{RIGHT}" wscript.sleep 2000 .sendkeys "%C" .sendkeys "{ENTER}" .sendkeys "{ENTER}" End With Set objShell=Nothing Wscript.Quit 'End Script
  2. Plamdi Thank you for the information. This was very useful, due to the issues we were having I used alot of your ideas to expand this to include Ask Toolbar, Ask toolbar (ASKPBAR one I think), Weather Channel, and the Aol Toolbar. Here is my modified verision. Please be nice, this was my very first vb script: 'This file silently uninstalls the Google, Yahoo!, Ask, and AOL Toolbars. This also removes Weather Channel Desktop. 'Option Explicit Set Shell=WScript.CreateObject("Shell.Application") Shell.MinimizeAll On Error Resume Next Dim WshShell,a,i i=0 Set WshShell=WScript.CreateObject("WScript.Shell") Set Shell=WScript.CreateObject("Shell.Application") 'Begin Script 'This Removes the Google ToolBar a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{2318C2B1-4965-11d4-9B18-009027A5CD4F}\UninstallString") If a<>"" Then WshShell.Run(a&" /S"),1,True i=i+1 end if 'This Removes the Yahoo Toolbar a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Yahoo! Companion\UninstallString") If a<>"" Then WshShell.Run(""""&a&""" /S"),1,True i=i+1 end if 'This Removes the bundled Ask ToolBar a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AskPBar Uninstall\UninstallString") If a<>"" Then WshShell.Run(a),1,False i=i+1 Wscript.sleep 3000 'pause for 3 seconds WshShell.SendKeys "{TAB}" WshShell.SendKeys "%Y" Wscript.sleep 1000 WshShell.SendKeys "{ENTER}" end if 'This Removes the Weather Channel Desktop a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The Weather Channel Desktop\uninstallstring") If a<>"" Then WshShell.Run(""""&a&""" /S"),1,False i=i+1 Wscript.sleep 5000 'pause for 5 seconds WshShell.SendKeys "{DOWN}" WshShell.SendKeys "{DOWN}" WshShell.SendKeys "{DOWN}" WshShell.SendKeys "{ENTER}" Wscript.sleep 2000 WshShell.AppActivate "Parature Header - Microsoft Internet Explorer" WshShell.SendKeys "%F" WshShell.SendKeys "C" end if 'This Removes the AOL Toolbar a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AOL Toolbar\Uninstallstring") If a<>"" Then WshShell.Run(a&" /S"),1,True i=i+1 end if 'This removes the Ask Toolbar a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ask Toolbar for Internet Explorer_is1\uninstallString") If a<>"" Then WshShell.Run(a&" /SILENT"),1,True i=i+1 end if Wscript.sleep 15000 'This Ends the Script WshShell=Nothing:Wscript.Quit(i)
×
×
  • Create New...