Highlighted
Absent Member.. Absent Member..
Absent Member..
915 views

Call a CMD file from Laodruner

 HI,

I am trying to call a GO.CMD  fil using system("C\\FILE.cmd");

But this is not working. CMD opens for a sec and closes quickly.

 

Can anyone suggest an alternative solution.

0 Likes
7 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Call a CMD file from Laodruner

Hi

Looks like a simple typo in the call, missing a ":"

 system("C:\\FILE.cmd");

This will work.

br /ola


Please mark post as solved if your problems or questions is/are resolved.
If this post was valuable to you, please consider kudo it.

 

 

 

.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Call a CMD file from Laodruner

it was typo mistake from my side.

I am using below line only.

system("C:\\FILE.cmd");

but CMD is not executing the code. 

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Call a CMD file from Laodruner

Ok, then it is standard and should work.

Is it working in vugen, but fails in Performance Center?

Is the file available on all LoadGenerators.
Are you running the Performance Center as a service, then will no one be logged in and network shares or resources will not be available
Are you running as a Process or Tread?
Have you tried adding pause in the start of the script?

br /ola


Please mark post as solved if your problems or questions is/are resolved.
If this post was valuable to you, please consider kudo it.

 

 

.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Call a CMD file from Laodruner

I am testing on Vugen only.

I ran both as thread or process and using Pause as well.

 

Its not working....

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Call a CMD file from Laodruner

And it works if you start a command prompt  and run it manually there as

C:\FILE.cmd

Or can it be something with the file assosiations in windows? Or file permissions in the root folder, try move and change to a
c:\temp\FILE.cmd

I have done things like this many times, and also made sure before posting first reply, that it works for me with a .cmd file with

system("c:\\work\\test.cmd");



br /ola


Please mark post as solved if your problems or questions is/are resolved.
If this post was valuable to you, please consider kudo it.

.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Call a CMD file from Laodruner

I have tried changing the folder location as well.

 

Same result unfortunately!!

 

IN CMD i am ble to run the file manually

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Call a CMD file from Laodruner

Sorry, no more ideas then.

br /ola

.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.