473,397 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

System Restore WMI classes

I'm a complete newbie to WMI but i need to make up a script so as to
disable system restore on all of our machines on the network remotely.
I already have two pieces of the puzzle if anyone can help piece them
together it would be much appreciated. Firstly i have the script to
look at the domain and build a list of the computer names:

Function connectedMachines ()

'==Lists connected machines

Dim oComputer
Dim s

Dim oDomain
set oDomain = getobject("WinNT://Benenden")
oDomain.filter = Array("Computer")

For each oComputer in oDomain
s = s & oComputer.Name & vbcrlf
Next

connectedMachines = s

End function

Then secondly i have found the System Restore WMI class for disabling
it:

uint32 Disable(
String Drive
);

and also some example code:

Set Args = wscript.Arguments
If Args.Count() > 0 Then
Drive = Args.item(0)
Else
Drive = ""
End If

Set obj = GetObject("winmgmts:{impersonationLevel=impersonat e}!root/default:SystemRestore")

If (obj.Disable(Drive)) = 0 Then
wscript.Echo "Success"
Else
wscript.Echo "Failed"
End If
This is as far as i've got if any one can shed any more light that
would be great.

Andrew
Nov 20 '05 #1
0 1123

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ed Glunz | last post by:
I'm not quite sure where to post this, but I figured these two groups would be a good start. I had a very nasty surprise this morning (7/26/05). I had to do a system restore to a restore point...
4
by: ScottH | last post by:
I am running 7.2 with fixpack 10a under W2K. I got a backup from someone else in an attempt to debug a data issue. The other person created the database with UTF-8 (codepage 1208), so I created a...
6
by: clvrmnky | last post by:
I've got a database backup from another system which I'd like to restore to a test system. Both the backup and restore systems are Solaris 8. I don't recall the DB2 version, but I do know that...
2
by: anna_cheng11 | last post by:
We do not have a DBA available, and this is a development environment, hence I was asked to do the work. I am not a DBA. I need some help to clarify my understanding of DB2 recovery and I am...
3
by: Peter Ammon | last post by:
Serves me right, I guess. My Windows machine mysteriously stopped getting any access to the network. I rebooted, reset the TCP settings, tried the same connection on my Mac (which worked), ran...
1
by: ruben | last post by:
Hi: I'm trying to dump tableA and restore it to tableB: $ ./pg_dump -Fc -t tableA databaseA -f tableA.dump -v $ ./pg_restore -t tableB -d databaseA tableA.dump -v pg_dump creates...
2
by: VB Programmer | last post by:
I had to do a system restore today. I restored it to 2 weeks ago. After it was done I entered VS.NET (latest version) and it said I was entering it for the first time. I opened up a web...
1
by: =?Utf-8?B?Q29icmE1Nw==?= | last post by:
My problem is system restore will run and restore points are created, but when I try to restore back to a earlier date, system restore starts, reboots my computer, and then I get the message that...
4
by: =?Utf-8?B?TXJzIE5vYWNo?= | last post by:
Hi to all you wonderful people, have read some of the answers re:- system restore, but non of the questions seem to fit my problem. Windows XP Home Edition Version 2002 Service Pack 2 When I...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.