Wait Until Shell Finishes
Posted on 2013-01-12
I am trying to retrieve data about the network adapter into Access, to do this I first need to create a file with data generated by the ipconfig command
Shell "cmd /c ipconfig /all >C:\dev\ip.txt"
I then read the ip.txt file into MS Access and extract the data I need (the pysical ethernet address) The problem is that the program does not wait long enough for the shell command to create the file and it then generates an error as the file has not yet been created. If I run the program again without deleting the file ip.txt it all works fine.
Any suggestions on how to make the program wait until the file has been created would be appreciated.
The reason I am doing this is to ensure that the program can only be run on a designated computer. There may be easier ways than using the physical address of the network adapter. Any suggestions as to alternative ways of achieving this would be good.