Re: Query folder backup operator

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On Apr 28, 11:40 pm, "Pegasus [MVP]" <n...@xxxxxxxxxxxxx> wrote:
"Juan" <jvaleromt...@xxxxxxxxx> wrote in message

news:2ae9a81a-e584-4cf5-8651-f670336f3378@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Thank you again Pegasus.

I know that the script works fine, but, as you say, my problem is with
the protected folders. I need to access every file in the computer,
regardless of the folder permissions. As I said in my previous
message, if I used the robocopy resource kil application, I could
access the folder content. I only need to list every files, I don't
need to access the file content.

Using the processmonitor application, I've noticed that robocopy
access the folder using the "open for backup" option. My question
is... Could I use the "open for backup" option in a vbscript? How
could I specify this option?.

Again, thank you very much for your help.

Regards

===================

WMI should be able to do it but I can't quite get it to work:

Set oWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate,(Backup)}!\\.\root\cimv2")
Set oFolder = oWMIService.Get("Win32_Directory.Name='e:\System Volume
Information'")
RetCode = oFolder.copy("c:\Test")

See also here:http://msdn.microsoft.com/en-us/library/aa392758(VS.85).aspx.
Post again if/when you find the solution!

WMI may solve my problem, but I have to control the performance of the
script, I mean. the script must be executed with the lowest priority,
so the user mustn't be concious that the script is running.

If I used WMI, the query to search files (WQL) would be executed
without the control of my script, so the query could take longer and
influence the performance of the computer.

Thank you very much for your help. If I found the solution, I would
post it.
.



Relevant Pages

  • Re: Testing If Active Directory Replication Has Occurred
    ... solution is to use a global catalog query instead of an LDAP query and ... > the root domain on a specific user account that has just been created ... > means that when we create a new user, the script needs to also create ... > folder redirection works fine. ...
    (microsoft.public.scripting.vbscript)
  • Re: Querying the WMI
    ... "Jeremie Legault" wrote in message ... I would like to query the Event log but I am having a lot of trouble ... Here is a smaller test script I was using to test the problem and how ... > Anyway I am not as familiar with VBscript, WMI queries, and scripts as I ...
    (microsoft.public.scripting.vbscript)
  • Re: rename files in directory
    ... When I run your script I get an error: " Microsoft VBScript runtime error: ... contain a " - " string. ... as part of the query. ... if the target folder has files with names in a format other ...
    (microsoft.public.scripting.vbscript)
  • Re: User account and Personal folder mismatch script
    ... I believe you want a script that can be run by an administrator that will ... The script above only documents if a home folder has been assigned. ... > End Sub ...
    (microsoft.public.scripting.vbscript)
  • Input on CleanUp script
    ... Since I'm going to be using this script in a production environment, ... If the script is used with a backup folder ... var strTargetFolder, strBackupFolder, args0, args1, args2, noArgs; ...
    (microsoft.public.scripting.wsh)