G
Guest
My system is set up to boot up and run my application. To do this I use the
command shell and I edited the shell path to be:
"%SystemRoot%\System32\cmd.exe /K %SystemDrive%\run.bat"
and my batch file, in turn, starts my app.
Everything (finally) seems to be running well except for this:
I use a USB flash drive to store setup information. When my application
starts, it reads the setup info from the USB. On some systems it fails to
find the USB drive ( I use an 'access' call to see if the file exists). On
shutdown, the current setup is saved - that always seems to work. So it seems
that I'm trying to read the USB before the OS has enumerated it. So, is
there a way to tell when the OS has finished looking for drives? I tried a
ten second delay before running my app, but that doesn't seem to help in all
cases. Looping until the drive is recognized won't work because the USB
drive may not be present.
This goes back to the general problem of knowing when it's ok to start an
app. From input from this group and from MS tech support this method (adding
app to command shell path) should work, and it almost does. I notice also
that the application starts while the welcome screen is still showing. This
seems odd, but until now hasn't seemed to be a problem.
Thanks,
SteveS
command shell and I edited the shell path to be:
"%SystemRoot%\System32\cmd.exe /K %SystemDrive%\run.bat"
and my batch file, in turn, starts my app.
Everything (finally) seems to be running well except for this:
I use a USB flash drive to store setup information. When my application
starts, it reads the setup info from the USB. On some systems it fails to
find the USB drive ( I use an 'access' call to see if the file exists). On
shutdown, the current setup is saved - that always seems to work. So it seems
that I'm trying to read the USB before the OS has enumerated it. So, is
there a way to tell when the OS has finished looking for drives? I tried a
ten second delay before running my app, but that doesn't seem to help in all
cases. Looping until the drive is recognized won't work because the USB
drive may not be present.
This goes back to the general problem of knowing when it's ok to start an
app. From input from this group and from MS tech support this method (adding
app to command shell path) should work, and it almost does. I notice also
that the application starts while the welcome screen is still showing. This
seems odd, but until now hasn't seemed to be a problem.
Thanks,
SteveS