Article View: borland.public.cppbuilder.nativeapi
Article #16868Re: was ShellExecute - crash on NT4
From: Murray Nelson
Date: Tue, 22 Apr 2003 21:17
Date: Tue, 22 Apr 2003 21:17
37 lines
2669 bytes
2669 bytes
Actually I tried it with ShellExecuteInfo()to save time. The /s did the trick. Thank you so much Gambit. This newsgroup is a God send. I will be hangin here regularly. So much to learn. Remy Lebeau (TeamB) wrote: > "Murray Nelson" <mnpicker@agt.net> wrote in message > news:3EA4F142.2040002@agt.net... > > >> Actually I have been using ShellExecuteInfo >>I am trying to write a registry key to the registry with >>a file suffixed .reg previously prepared. ShellExecuteInfo >>works great except I get "Are you sure ..." and then I get >>"...successfuly entered into registry". So I have to complete >>a carriage return twice or a space bar twice to get the >>final result. What can I put into the >> ExecInfo.lpParameters = ""; to complete the spacebar >>strokes? >> > > You can't send keyboard strokes with ShellExecute(). Nor can you pass > parameters to REGEDIT.EXE because you're only specifying a filename and not > the actual application as well, thus the lpParameters value is ignored > completely. You could, however, use keybd() for sending the keystrokes. > > However, either way, you should instead be calling REGEDIT.EXE directly, > passing it the .reg filename as a parameter as well as the /S flag. That > will prevent the message boxes from being displayed in the first place. In > which case, I would suggest you use CreateProcess() instead of > ShellExecuteEx() for that. > > > Gambit > > >
Technical Details
Message-ID:
<3EA5B16E.1070202@agt.net>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3ea04c39$1@newsgroups.borland.com> <3EA47744.4010906@agt.net> <3ea4809d$1@newsgroups.borland.com> <3EA4C5ED.5050505@agt.net> <3ea4e282$1@newsgroups.borland.com> <3EA4F142.2040002@agt.net> <3ea57be7$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,5c247afc24d17dcf X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-04-22 14:28:02 PST Message-ID: <3EA5B16E.1070202@agt.net> Date: Tue, 22 Apr 2003 15:17:34 -0600 From: Murray Nelson <mnpicker@agt.net> User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: was ShellExecute - crash on NT4 References: <3ea04c39$1@newsgroups.borland.com> <3EA47744.4010906@agt.net> <3ea4809d$1@newsgroups.borland.com> <3EA4C5ED.5050505@agt.net> <3ea4e282$1@newsgroups.borland.com> <3EA4F142.2040002@agt.net> <3ea57be7$1@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 142.173.166.192 X-Trace: newsgroups.borland.com 1051046313 142.173.166.192 (22 Apr 2003 14:18:33 -0700) Lines: 38 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail