Jump to content

Using VMware to access network shared files


Recommended Posts

Hello all ~

I am running an autoit script on Windows 10 inside VMware Workstation 12 Pro version 12.5.2.  Technically I am remoting into ESXi which has a Domain Controller (DC), WebServer, FilServer, Windows 10, etc.  Using the GUI (i.e. running explorer.exe) I am able to open several different folders successfully.  The desktop, documents, USB external all open without issue.  The network share opening gives me issues.  Whenever I attempt to open \\filserver\users\user\sharedfolder I get the documents folder instead.  I understand that the documents folder is the default for explorer.  I have also attempted to use the letter drive mapped to the network share (Z:) and receive the same result.  When I run this script on Windows 10 alone without  the VM or the ESXi I am able to open the network share without problems.  I have tried to use the net use command to designate a letter M: to the network share folder prior to running the script.  This did not work for me.  

One additional avenue I think might work is to use the systreeview321 and _GUICtrlTreeView_FindItem to step through the tree looking for the network share.  Once found,  double click on it and see if that opens the shared network folder.  I can click inside the VM with my mouse on the network share and it opens just fine.  Not sure if running up against GUI issues, or permission issues, or what?

Thanks in advance,

Davida Crozier

TestNetworkShare.au3

This script is a subset of a much larger program, but it illustrates what I am dealing with.

VirtualNetworkEditor.PNG

Link to comment
Share on other sites

  • Moderators

I'm sorry, I am confused. You state you are running in VMware workstation, but you reference ESXi, which is a vSphere product. Have you created an embedded ESXi host in Workstation? If so to what end? And do you understand you are not going to be able to remote to a share on ESXi as you would a windows box, you would need to use esxcli or putty?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Let me try to explain a little better.  I have a small Intel i7 machine that is running ESXi as a host.  Under ESXi a VMware virtual machine is running a Domain Controller, a Web Server, a File Server, Windows 10, Windows 8, Windows 7, etc.  Each of the operating systems listed are a separate virtual machine running under the ESXi umbrella.  Within ESXi there is a virtual switch that enables communication between each of the virtual machines.  This setup is intended to allow a 'real world' testing environment for our firm.  When I am sitting at my PC, I remote into the server via VMware (start VMware and click the button that says connect to a remote server).  The VM I am using is not on my machine, but the ESXi box.  I hope this better explains our setup.  

As far as the original request is concerned, I logged into the Windows 10 VM using the Domain Controller Administrator ID.  I mapped the network share to drive M: again.  The initial explorer call opened the network share folder when I used the drive letter (M:) but subsequent attempts to open new folders on the network share folder failed.  The problem seems to be that when it opens the folder and I attempt to get the windows handle it returns all zeroes 0x000000 for the windows handle.  I attempted to run it with the full UNC path and got the same results.  

As always your help is most appreciated,

Davida Crozier

Link to comment
Share on other sites

Use the File* functions instead after mapping the share...much easier than automating explorer windows.  What specifically are you attempting to automate within explorer.

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

I am attempting to simulate the GUI (using explorer) and study the artifacts that windows leaves behind when the script does several different functions such as create new files/folders, rename them, copy them, delete them, etc.  

I do not understand exactly what you mean when you say to use the File* functions.  Would you elaborate for me?

Thanks so much,

Davida

Link to comment
Share on other sites

  • 2 weeks later...

The domain controller admin userid was the trick - not a good real world solution but sufficient for my purposes.  The windows handle was zero because the WinGetHandle parameters were incorrect.  @jdelaney I could not use those commands (although I am certain they would work) because I am trying to simulate the GUI as if a person was sitting at the computer and typing all these commands.  The artifacts I am looking for (Shellbags) are only created by the GUI.  

Next problem that I am having is with Windows 7 Ultimate.   The previous program ran on Windows 10 Pro.  This script is opening an explorer window to Desktop and then attempts to create/allocate a folder on the Desktop.  Using ControlSend Alt F (for file), W (for new), F (for folder), {ENTER} to select folder, then ControlSend the folder name followed by {ENTER}.  The first iteration works OK but the second iteration does not.  The second time through the Alt F (for file) brings up a much larger menu, selecting W gives me a windows command window and the program goes downhill from there.  Why would the menu for Alt F change after running the first time?  The first iteration sometimes selects an .au3 file and while I think it would rename it, it does not...it just says 'New AutoIt v3 Script.au3'.  

The code is included below along with the log file create by the program.  As always, any help with this would be greatly appreciated.  Even though answers are hit and miss sometimes, I find they give me different avenues to examine that I had not thought of before.  

 

code.au3

 

logfile.txt

Edited by davidacrozier
Clean up post
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...