Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Path to a program
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01151910
Message ID:
01151954
Views:
46
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody,
>[...]
>>However, I can not 100% guarantee (though there is 99% probability), that the user installed it into the same place. What should I do?
>
You can search in the Registry for the WinZip software key and get the path information from there.

>The other question:
>
>I use this program to run a command
>local oShell, llError, loException
>llError = .f.
>try
>   oShell = createobject("WScript.Shell")
>catch to loException
>   if m.tlSilentMode
>     tcRetVal = "Run-time error: WScript.Shell Object is not Found"
>   else
>	=messagebox("Run-time error: WScript.Shell Object is not Found")
>  endif
>  llError = .t.
>endtry
>if m.llError <> .t.
>   try
>    oShell.run(m.tcCommand, 0,.t.) 	catch to loException
>	if m.tlSilentMode
>	 tcRetVal = "Run-time error: WScript.Shell: " + ;
> 	 m.tcCommand + chr(13) + chr(10) + Log_Error(m.loException)
>	else
>	 =messagebox("Run-time error: WScript.Shell: " + m.tcCommand)
>	endif
>    llError = .t.
> endtry
>endif
>release oShell
>
>return !llError
>
>
>but even if command fails, I don't get an error. What should I do to always get an error?
>
Which part is the error taking place in - the Shell call or the targeted program? If the targeted program does it return an error level (you could test this with ERRORLEVEL in a batch file) ?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform