Jump to content
Sign in to follow this  

inputbox cancel button help

Recommended Posts

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> 
$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')
Edited by Skizz

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...