CheckFields()
{
Global
If (!Comp)
{
MsgBox, Error: Workstation field empty
return false
}
If (!Username)
{
MsgBox, Error: Username field empty
return false
}
If (!Password)
{
MsgBox, Error: Password field empty
return false
}
If (!Gateway)
{
MsgBox, Error: Gateway field empty
return false
}
}
return
GuiClose:
ExitApp
Scan:
gui, submit, nohide
If (CheckFields())
{
MsgBox % CheckFields()
run, %comspec% /k psexec.exe %Comp% -u "%UserName%" -p "%Password%" -s netsh interface ipv4 show route > c:\asdf.asdf
}
returnWhat am I doing wrong here? All I want is for it to call CheckFields function and if there's an empty field it will return something other than 0...




