Showing results for 
Search instead for 
Did you mean: 

Need help in below scenario

New Contributor

Need help in below scenario

Hi All, Please help in below scenario:


1. I have started cmd using testedApp.cmd.Run

2. Want to set another path as C:\A\B


and then type <anycommand> and Enter


I am not able to do it , Please provide mw quick help.


Many thanks in advance.

New Contributor

Re: Need help in below scenario

Below code also is not working:


Set objShell = CreateObject("WScript.Shell") ' Create object of Shell
objShell.Run "CMD /K" ' Open Command mode


objShell.SendKeys("CD C:\applications\deal-o-matic")' To type a command


Please help...

Community Hero

Re: Need help in below scenario



1) Changing Path for some given cmd session changes environment for the given session only (and its spawned processes). So in order to have an effect from changed Path value you must execute all subsequent commands from the same cmd session;


2) I am doubting that you are testing how cmd handles its environment... What is the actual task that you need to do?


3) > Below code also is not working:

It would help if you let us know what exactly does not work, what error do you have and all other details that might help any other person to understand the problem and try to help with the solution.

  /Alex [Community Hero]
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
New Here?
Join us and watch the welcome video:
Top Kudoed Authors