Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Re: Newbie: where to start?

Reply
 
Old 07-01-2009   #1 (permalink)
Mark D. MacLachlan


 
 

Re: Newbie: where to start?

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

--


My System SpecsSystem Spec
Old 07-01-2009   #2 (permalink)
Paul Randall


 
 

Re: Newbie: where to start?


"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


My System SpecsSystem Spec
Old 07-01-2009   #3 (permalink)
Mark D. MacLachlan


 
 

Re: Newbie: where to start?

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
--

My System SpecsSystem Spec
Old 07-01-2009   #4 (permalink)
Paul Randall


 
 

Re: Newbie: where to start?


"Mark D. MacLachlan" <markdmac@xxxxxx> wrote in message
news:ObpLmOm%23JHA.1252@xxxxxx
Quote:

> Paul Randall wrote:
>
Quote:

>>
>> "Mark D. MacLachlan" <markdmac@xxxxxx> wrote in message
>> news:%23zJo2ch%23JHA.2120@xxxxxx
Quote:

>> > 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.
>
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
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.

-Paul Randall


My System SpecsSystem Spec
Old 07-22-2009   #5 (permalink)
Reventlov


 
 

Re: Newbie: where to start?

Il giorno Tue, 30 Jun 2009 23:43:14 -0700, "Mark D. MacLachlan" <markdmac@xxxxxx> ha
scritto:
Quote:

>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.
I did not know of this. Thank you.
Giovanni

--
Giovanni Cenati (Bergamo, Italy)
Write to "Reventlov" at katamail com
http://digilander.libero.it/Cenati (Esempi e programmi in VbScript)
--
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Re: Newbie: where to start? VB Script
newbie here need a lil help Vista installation & setup
Newbie PowerShell
newbie VB Script
newbie VB Script


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46