Urgent problem using RUN in Vista
Friedrich - I need to get something out the door in a few hours and just
found this.
In my app I have a button under which I have:
Run('EVKey.exe /V SUBSCRIPTION ' & clip(LOC:SubscriptionKey),1)
EVKey.exe is a SB executable compiled as require administrator which just
checks the subscription key and writes to an ini file. The Runcode() value
returned is -4 which means the program did not run.
This works under XP. Why does this not work under Vista and what do I need
to do to make sure it does.
Many thanks
John Fligg
Re: Urgent problem using RUN in Vista
Hi John,
The answer is simple. The Clarion "RUN" command makes use of the
CreateProcess() Windows API. But CreateProcess() will always fail under
Vista and Windows Serve 2008 if a non-elevated application attempts to
launch another application whose manifest requires elevation.
Use ShellExecuteEx instead.
Does this help?
Friedrich
Re: Urgent problem using RUN in Vista
Or the ShellExecute Windows API :)
Friedrich
Re: Urgent problem using RUN in Vista
Thanks Friedrich
Since posting I found that every so often Vista would tell me that my app
did not run properly. After that it allowed RUN to work.
But I will change it.
Weird.
john
Re: Urgent problem using RUN in Vista
Am I stupid? How do you do that? What is the syntax?
John
Re: Urgent problem using RUN in Vista
Hi John,
>Run('EVKey.exe /V SUBSCRIPTION ' & clip(LOC:SubscriptionKey),1)
Won't work under Vista. I have a rock solid replacement for it in my
next release of our Utilities. Charles and I have been beating on it
for weeks now both under XP and Vista and it just works.
ITRun('EVKey.exe',True,'/V SUBSCRIPTION ' & clip(LOC:SubscriptionKey))
First parameter is the program to run, second is the waiflag and the
third is the command line parameters. There is a fourth parameter to
determine the startupfolder if needed. All except the first parameter
are omittable and it defaults to not waiting for the program to
complete. RunCode() works without problem to detect the errorlevel
from the process after it terminates, just like with RUN(), on both XP
and Vista.
Best regards,
Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com
Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php
Re: Urgent problem using RUN in Vista
Great.
Here is another poser then ......
What about the standrad actions under a button. You can select Run a
program. What does that do and is it safe to use in Vista????
John
Re: Urgent problem using RUN in Vista
John,
As Friedrich said : never use a RUN on Vista
use the ShellExecute as mentioned and you will be safe
--
Thank you
Cordialement - Best regards
Jean-Pierre GUTSATZ
CGF
Data Management Center - A tool to let you Migrate Import Export Transfer
all your Data very easily
www.dmc-fr.com
Certified by Microsoft : "Works with Vista" & "Works with Windows Server
2008"
Re: Urgent problem using RUN in Vista
Erm what is ITRun? The compile does not like it.
John
Re: Urgent problem using RUN in Vista
> Erm what is ITRun? The compile does not like it.
John,
>> I have a rock solid replacement for it in my next release of our Utilities.
>> Charles and I have been beating on it for weeks now both under XP and Vista
>> and it just works.
It's part of the NEXT release of Icetips Utilities - NOT available yet -
you must own the Icetips GOLD subscription.
(http://www.icetips.com/subscribe.php)
David
--
From David Troxell - Product Scope 7 - Encourager Software
Clarion Third Party Profile Exchange Online
http://encouragersoftware.com/profile/clarlinks.html
http://www.encouragersoftware.com/
http://www.profileexchanges.com/blog/