Link to home
Start Free TrialLog in
Avatar of Gayathriadithya
Gayathriadithya

asked on

RUNDLL32 and STRPCCMD

I want ot open a cash drawer through AS/400.So  iam using this code

            STRPCO     PCTA(*NO)                        
            MONMSG     MSGID(IWS4010)                    
            STRPCCMD   PCCMD('C:\RMS400\CDK') PAUSE(*NO)

this CDK is an EXE file. While running this I am getting a DOS prompt, to avoid this popup can i use RUNDLL32. If yes, how it can be used. what are the parameters i need to send in STRPCCMD.



 
ASKER CERTIFIED SOLUTION
Avatar of Gary Patterson, CISSP
Gary Patterson, CISSP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Member_2_276102
Member_2_276102

Gayathriadithya:

The [ RunDLL32.EXE Shell32.DLL,ShellExec_RunDLL ] shell functions work very well. As always with STRPCCMD, the 123-char limit on the command string still must be watched. The alternative RUNRMTCMD can often be more useful than STRPCCMD, particularly when you don't know if the remote system is a Windows PC.

Tom
Tom's right - RUNRMTCMD is a nice solution where you can use it.  It runs as a service on Windows.

When I run a command-window program (as opposed to a Windows program) on Vista Business using

STRPCCMD 'RunDLL32.exe SHELL32.DLL,ShellExec_RunDLL ipconfig.exe') PAUSE(*NO)

I still get the annoying flashing DOS box that pops and quickly disappears.  Using the WSCRIPT technique above, there is no visible artifact shown on the user's screen, plus with the 123 character limit, that long call really eats up your workspace.

Of course, you may see different behavior on other versions of Windows.  Just thought I'd mention my results.

-Gary Patterson

Avatar of Gayathriadithya

ASKER

Thanks for your suggesstion, Excellent solution you have given.