how to dismount the USB which connected on remote machine using c++ - c++

I have tried:
deviceIoControl function but I think this cannot work for
remote machine (my sample code)
dismount function in WMI but it mount again as auto-mount is
true when I tried to false the automount that function return
mountpoint is available error,So How can I delete mount point in remote machine.
disabling the USB mass storage driver in device manager can dismount
the USB,but can not access the device manager in remote machine
that has windows 8 and after release version click here to see
i am going to try CM_Request_Device_EjectA function but to
connect with remote machine CM_Connect_MachineA function cannot
applied for windows 8 and after release version
I don't know what to do next.I want to do this without mostly setup or configure on remote machine.

Related

Google Cloud Windows Server - Unable to launch a Command prompt

When attempting to forcely uninstall a software from the server, I switched off these two components from MSCONFIG.EXE:
MSConfig Screenshot
After rebooting the server, it doesn't respond anymore to RDP connections.
The Google Cloud Panel shows that the server is running, has an internal and external IP Address, but I cannot access it by any means. I already rebooted, stopped and started it many times.
This is the output for SERIAL PORT #1:
SeaBIOS (version 1.8.2-20181112_143635-google)
Total RAM Size = 0x00000000f0000000 = 3840 MiB
CPUs found: 1 Max CPUs supported: 1
found virtio-scsi at 0:3
virtio-scsi vendor='Google' product='PersistentDisk' rev='1' type=0 removable=0
virtio-scsi blksize=512 sectors=104857600 = 51200 MiB
drive 0x000f2a30: PCHS=0/0/0 translation=lba LCHS=1024/255/63 s=104857600
Booting from Hard Disk 0...
I am able to connect to SERIAL PORT #2, to try a deeper troubleshooting, but the first message after connection is this:
Computer is booting, SAC started and initialized
And when trying to open CMD command, this is the response:
SAC>cmd
Error: Unable to launch a Command Prompt. The service responsible for launching
Command Prompt channels has not yet registered. This may be because the
service is not yet started, is disabled by the administrator, is
malfunctioning or is unresponsive.
Does anyone know how to recover this server?
Thanks!
You unselected "Load system services". This means that nothing is loaded in Windows. The services that are required so that you can access the system remotely are not running.
You have two options:
Mount the disk on another Windows system, mount the registry and change the settings for these two items (I don't rember but this information is on the Internet). Then unmount the registry and create another VM with the disk.
Create a new instance and attach this disk as the second disk drive. Copy all the data from the second drive to the first drive. You will loose system settings, applications, etc but at least you can save your data.

Difference between starting the process directly on machine and from remote desktop connection

I want to know the difference between application started directly on the machine and the application started using remote desktop connection.
Whether both the application are same or will have different privileges.
For example, i had an opengl based application which take higher version of opengl 3 or 4 when started directly on the machine. But when i start the same application from remote desktop connection, it takes only base opengl version 1.1.
One more observation is:
We have a service application which will launch a graphics (OGRE based) application based on request. Request is set from client using web-socket communication.
When we start this service directly in a server, it works fine. But when this service is started from a RDP connection, the graphics application is crashing when user sends request after RDP connection is closed.
IT works if I keep the RDP connection on.
It may loose the graphics driver when you are logged in through RDP.
If you look in the launch the Ogre 'setup' dialog when RDP is enabled it will not list the graphics card - but a different 'RDP driver'.
Also - when you log on\off it might 'reset' the device (since the RDP graphics driver is enabled\disabled) causing your window get loose the device, and then crash.
One way to get around all this - is to use a VNC (for example tightvnc), this does not cause the issues that standard RDP does, since it does not use the RDP graphics drivers and such.

Cannot access wireless connection of host machine from VM created in vmware player.

My host PC is running windows 8 and I'm accessing internet using the wireless connection (as I work in a room which doesn't have wired connection).
I have a VM machine (created using the free vm ware player with guest operating system: windows 2008 r2) with network adapter setting set to Bridged. I cannot see my wireless router in network connections.
NB: I tried the following so far:
1) I have enabled wireless from the windows services features on my guest PC (VM)
2) Created a Microsoft loop back on host PC
3) Allowed other network users to connect through this computers connection and set the home networking connection to the loop back created in the previous step
4) Changed the VMsetting (Network adapter) to Bridged.
As you said, the vm creates automatically a "bridge".
So if the wifi is active and working in your Win8, the vm will automatically use the wifi connection.
Just notice, inside your vm, the wifi connection is invisible, because masked as a wired one.
The "bridge" created is in fact a masked connection between your wifi and the wired network inside vm.

Access to virtual machine on vmware

I have a virtual machine (VMware) running Windows 7 Ultimate, there is no firewall on the machine.
I can remote desktop to it,
I can successfully ping it from my development machine, and I can successfully ping my development machine from it.
The virtual machine appears in explorer under Network, but if I click on it, it says that windows cant communicate with the device or resource, same goes for trying to access it using UNC notation (\\servername) and even UNC using ip address (\\xxx-xxx-xxx)
Any ideas?
The Windows UNC syntax for a networked machine should be \\<name> or \\<ip>.
Edit:
You'll only be able to access shared folders over Microsoft Windows Network (aka SMB). You probably haven't set up shared folders. Read this: VMWare Workstation 4: Using Shared Folders

Cannot connect to virtual machine console

I have a virtual machine created from an linux image (and powered on). I want to be able to access its console in VCenter, but right now I am getting this error:
"A secure connection to the host could not be established"
The console is a black screen with nothing on it and no interaction. This happens for any VM in VSphere. Bizarrely I can telnet in to the console port 902, but there doesn't even appear to be any attempt to connect to the console (checking tcp/ip traffic in Task Manager).
SSHing in is not possible because the reason I wanted console access to begin with was to run commands to set up an IP address for this machine.
Some facts: Opening an external console window does nothing (same error). I'm running Windows XP Professional (out of VirtualBox if it matters). My colleague on the exact same setup (same version of XP, same version of VCenter) can connect to the console just fine.
Does this problem happen when you connect directly to the ESX/ESXi ?
if not you have connection problem beetween esx and vcenter.
you can find here a list of common ports :
http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=1012382&sliceId=1&docTypeID=DT_KB_1_1&dialogID=312218113&stateId=1%200%20312216906#vCenter 4.x
Turns out that when connecting to vcenter I needed to use https instead of http. Boy howdy, do I feel smart now.