Partners Contact US Site Map Blog
A professional PDF Converter, PDF Writer, PDF Creator, PDF Editor, HTML Converter, Postscript Converter, AutoCAD DWG Converter, as well as PCL Converter, etc.  
 
Product Catalog
 
1. EXEShell COM Library
2. LsRunAs Command Line Tool
3. CmdAsUser Command Line Tool
4. RunAs Command Line Tool
5. Free docPrint Service
6. VeryPDFComRunCmd COM Component
 

EXEShell COM Library

Do you need execute a DOS command / batch file / exe from ASP? if yes, this EXEShell COM LIbrary will meet your requirement. ExeShell COM Library is a COM interface, it allows you to run an EXE application from current user account or a special user account, for example, you can run an EXE from Administrator user account to get higher privileges.
 
ExeShell COM Library is a freeware, you can download it at here. [Download]
 
For example,
<%
    Set comEXEShell = Server.CreateObject("exeshell.shell")
    comEXEShell.RunCommandLine "Administrator", "123456", "C:\pdf2vec.exe C:\test.pdf C:\test.swf"
    Set comEXEShell = Nothing
%>
 
Remark:
You may encounter Error 1314 in some Windows systems, please by following steps to solve this 1314 Error,

ERROR 1314:
~~~~~~~~~~~~~
1314 A required privilege is not held by the client. ERROR_PRIVILEGE_NOT_HELD
~~~~~~~~~~~~~

To resolve this issue:
1. Click Start, click Run, type "secpol.msc", and then press ENTER.
2. Double-click "Local Policies".
3. Double-click "User Rights Assignment".
4. Double-click "Replace a process level token".
5. Click "Add", and then double-click the "Everyone" group
6. Click "OK".
7. You may have to logout or even reboot to have this change take effect.

Please refer to following two screenshots to understand above steps,

http://www.verydoc.com/images/err1314-1.png
 

http://www.verydoc.com/images/err1314-2.png
 
How to solve "SE_TCB_NAME held" error?
On Windows systems, perform the following steps to enable this user right for the user under which VeryDOC Products runs:

1. From the Windows Start menu, select All Programs > Administrative Tools > User Manager


The Windows User Manager window appears.

2. From the Policies menu, select User Rights.
3. Select the check box labeled Show Advanced User Rights.
4. In the drop list labeled Right, select Act as a part of the operating system.
5. Click the Add button.
6. In the Add User and Groups dialog box, ensure that the drop list labeled List Names From displays the correct domain or machine name for the account to be added.
7. Click the Show Users button.
8. In the Names list box, select the user account to be added.
9. Click the Add button. The user name now is listed in the Add Names list box.
10. Reboot the machine.

 
SE_TCB_NAME is named "Run as part of operating system" in the GUI.
 

LsRunAs Command Line Tool

Lsrunas : free runas utility with password parameter (Freeware)

Lsrunas.zip (22.80 KB).

LSrunas can be used to run a command using another user account and passing the password as a parameter.
This is a big improvement over the standard runas tool which is not able to accept a password.
LSrunas can be used in scripts.

Parameters:
-----------
/user: specifies the username
/password: specifies the password
/domain: specifies the domain
/command: specifies the command to execute and the parameters
/runpath: specifies the path where the command should start

Examples:
---------
lsrunas /user:administrator /password:s3cr3tp@ssw0rd
/domain:Mydomain /command:notepad.exe /runpath:c:\

lsrunas /user:administrator /password:s3cr3tp@ssw0rd
/domain:Mydomain /command:"C:\Program Files\Internet Explorer
\iexplore.exe" /runpath:c:\

lsrunas /user:administrator /password:s3cr3tp@ssw0rd
/domain:Mydomain /command:"C:\Program Files\Internet Explorer
\iexplore.exe http://www.google.be" /runpath:c:\

Some remarks:

Works on Windows 2000 and higher
 

CmdAsUser Command Line Tool

CmdAsUser.exe - start a command as a specified user. CmdAsUser.exe command line is a freeware.

CmdAsUser.zip (32.40 KB).

Usage: CmdAsUser.exe <user> <domain> [/p <password>] [/c <command>]

Where:
<user> is the name of the user.
<domain> is the logon domain, specify a period '.' for local.
<password> (optional) is the users password.
<command> (optional) is the command line to execute as the specified
user.

