[VeryDOC Release Notes] VeryDOC Releases an EXE COM of VeryPDFComRunCmd.exe today, VeryPDF EXE COM does allow you to call MS Office and Any EXE application from ASP, PHP, C#, .NET etc. program languages

VeryPDF Releases a VeryPDFComRunCmd.exe COM today, this COM is useful when you call an EXE or MS Office from ASP, PHP, C#, .NET etc. program languages.

VeryPDFComRunCmd download URL is:

http://www.verypdf.com/dl2.php/VeryPDFComRunCmd.zip

Please by following steps to use VeryPDFComRunCmd.exe COM component,

Step 1:

Download VeryPDFComRunCmd.zip and unzip it to a folder, launch a CMD window with Administrator privilege, run install.bat or following command line to register VeryPDFComRunCmd.exe COM into your system,

VeryPDFComRunCmd.exe /regserver

If you want unregister VeryPDFComRunCmd.exe COM from your system, you can run uninstall.bat or following command line,

VeryPDFComRunCmd.exe /unregserver

Please notice, you MUST run above command lines with Administrator privilege, the limited user account hasn't enough permission to register and unregister VeryPDFComRunCmd.exe COM.

Step 2:

Please run OLEVIEW.EXE application (OLEVIEW.EXE is included in "Microsoft Visual Studio 6.0" product), go to "Type Libraries" item,

image

Locate "VeryPDFCOM" item,

COM_Viewer1

You will see "RunCmd" and "RunCmd2" two functions,

COM_Viewer2

COM_Viewer3

Please look at the declaration for RunCmd() and RunCmd2() two functions at below,

'*******************************************************************************
'* Parameters:
'*  [in] strCmdLine: the full path to the executable and the arguments to the executable
'*  [in] wShowWindow: The wShowWindow member can be any of the SW_ constants defined in WINUSER.H.
'*       #define SW_HIDE             0
'*       #define SW_SHOWNORMAL       1
'*       #define SW_NORMAL           1
'*       #define SW_SHOWMINIMIZED    2
'*       #define SW_SHOWMAXIMIZED    3
'*       #define SW_MAXIMIZE         3
'*       #define SW_SHOWNOACTIVATE   4
'*       #define SW_SHOW             5
'*       #define SW_MINIMIZE         6
'*       #define SW_SHOWMINNOACTIVE  7
'*       #define SW_SHOWNA           8
'*       #define SW_RESTORE          9
'*       #define SW_SHOWDEFAULT      10
'*       #define SW_FORCEMINIMIZE    11
'*       #define SW_MAX              11

'*  [in] bWait: block on the process finishing
'*
'* Return Values:
'*  [Out] Boolean: TRUE on success and FALSE on failed
'*  [Out]  String: Return text message which outputted from executable application
'*******************************************************************************

Public Function RunCmd(ByVal strCmdLine As String, ByVal wShowWindow As Long, ByVal bWait As Boolean) As Boolean

Public Function RunCmd2(ByVal strCmdLine As String, ByVal wShowWindow As Long) As String

Step 3:

You can use following VB Script code to test VeryPDFComRunCmd functions,

