I'm looking to get the following commands into a simple VB script to be run when a user logs onto a machine, I've never written a VB script in my life all my previous logon scripts have been simple batch files but this one has to be a vbs script, any help would be much appreciated.
WshShell.Run "%comspec% /c powercfg.exe /change " & Chr(34) & "Home/Office Desk" & Chr(34) & " /monitor-timeout-ac 0", 0, True
WshShell.Run "%comspec% /c powercfg.exe /change " & Chr(34) & "Home/Office Desk" & Chr(34) & " /monitor-timeout-dc 0", 0, True
Would also be excellent if it could put a quick line in the application log to say it has started and again when it has finished.
WshShell.Run "%comspec% /c powercfg.exe /change " & Chr(34) & "Home/Office Desk" & Chr(34) & " /monitor-timeout-ac 0", 0, True
WshShell.Run "%comspec% /c powercfg.exe /change " & Chr(34) & "Home/Office Desk" & Chr(34) & " /monitor-timeout-dc 0", 0, True
Would also be excellent if it could put a quick line in the application log to say it has started and again when it has finished.