I am shelling out to start a web program using a simple program like below I found in the examples. This is a service App so the Run code shown here is in a Run Event Handler under APP.
// This is the program//s main execution point
Dim sh as New Shell
sh.Execute (“StulzCalc.exe”) 'This works fine
ShowURL ("http://10.0.0.4 ")
// Note that on Windows, exiting the Run event
// does NOT terminate a service application. The
// service won//t terminate until the Stop event
// occurs. So to be consistent, lets just call
// quit with our exit code
'Quit(0)
I am getting an error that ShowURL doesn’t exist. Where am I going wrong?
Thanks for that. So I made a stand alone app and need to be able to determine what the ip address of the computer is. Can I use a shell command to do this?
I am thinking something like this:
Dim sh as New Shell
sh.Execute(“Run”)
sh.Execute(“CMD”)
sh.Execute(“ipconfig”)
sh.Execute(“this is where I get lost. The computer maybe on wireless or wired connection”)
sh.Execute (“StulzCalc.exe”)
ShowURL (“http://10.0.0.3”)
Quit
Thanks again. I get the browser to open ok. What my problem is I won’t know what the ip address is for users. This little program needs to be able to determine the host computers ip address so I can use it with either method. Is there a way to get the ip address?
Tim suggested localhost. That is normally the way. On any computer and unless specified otherwise, locahost points to that computer IP. No need to find it out.
If you really want the IP, shell to ipconfig and parse the result.
This is probably the problem. This runs the exe as a subprocess and will probably kill it when sh goes out of scope / is reused for another command. Use sh.Execute(“start StulzCalc.exe”) or better, get a folderitem to the exe and Launch it.
Thanks for all of your input. I got it going. The app wasn’t starting even though the path was correct. I moved it to a simpler path string and now everything works. Thanks again for everyone’s input and ideas.