set VeryPDFCom = CreateObject("VeryPDFCom.RunCmd")
dim nRetVal, bRet
bRet = VeryPDFCom.RunCmd("C:\windows\notepad.exe", 5, 0)
strRet = VeryPDFCom.RunCmd2("cmd /c dir C:\", 5)
msgbox strRet

Step 4:

If you want use VeryPDFComRunCmd.exe from ASP code, you need arrange it run inside an interactive user account,

1. "Start" -> "Run" -> type in "dcomcnfg" on 32bit system or "MMC comexp.msc /32" on 64bit system,

In the Component Services Window, expand the tree item:

Console Root / Component Services / Computers / My computer / DCOM Config

Right click the "VeryPDFCom.RunCmd" entry and select "Properties":

image

2. In the 'COM Properties' dialog, select the the 'Security' tab,

3. In the 'Access Permissions' area, select "Customize" and click Edit.

image

4. Ensure that "Everyone" is present in the list of names. If not, add it by clicking the Add button, typing "Everyone" and give it all permissions, and clicking OK.

5. Make sure "Everyone" has the Access Permission 'Allow' check box ticked.

image

Click OK to return to the 'properties' window.

You need give "Full Control Permission" to "Everyone" to "Launch and Activation Permissions", "Access Permissions" and "Configuration Permissions" three items.

6. Click "Identity" tab. Check the "This user" checkbox, press "Browse" and specify the Administrator account, enter and re-enter the Administrator password, OR simple choose "The interactive user." option.

image

7. Click "OK" to save it,

8. Add "Everyone" user account to the folder where the VeryPDFComRunCmd.exe inside, and assign "Full Control" permission to "Everyone" user account, if you don't give enough permission to this folder, ASP, PHP, C#, VB.NET, ASP.NET etc. web applications will be denied to access to this folder,

image

image

image

9. OK, you can call "VeryPDFCom.RunCmd" from ASP, PHP, C#, VB.NET, ASP.NET, VBScript, JavaScript, Delphi, etc. program languages without any restrictions now.

Step 5:

You can use following ASP code to call any EXE or MS Office without any permission problem from now, enjoy it,

<%

set VeryPDFCom = Server.CreateObject("VeryPDFCom.RunCmd")
dim nRetVal, bRet
bRet = VeryPDFCom.RunCmd("C:\windows\notepad.exe", 5, 0)
strRet = VeryPDFCom.RunCmd2("cmd /c dir C:\", 5)
Response.Write strRet & vbCrlf

%>

学校 Relevant links:

More EXEShell Tools can be found at following web page,

http://www.verydoc.com/exeshell.html

VeryPDF has release a new docPrintCOMExe for docPrint SDK product,

http://www.verypdf.com/wordpress/201403/verypdf-release-notes-verypdf-has-release-a-new-docprintcomexe-for-docprint-sdk-product-40311.html

VN:F [1.9.20_1166]
Rating: 8.2/10 (5 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 2 votes)
[VeryDOC Release Notes] VeryDOC Releases an EXE COM of VeryPDFComRunCmd.exe today, VeryPDF EXE COM does allow you to call MS Office and Any EXE application from ASP, PHP, C#, .NET etc. program languages, 8.2 out of 10 based on 5 ratings

Random Posts

This entry was posted in VeryDOC SDK & COM and tagged , . Bookmark the permalink.

4 Responses to [VeryDOC Release Notes] VeryDOC Releases an EXE COM of VeryPDFComRunCmd.exe today, VeryPDF EXE COM does allow you to call MS Office and Any EXE application from ASP, PHP, C#, .NET etc. program languages

  1. VeryDOC says:

    You can use following PHP example code to call VeryPDFComRunCmd COM,

    < ?php $comobj = new COM("VeryPDFCom.RunCmd") or die("Couldn't create the COM Component"); $strCmd = $comobj->RunCmd2(“cmd /c dir C:\”, 5);
    echo(“Output is:\r\n” . $strCmd);

    ?>

    >>I can’t find any VeryPDFCom.RunCmd under below tree
    >>Console Root / Component Services / Computers / My computer / DCOM Config

    You need run following command line in a CMD window which run by Administrator privilege,

    VeryPDFComRunCmd.exe /regserver

    after after you registered VeryPDFComRunCmd.exe successfully, you can see VeryPDFCom.RunCmd in the “Console Root / Component Services / Computers / My computer / DCOM Config”.

    [Reply]

    VN:F [1.9.20_1166]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.20_1166]
    Rating: 0 (from 0 votes)
  2. VeryDOC says:

    Hi,

    We tried “DOC to Any Converter Command Line” and it does exactly what we need. COOL!

    We downloaded the zip file from (“doc2any_cmd”),

    http://www.verydoc.com/doc2any_cmd.zip

    and then we downloaded this file too (“VeryPDFComRunCmd”):

    http://www.verypdf.com/dl2.php/VeryPDFComRunCmd.zip

    We like to know if the second zip is required or not. In fact we tried to launch the first application in this way from an ASP page:

    set oShell = Server.CreateObject(“WScript.Shell”)
    oShell.Run “C:\doc2any_cmd\doc2any.exe C:\test.doc C:\out.pdf”

    and it worked correctly!.

    With “VeryPDFComRunCmd” the only advantage is to obtain the result of the program execution? Or is it required?

    Customer
    ————————————————
    Thanks for your message, if “WScript.Shell” is work fine to you, you needn’t the VeryPDFComRunCmd COM again, you can simple forget the VeryPDFComRunCmd COM software.

    VeryPDFComRunCmd COM is used when you haven’t enough permission to call an EXE from ASP page, however, if your ASP page has enough permission to run the EXE, so you needn’t use VeryPDFComRunCmd COM again.

    VeryPDF

    [Reply]

    VN:F [1.9.20_1166]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.20_1166]
    Rating: +1 (from 1 vote)
  3. VeryDOC says:

    The following is the C# example to call swf2img.exe by VeryPDFComRunCmd.exe COM, you can simple replace swf2img.exe by any other applications,

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using VeryPDFCom;
    using System.IO;

    namespace WindowsFormsApplication1
    {
    public partial class Form1 : Form
    {
    public Form1()
    {
    InitializeComponent();
    }

    private void button1_Click(object sender, EventArgs e)
    {
    string appPath = Path.GetDirectoryName(Application.ExecutablePath);
    string strExeFile = “D:\\downloads\\VeryPDFComRunCmd\\swf2img\\swf2img2.exe”;
    string strInFile = “D:\\downloads\\VeryPDFComRunCmd\\swf2img\\colortest.swf”;
    string strOutFile = “D:\\downloads\\VeryPDFComRunCmd\\swf2img\\colortest.jpg”;

    string strCmd = “\”” + strExeFile + “\” \”” + strInFile + “\” \”” + strOutFile + “\””;

    System.Type VeryPDFType = System.Type.GetTypeFromProgID(“VeryPDFCom.RunCmd”);
    VeryPDFCom.RunCmd VeryPDFCom = (VeryPDFCom.RunCmd)System.Activator.CreateInstance(VeryPDFType);
    string strReturn = VeryPDFCom.RunCmd2(strCmd, 1);
    MessageBox.Show(“Return: ” + strReturn);
    }
    }
    }

    [Reply]

    VN:F [1.9.20_1166]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.20_1166]
    Rating: 0 (from 0 votes)
  4. VeryDOC says:

    Hi,

    I’m trying doc to any converter in asp.net, run application using IIS, but only can be converting files jpg and tif, while the microsoft office files can not be converted, what the problem ?

    Thanks,
    Customer
    ——————————————
    If your system has MS Office installed, you can run following command lines to convert office files to PDF files,

    doc2any.exe C:\in.doc C:\out.pdf
    doc2any.exe C:\in.ppt C:\out.pdf
    doc2any.exe C:\in.xls C:\out.pdf
    doc2any.exe C:\in.docx C:\out.pdf
    doc2any.exe C:\in.pptx C:\out.pdf
    doc2any.exe C:\in.xlsx C:\out.pdf

    If your system has OpenOffice installed, but without MS Office installed, you can run following command lines to convert office files to PDF files,

    doc2any.exe -useopenoffice “C:\test.doc” “C:\out.pdf”
    doc2any.exe -useopenoffice “C:\test.docx” “C:\out.pdf”
    doc2any.exe -useopenoffice “C:\test.xls” “C:\out.pdf”
    doc2any.exe -useopenoffice “C:\test.xlsx” “C:\out.pdf”
    doc2any.exe -useopenoffice “C:\test.ppt” “C:\out.pdf”
    doc2any.exe -useopenoffice “C:\test.pptx” “C:\out.pdf”

    If your system hasn’t both MS Office and OpenOffice installed, you can run following command lines to convert office files to PDF and other files,

    doc2any.exe -nooffice “C:\test.doc” “C:\out.pdf”
    doc2any.exe -nooffice “C:\test.docx” “C:\out.pdf”
    doc2any.exe -nooffice “C:\test.xls” “C:\out.pdf”
    doc2any.exe -nooffice “C:\test.xlsx” “C:\out.pdf”
    doc2any.exe -nooffice “C:\test.ppt” “C:\out.pdf”
    doc2any.exe -nooffice “C:\test.pptx” “C:\out.pdf”
    doc2any.exe -nooffice “C:\test.doc” “C:\out.html”
    doc2any.exe -nooffice “C:\test.docx” “C:\out.html”
    doc2any.exe -nooffice “C:\test.xls” “C:\out.html”
    doc2any.exe -nooffice “C:\test.xlsx” “C:\out.html”
    doc2any.exe -nooffice “C:\test.ppt” “C:\out.html”
    doc2any.exe -nooffice “C:\test.pptx” “C:\out.html”
    doc2any.exe -nooffice “C:\test.docx” “C:\out.doc”

    If you can get it work from CMD window, but fail to call it from ASP.NET application, please look at following web page for more information,

    http://www.verydoc.com/blog/verydoc-release-notes-verydoc-releases-an-exe-com-of-verypdfcomruncmd-exe-today-verypdf-exe-com-does-allow-you-to-call-ms-office-and-any-exe-application-from-asp-php-c-net-etc-program-languag.html

    [Reply]

    VN:F [1.9.20_1166]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.20_1166]
    Rating: 0 (from 0 votes)

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!