Try P/Invoking SHGetAutoRunPath() from aygshell.dll
Here's a link to the MSDN Documentation for SHGetAutoRunPath:
http://msdn2.microsoft.com/en-us/library/aa932541.aspx
--
Regards,
Christian Resma Helle
http://christian-helle.blogspot.com
"Buthrakaur" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello, I'm trying to develop an autorun application, which will
> perform some actions (copy files, install cabs, setup registry etc)
> described in XML file located in the same directory as the autorun.exe
> file. The problem is that I'm not able to get path the autorun
> application on storage card using something like
> Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName -
> this returns \Windows\Autorun. It seems that the OS copies the
> autorun.exe file to internal memory and then executes it, but then I'm
> not able to find out easily where the original autorun.exe file is
> located. Is there any better method than searching the storage card
> for the original autorun? I tried to search this group, but didn't
> found anything dealing with this problem....
>