Shell function does not work in Win 98

Hi,

I am using a VB application to run different Setup.exe's created by Install Shield.

I am using the Shell function to run these individual applications. The application seems to work fine in all OS but does not work in Windows 98 /98SE. It comes up with an error stating "File Not Found"

Could some one provide me with a solution for this. Any reason why it is happening only in Win 98?

Thanks
Kumaran
[453 byte] By [rkumaran] at [2007-11-18 2:12:44]
# 1 Re: Shell function does not work in Win 98
the shell function works fine in win98, and works the same as in other win versions, so very likely those machines have a different path for the file you're looking to execute.
phinds at 2007-11-10 0:02:40 >
# 2 Re: Shell function does not work in Win 98
phinds,

The shell function does work fine after the installation is complete.

But I am trying to run the setup through a vb exe file where in it does not work. But the same application works fine on all other OS.
rkumaran at 2007-11-10 0:03:41 >
# 3 Re: Shell function does not work in Win 98
like what phinds have mention here the path your executable program locate are very important.

for example

shell("c:\my documents\file.exe")


if you have specific the path like this, one you have setup your application then it will look for the file.exe according to the path that you have given.
when the file.exe is not located in that path. then you will get the message "File not found".

it work in others os cause maybe the path are the same as the one you code.

so be sure you code the right path for you file.exe.

hope this will help
gechin
gechin at 2007-11-10 0:04:40 >
# 4 Re: Shell function does not work in Win 98
gechin

but what i am trying to run is the setup.exe within the CD.

so i use app.path\ & "setup.exe"

hence the file is in there as it works in all OS NT, 2000, XP and ME but does not recognise in win 98 which is very strange.

do i need to include an particular reference at all to run the shell?
rkumaran at 2007-11-10 0:05:39 >
# 5 Re: Shell function does not work in Win 98
Try to see what's going on by adding...

msgbox app.path & "\setup.exe" (not app.path\ & "setup.exe")

...and executting it on all the OSs.

:cool:
bubu at 2007-11-10 0:06:38 >
# 6 Re: Shell function does not work in Win 98
rkumaran,
i'm also not very good in the path section but lucky there a help from the expert here.

maybe you can look at one of my thread which are about the path's problem. see whether it can solve your problem or not.

the thread is:

http://www.dev-archive.com/forum/showthread.php?s=&threadid=228830

copy to the broswer's address.

you can see one of cimperiali's reply which will check for the correct path. simply modify the code to suite your program.

if you are always refer to the cdrom try to modify the drive c:
to your cdrom drive:

for example:
theString = "E:"
depend on what drive your cdrom is.
this maybe suite for all windows but other,i'm not sure.

hope this will help,
gechin
gechin at 2007-11-10 0:07:39 >
# 7 Re: Shell function does not work in Win 98
gechin

the thread id you attached helped me find a solution.

app.path includes "\" with root directory.

All other OS except Win 98 recognise this and hence read the path correctly even though you attach an additional "\" to the
app.path

But in Win 98 if you are working in D:\ Drive and give the path as

app.path "\setup.exe"

it reads as

D:\\setup.exe

and hence gives the error file not found.

other OS read it correctly as D:\setup.exe

Guys thanks for your help

Regards
Kumaran
rkumaran at 2007-11-10 0:08:43 >
# 8 Re: Shell function does not work in Win 98
rkumaran,
you are welcome and also thanks for the explaination.
This is what dev-archive Forums for.

gechin
gechin at 2007-11-10 0:09:48 >