DeathKnight Posted February 28, 2004 Posted February 28, 2004 Sorry for asking.. I know it was posted before. but I have a hard time finding it.I made few vbs file using sendkeys for certain things.. like enabling quickstart and some other windows settings.I have to following batch file starting after installing windows XP:@echo offclsecho Bezig met instellingen 1 moment a.u.bDEL "%systemroot%\Web\Wallpaper\*.jpg"DEL "%systemroot%\Web\Wallpaper\*.bmp"DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\Programmatoegang en -instellingen.lnk"DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\Windows Update.lnk"DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\Windows-catalogus.lnk"start /wait %systemdrive%\install\DirectX9b\DirectX9\dxsetup.exe /opkstart /wait %systemdrive%\install\WMP9\MPSetupXP.exe /Q:A /R:Nregedit /s %systemdrive%\install\regtweaks.regCOPY "%systemdrive%\Install\Tools\psshutdown.exe" "%systemroot%\"psshutdown.exe -r -t 60 -f -m "De PC zal over 1 minuut opnieuw opstarten"RD /S /Q %systemdrive%\installAn example of a vbs file I made is:Set sa = CreateObject("Shell.Application")sa.ControlPanelItem("desk.cpl")Wscript.Sleep 2000set WshShell = WScript.CreateObject("WScript.Shell")WshShell.SendKeys "{TAB}"Wscript.Sleep 200WshShell.SendKeys "{TAB}"Wscript.Sleep 200WshShell.SendKeys "{TAB}"Wscript.Sleep 200WshShell.SendKeys "{TAB}"Wscript.Sleep 200WshShell.SendKeys "{RIGHT}"Wscript.Sleep 200WshShell.SendKeys "{RIGHT}"Wscript.Sleep 200WshShell.SendKeys "{RIGHT}"Wscript.Sleep 200WshShell.SendKeys "%{e}"Wscript.Sleep 2000WshShell.SendKeys " "Wscript.Sleep 200WshShell.SendKeys "{TAB}"Wscript.Sleep 200WshShell.SendKeys " "Wscript.Sleep 200WshShell.SendKeys "{ENTER}"Wscript.Sleep 200WshShell.SendKeys "{ENTER}"Wscript.Sleep 200I rather have it done before rebooting the system.. any ideas? I know the best way to start them is:wscript file.vbs //B //NoLogo
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now