"Mark D. MacLachlan" <markdmac@xxxxxx> wrote in message
> Paul Randall wrote:
>> "Mark D. MacLachlan" <markdmac@xxxxxx> wrote in message
>> > Dennis B. wrote:
>> > > I know that there is a wealth of information on the www re.
>> > > scripting but I'm just wondering if anyone has a "favourite" site
>> > > they like to refer to? I'm also after the wsh object model.
>> > >
>> > > My goal is to convert our current logon script written in Kix to
>> > > vbscript. Current script does not do much: map drives, install s/w
>> > > updates and a few other minor things. However, I'd like to provide
>> > > user feedback via a dialog, somewhat similar to program
>> > > installation dialogs where a progress bar and/or checklist is
>> > > displayed.
>> > >
>> > > What object do I reference?
>> > >
>> > > Cheers,
>> > > Dennis.
>> > You might want to check out Windows Scripting Self Paced Learning
>> > Guide by Ed Wilson, MS Press. That is the book that Microsoft uses
>> > for VBScript workshops.
>> > In addition to that, I would recommend that you download the
>> > Portable Script Center from the Microsoft web site. It has many
>> > very useful samples.
>> > Hope that helps.
>> > Regards,
>> > Mark D. MacLachlan
>> I would agree, with one exception.
>> Many scripts are included on the included CD that demonstrate the
>> principles the book talks about. The book does not talk about how to
>> have the scripts save the current settings that the sample scripts
>> will change; some of the scripts make changes that are not easily
>> undone. There is no contact information in the book that can get you
>> to a web site or person who can help you undo the changes that do
>> things like prevent you from accessing the internet. I seem to
>> recall that these nasty things started at about 'Lab 28', with use of
>> 'SetDNSDomain'. Perhaps the workshops cover this topic (how to
>> undo), in which case not having that info in the book would provide a
>> lively discussion in the workshop.
>> -Paul Randall
> An interesting point you have raised Paul. I used to teach that class
> for Microsoft and we would indeed have such discussions. Standard
> disclaimers are always given, danger danger Will Robinson, you are
> about to change the registry. Make sure you have a backup! One can of
> course export the keys prior to making any registry changes and then
> simply restore that backup to undo changes.
> This can easily be accomplished with the following code.
> strCommand = "regedit /e c:\MicrosoftRegistrySave.reg
> Set WSHShell = CreateObject("WScript.Shell")
> intErr = WSHShell.Run(strCommand, 0, TRUE)
> If intErr = 0 Then
> WScript.Echo "Registry export was successful."
> WScript.Echo "Error encountered exporting Registry: " & intErr
> End if
> Hope that helps.
> Mark D. MacLachlan
Thanks for the feedback.
I think that for a book like this, which many people will take a week or
maybe a month to go through, a subroutine should be designed such that each
time one of the labs modifies a registry entry, it first calls this routine
to append dated text to a registry change log, so that a person can easily
go through that text file and see all the times any key was changed. It
might take days to find out the effect of some registry change, so your
registry backup could be out of date due to automatic updates, for example,
by the time you find that you need to restore something from it.
The book does say 'make a backup of the registry' lots of time, but that is
not always enough.