Hello


Is there some logic when a parameter passes the 'explorer' name and when a unc 
name?

I have a strange problems using startup parmeters within my exe.

I would like to start a file using it's assosiated program. Therfor it's using 
the register key found in
\hkey_classes_root\fileextFile\shell\open\command

I've added a showmessage to my exe to give me an indication on what parameters 
arrive at startup:

The original program-exe was installed using an 'installation wizard'  and the 
key-value found within this register key is pointing to my installation 
directory:    D:\installation\CalculatieXE %1   

All parameters arriving at this location will be using the unc notation (spaces 
will not be used and ~ a lot...). However this location does not provide me 
enough debudding options: therefor I've altered the register key value to 
D:\delphi\projects\ontw\WecapXE\CalculatieXE %1  (my DElphi development 
location)

What surprices me is that all parameters arriving at startup not are NOT using 
the unc-notation and therfor parameters are not valid if the "file to 
open"-path contains spaces.  

Files will work as long as the filename does not contain spaces: as soon it 
does contain spaces it's pamater become useless:  \
e.g. file at c:\te mp\1.ext   will arrive as parameter 'c:\te' 

I know the solution is to alter my D:\delphi\projects\ontw\WecapXE\CalculatieXE 
%1 to D:\delphi\projects\ontw\WecapXE\CalculatieXE "%1"   , but why I sometimes 
get  the unc names and sometimes not, surpices me a lot.

I also now  did find out  if I change the dir name where the exe is located, it 
will force all parameters to use the ~ name...


Is there some logic when a parameter passes the 'explorer' name and when a unc 
name? Is this determained by the dirname where the exe is located? Does it 
matter if the 'file-to open' is located on another disk?

Hope you have some answers

Regards

Andries






      
____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

[Non-text portions of this message have been removed]

Reply via email to