Notes:
If the password is not given then you will be prompted for it.
If the command is not given then "cmd" is assumed.
The calling process needs to either have administrative privileges (ie in the local adminstrators group) or at LEAST the following privileges:
    "Act as part of the operating system" (SeTcbPrivilege),
    "Bypass traverse checking" (SeChangeNotifyPrivilege),
    "Increase quotas" (SeIncreaseQuotaPrivilege),
    "Replace a process level token" (SeAssignPrimaryTokenPrivilege).
The utility may take a while if there is inappropriate security so please be patient.

Examples:

CmdAsUser.exe Martyn . /p GingerNinja /c regedit
CmdAsUser.exe test . /p 123 /c "C:\Program Files\docPrintPro v4.5\doc2pdf.exe" -i htttp://www.verypdf.com -o "C:\out.pdf"
 

RunAs Command Line Tool

Use RunAs utility to execute a program from command line using a different user account.
RunAs is command line utility that can be used to run a program under different user account. RunAs command line is a freeware.

RunAs is similar to the Windows 2000/XP native RunAs utility, but it has some distinct features making it more usable then the native version:

It accepts password as a command line parameter so that it can be used in batch files.
It can bind started process to the interactive user Desktop so it can be used to start interactive processes from various services.

RunAs.zip (5.21 KB).

Here is the help screen containing complete description and examples

Usage: RunAs <user> <password> [/V] <program name>[parameters]

Command line parameters:
 
User Username in form DOMAIN\USER (for local accounts use .\USER format)
Password Password for the user account
/V Optional parameter. If specified binds the process to the interactive user Desktop. (Use this parameter when starting interactive programs from services)
program name Name of the program file to launch. If the name includes spaces enclose the entire name in double quotes.
parameters Optional command line parameters that you want to pass to the program.
 
Run RunAs.exe without parameters from the DOS command prompt to see full description of the supported parameters.
 

Free docPrint Service

docPrint_Service.zip (83.6 KB).
 
docPrint Service can be used to run a Command Line from current active user account or a special user account, this tool is useful to overcome permission restrictions in SYSTEM and Non-Interactive user accounts.
 
Please by following steps to use docPrint Service,
1. Download docPrint_Service.zip and unzip it to a folder,
2. Run docPrint_Service.exe application, you will see an icon appear in tray area,
3. You can run following command lines to test it first, "docPrint_client.exe" will deliver the Command Line to docPrint_Service.exe application, docPrint_Service.exe application will execute the Command Line from active user account automatically,

docPrint_client.exe nowait "C:\VeryDOC\pptconv.exe" C:\test.ppt C:\out.swf
docPrint_client.exe wait "C:\VeryDOC\pptconv.exe" C:\test.ppt C:\out.swf
 
4. You can call "docPrint_client.exe" from your code, please refer to a simple C# code at below,
 
public partial class runpptexe : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Process proc = new Process();
        proc.StartInfo.FileName = "C:\\VeryDOC\\docPrint_client.exe";
        string strArguments = "wait C:\\VeryDOC\\pptconv.exe C:\\test.ppt C:\\test.swf";
        Console.WriteLine(strArguments);
        proc.StartInfo.Arguments = @strArguments;
        proc.Start();
        proc.WaitForExit();
        Response.Write("File has been successfully converted");
    }
}
 

VeryPDFComRunCmd COM Component

VeryPDFComRunCmd is an EXE COM Component which can be used to launch any EXE or Office application from ASP, PHP, C#, .NET etc. program languages. VeryPDFComRunCmd COM is a freeware. (More Information)
 
VeryPDFComRunCmd.zip (825 KB).
 
http://www.verypdf.com/dl2.php/VeryPDFComRunCmd.zip
 
You can use following ASP code to call any EXE or MS Office without any permission problem,

<%

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

%>
 
Here is a PHP example to call an EXE application by 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);

?>
 
ASP.NET example to call an EXE application by VeryPDFComRunCmd COM,
<%

dim VeryPDFCom = Server.CreateObject("VeryPDFCom.RunCmd")
dim strCmd = """C:\VeryPDF\htmltopdf.exe"" C:\Test\in.html C:\Test\out.pdf"
Response.Write(strCmd & vbCrlf)
dim strRet = VeryPDFCom.RunCmd2(strCmd, 5)
Response.Write(strRet & vbCrlf)

%>
 
For more information, please click Here.
 
 

Home | Site Map | VeryPDF.com | VeryPCL.com | Contact | Blog
Copyright © 2002- VeryDOC.com Company. All Rights Reserved.