Quantcast
Channel: VMware Communities : Popular Discussions - VIX API
Viewing all articles
Browse latest Browse all 34639

[1.8.1] RunProgramInGuest does not start a programm with a graphical user interface on a windows 7 system

$
0
0

 

Dear members,

 

 

Since some days I am trying to start a programm with a graphical user Interface on a windows 7 system by using the RunProgramInGuest function.

 

 

The code for this is like .

 

 

Inside the bat file I am performing some normal dos commands like "copy". They are working fine.

 

 

But I am also trying to exeucte a programm with a graphial user interface inside this batch.

 

 

This exe is not starting and the batch is stopping :-(.

 

 

In additon I found the hint . But VIX_CONSOLE_USER_NAME is not longer defined.

 

 

So how can I start a programm with a graphical user inferface on a windows 7 system by using the API version 1.8.1.

 

 

Thanks for your help.

 

 

Best Regards

 

 

Frank

 

 

 

 

job = vm(x).RunProgramInGuest("C:\windows\system32\cmd.exe", "/c c:\ExecuteBeforeShutdown.bat  2>&1 >>c:\out.txt", VixCOM.Constants.VIX_RUNPROGRAM_ACTIVATE_WINDOW, Nothing, Nothing)

 

 

 

 

If the program to run in the guest is intended to be visible to the user in the guest, such as an application with a graphical user interface, you must call VM::LoginInGuest() with VixCOM.Constants.VIX_CONSOLE_USER_NAME as the username and NULL (C++), null (C#), or Empty (VB) as the password before calling this function. This will ensure that the program is run within a graphical session that is visible to the user.

 

 

 

 

 


Viewing all articles
Browse latest Browse all 34639

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>