Paul Randall wrote:
Quote:
>
> "Mark D. MacLachlan" <markdmac@xxxxxx> wrote in message
> news:%23zJo2ch%23JHA.2120@xxxxxx Quote:
> > Dennis B. wrote:
> > Quote:
> > > 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.
Code:
strCommand = "regedit /e c:\MicrosoftRegistrySave.reg
HKEY_LOCAL_MACHINE\Software\Microsoft"
Set WSHShell = CreateObject("WScript.Shell")
intErr = WSHShell.Run(strCommand, 0, TRUE)
If intErr = 0 Then
WScript.Echo "Registry export was successful."
Else
WScript.Echo "Error encountered exporting Registry: " & intErr
End if
Hope that helps.
Regards,
Mark D. MacLachlan
--