cancel
Showing results for 
Search instead for 
Did you mean: 

cmd attach issue

SureshBABU4
Level 2
hello friends,

we are facing issues with cmd (batchfile) by default using utility environment object its opening with syswow64, but for our successful batch file execution we need to open in system32 and after that we need to send parameters to batch file and read the output from batch file.
we managed to launch batch file in system32 using wild card but attach is application madular is not working properly (once in 10 times may work)
we require your help to solve this issue.

------------------------------
Suresh BABU
RPA developer
Deuscthe bank
Asia/Kolkata
------------------------------
1 REPLY 1

GopalBhaire
Level 10

This is because of WOW64 file system redirection, to disable do the following changes in Utility - Environment

Add following line to Global Code Stage

Private Declare Function Wow64EnableWow64FsRedirection Lib "kernel32.dll" (ByVal Enable As Boolean) As Boolean


And add following lines to Start Process Read Stderr and Stdout Action's code stage

At beginning of code stage 

Wow64EnableWow64FsRedirection(False)

At end of code stage

Wow64EnableWow64FsRedirection(True)

Pass batch file in Program and arguments in Argument data items resp. and read output in Standard Output data item, it should run in System32 now and no need to attach to cmd window



------------------------------
Gopal Bhaire
Analyst
Accenture
------------------------------