Re: File associations and file loading at startup

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




Ah, I put a like like
Msgbox (curdir)
at the beginning of my program
It seems that the current directory is set to the folder where the file
exists,
and not where the program is installed.
The plot thickens.
Is there any way to defeat or work around this behaviour, so that my current
directory is the folder where the program is installed?



> Well, I thought it would be so easy.
> I associated my file with my VB program, using Windows's open with... thing.
> when it runs my program, I get the message "The specified path/fine name
> cannot be accessed or is invalid."
> It does this weather I include the code to handle the command line or not.
> Odd.
> It does work if I drop the file onto the programs icon. It s starts the
> program up normally.
> But not when I run the associated file.
>
>
> > "Dan Ritchie" <DanRitchie@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> > news:15A9F266-4B68-4273-95EB-9338ACB92605@xxxxxxxxxxxxxxxx
> > >I need to implement the ability to load a file that is associated with my
> > > application, when clicked on.
> > > I don't really know the word for this cabability under Windows, if
> > > somebody
> > > could help me out?
> > > Anyway, if a file is associated with my application, and somebody
> > > double-clicks on it, it should run my application, and then the file
> > > should
> > > be loaded up. I assume I need to get the name of the file and arguments
> > > somehow at startup.
> >
> > If an association is setup, Command$ will contain the name of the file.
> >
> > To setup an association, grab this class....
> >
> > Complete Registry control
> > http://www.vbaccelerator.com/home/VB/Code/Libraries/Registry_and_Ini_Files/Complete_Registry_Control/article.asp
> >
> > On that page, there's a section that starts.....
> >
> > To Associate a File of type .CCD with your executable
> >
> > ....read that to see how easy it is. Only a couple of lines of code required.
> >
> > --
> > Ken Halter - MS-MVP-VB - http://www.vbsight.com
> > DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
> > Please keep all discussions in the groups..
> >
> >
> >
.



Relevant Pages

  • Re: Another Config Problem
    ... Use the rd command, ... I don't know how this folder was created but I do know that I can't proceed with it like it is. ... Setup has two stages: ... might occur if the graphics-mode stage of setup fails. ...
    (microsoft.public.windowsxp.help_and_support)
  • RE: Locating corrupt driver
    ... This article describes the functionality and limitations of the Windows ... Create and format partitions on drives. ... MB of hard disk space on your system partition to hold the Cmdcons folder ... Windows NTBoot Console Command Interpreter. ...
    (microsoft.public.win2000.applications)
  • Re: Dim RetVal
    ... Looking in the folder there is a coed11.dat DAT file, the coed11 application, coed11.gdb GDB file ... The reason is that without the quotes, the command processor sees the ... In the command window, first type ... This *should* have exactly the same effect as the macro. ...
    (microsoft.public.word.vba.beginners)
  • Re: Batch Job
    ... You cannot use the 'del' command at a DOS prompt. ... files (since 'del' might not work into the special folder). ... while the above will delete the deleted files from the Recycle Bin but it also deletes configuration files used by the Recycle Bin. ...
    (microsoft.public.windowsxp.general)
  • Re: Help with cacls in WinXP Home
    ... Take Ownership of a File or Folder in Windows XP ... all the information I have of CACLS: ... Just because you can set permissions with Cacls doesn't mean you should. ... Try the Cacls command on a test folder first and make sure that your ...
    (microsoft.public.windowsxp.security_admin)