Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 243
  • Last Modified:

shellexecute fails on win98

on winme,2000 and xp the functions works great
on 2 different win98 machines it returns  SE_ERR_NOASSOC

any help would be great. thanks.

 
CString startinfolder,datapath,runexe,parameters;
startinfolder.Format("%s",Td.Dest_Dir);
datapath.Format("%s\\dbf\\",Td.Dest_Dir);
runexe.Format("%s\\dlogs.exe",Td.Dest_Dir);
parameters.Format("%s %s",datapath,scanner.batch);
         
HINSTANCE shellret = ShellExecute(NULL,"",runexe,parameters,startinfolder,0);
0
jafrazee
Asked:
jafrazee
  • 2
1 Solution
 
Mohammed NasmanSoftware DeveloperCommented:
Hello
  I don't working with C language, but as the ShellExecute API that I use much, try to change the second paramter to "open" instead of leaving it empty    
ShellExecute(NULL,"open",runexe,parameters,startinfolder,0);
0
 
jafrazeeAuthor Commented:
that was it.
strange the problem was only on win98 pcs
thank you.
0
 
fadi980Commented:
It works with me on win98 in delphi
let second parameter 'open'
0
 
Mohammed NasmanSoftware DeveloperCommented:
Glad that help you jafrazee
if your problem solved by any comments, please Accept the comment by pressing the button "accept as answer"

Best regards
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now