Windows8 and FileCopy

Started by mjwillyone, January 09, 2014, 11:24:39 AM

Previous topic - Next topic

mjwillyone

Friends,

I have used Winbatch routine for years that simply copies files from our LAN server to the local machines every time the local machine is turned on.  The filecopy command is used.  This routine has worked flawlessly .. until we got new Windows 8 Professional computers.  I have checked to be sure that the user is set up as an administrator on the new computer.  All is well there.

However, I get the error as seen in the attached image.

Any ideas?

Mike

Deana

The screen shot seems to indicate you are trying to copy a file a mapped drive. This can cause issues when running on a system with UAC enabled ( Windows Vista or newer ).

When running as an Administrator, the user has two contexts: the limited user context, and the administrator context. When you map drives in Windows Explorer, they are added only for the limited user context. Thus when the script runs in the administrative context, no mapped drives are 'seen' by the script. WBT files run with user elevation 'HighestAvilable', which means when running under an Administrator account the script is running in the context of the administrator NOT the user. 

Instead of using a mapped drive, I recommend referencing the remote server using a UNC path (i.e. \\SERVER\SHARE\Filename.ext).

Other possible options:

  • Perhaps map the drives under the administrator context in the first place.
  • Interpreted script: Try launching the appropriately manifested version of WinBatch Studio: C:\Program Files\WinBatch\System\WBStudio_IT.exe. WBStudio_IT.exe uses the AsInvoker manifest (this tells WBStudio_IT.exe to run within the user level context ).
  • Compiled script: Compile script using the AsInvoker manifest ( tells the script to run within the user level context ).

Reference: http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/UAC+Mapped~Drives~Issue~with~UAC.txt
Deana F.
Technical Support
Wilson WindowWare Inc.

mjwillyone

Thank you very much!!   Good news that there are ways around this!

Mike

Deana

Yes. My personal preference is to always use UNC paths to get around this type of issue.
Deana F.
Technical Support
Wilson WindowWare Inc.