Highlighted
Trusted Contributor.. Trusted Contributor..
Trusted Contributor..
286 views

VuGen - How to run System-Command under System32 cmd.exe?

Hello everyone,

is it possible to execute the system (or popen) command in VuGen running the cmd.exe prompt under C:\Windows\System32\cmd.exe? Currently it always starts a process under C:\Windows\SysWOW64.

The ps1 Skript I need to execute just runs in system32. I have tested that manually.

Setting the full path (e.g. system("C:\Windows\System32\WindowsPowerShell\v1.0\Powershell.exe -File C:\Temp\Powershell.ps")) doesn't work.

Regards,
Kevin

0 Likes
1 Reply
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: VuGen - How to run System-Command under System32 cmd.exe?

Try via indirection:

system("cmd.exe /c put-here-your-command-with-arguments");

examine the cmd.exe options.

Signature:
Reward community members who take time to respond and help.
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.