can7 Posted June 22, 2009 Posted June 22, 2009 Hi all I'm trying to write a script which loops until I get a reply from a server. I want to add this script to a stand image for deploying PCs. I want this script to ping to see if it is on the network if so run a series of command. If it is not then keep looping until it is on the network. I been also reading about the _SelfDelete() and trying to figure out if that could be added to the end of my script so it will remove itself from the PC once the script has completed the commands needed. Thank you for your help in advance. Jo
spudw2k Posted June 22, 2009 Posted June 22, 2009 (edited) Quick 'n dirty. $host = "hostname or ip" Do sleep(500) Until Ping($host,500) Edited June 22, 2009 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
can7 Posted June 22, 2009 Author Posted June 22, 2009 Quick 'n dirty. $host = "hostname or ip" Do sleep(500) Until Ping($host,500) Thanks spudw2k!
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