Skizz Posted November 2, 2006 Posted November 2, 2006 (edited) Okay, I am a noob, but writing a simple script to execute an update to the .net framework on remote computers on the network, my problem is that I don't want the notepad to come up or the script to execute if you click the cancel button on the input box and would like an error if the hostname was not found. Any ideas? #Include <process.au3> #include <GUIConstants.au3> GUISetState() $msg = DotNet() Func DotNet () DIM $Computer $Computer = Inputbox ("Type remote computername", "Computername", "") RUN(@ComSpec & ' /c \\$server\share\psexec.exe \\' & $Computer & ' -u $username -p $password %systemroot%\Microsoft.NET\Framework\v2.0.50727\caspol '& '-machine ' & '-chggroup 1.5. ' & 'FullTrust' & ' >> \\' & $Computer & '\c$\windows\temp\results.txt') Sleep(5000);five seconds RUN('notepad \\' & $Computer & '\c$\Windows\temp\results.txt') EndFunc Edited November 2, 2006 by Skizz
Valuater Posted November 2, 2006 Posted November 2, 2006 maybe.. Func DotNet () DIM $Computer $Computer = Inputbox ("Type remote computername", "Computername", "") If $Computer = "" then Return ; continue function 8)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now