Scripting Week 3 Question and Answer Log

Monday, October 24: Script It Up a Notch

Following is an edited and annotated version of the question-and-answer log compiled during the Scripting Week 3 webcast Script It Up a Notch: Adding a Little Pizzazz (and a Lot of Functionality) to Your System Administration Scripts. For more information about Scripting Week 3 – including the Q-and-A logs for the other webcasts – please visit the Scripting Week 3 home page.

*

Adding a Little Pizzazz (and a Lot of Functionality) to Your System Administration Scripts


feedback.gifspacer.gifI need help identifying user accounts with the Expiration date set and sending out a notification. Seems you need to be an Administrator to validate if the date is set. I am being asked to run this through our logon script. Help?

Yes, you need to be running as member of Administrators group to connect to AD with ADSI.

Post-Webcast Annotation. If your users have the right to read their account attributes in Active Directory then you could use code like this within a logon script in order to report back their account expiration date:

On Error Resume Next 
Set objSysInfo = CreateObject("ADSystemInfo") 
strUser = objSysInfo.UserName 
Set objUser = GetObject("LDAP://" & strUser) 
If IsNull(objUser.AccountExpirationDate) or objUser.AccountExpirationDate = "1/1/1970" Then 
    Wscript.Echo "Your account has no expiration date." 
Else
    Wscript.Echo You account expires on " & objUser.AccountExpirationDate & "." 
End If

Alternatively, you could search Active Directory to return a list of all the users whose accounts will expire at some point. This Hey, Scripting Guy! column does the opposite – it retrieves a list of all the users whose accounts will never expire – but it could easily be modified to search for users whose accounts will expire.


feedback.gifspacer.gifAre Scripting Weeks 1 and 2 available for download? If so, where?

Look here: http://www.microsoft.com/technet/scriptcenter/webcasts/archive.mspx.


feedback.gifspacer.gifAre we ever to see Dr. Scripto in the \Windows\Msagent\chars directory?

We'll have to look into that. No promises, but we'll look into it.


feedback.gifspacer.gifAny plans for more in-depth webcasts on HTA's in the near future?

Thursday's webcast is all HTA all the time. Do you mean after that? We'll have to see how reaction is to Thursday’s presentation.

Post-Webcast Annotation. You might also check out the HTA Developer’s Center for more on HTAs.


feedback.gifspacer.gifThe prize drawing: does this include international viewers?

All the official rules are here: http://www.microsoft.com/technet/scriptcenter/webcasts/sweek3/dinnerrules.mspx.

Post-Webcast Annotation. We should probably note that the Scripting Guys do not make up the rules for the giveaways; that is handled by Microsoft’s legal department. And, unfortunately, international viewers are not eligible for the grand prize. Sorry.


feedback.gifspacer.gifWhat's the future of the Scripting Guys with MSH waiting in the wings?

There are a couple of new scripting technologies coming down the pike, MSH among them. When it gets out and people start to use it, we'll start writing and doing webcasts about it. But we try to focus on the mainstream scripting technologies that most people are using now.


feedback.gifspacer.gifAny chance creating custom objects / classes will get incorporated into Scripting Week / the ScriptCenter?

It's good to know you're interested in this. We'll add this to the list of topics people have asked for.


feedback.gifspacer.gifWhat happened to the scripts from Week 2?

They're available here: http://www.microsoft.com/technet/scriptcenter/webcasts/sw2scripts.mspx.


feedback.gifspacer.gifWhy, on some workstations, are the properties of Win32_Process populated and other seemingly-identical systems they are not?

There are a number of potential reasons. Probably those seemingly-identical systems are not identical. Send more details (which properties); maybe we can nail it down for you.


feedback.gifspacer.gifIs there any way to trigger a task based on creation or deletion of an object in an OU?

Probably. Maybe getting the object name and using WMI eventing to monitor __InstanceCreationEvent and __InstanceDeletionEvent. Never tried it.

Post-Webcast Annotation. Alain Lissoir (a Program Manager with the WMI team) has written an article that talks about using WMI to monitor Active Directory. We should note that the WMI provider for Active Directory is noted for being a bit on the slow side; therefore, you’ll probably want to test any script thoroughly before implementing it.


feedback.gifspacer.gifI have emailed the Scripting Guys and did not get a reply. Why?

First of all we apologize for that. Basically, we are victims of a little bit of success: we get far too many emails to respond to all of them these days. We do our best, but it has become impossible to respond to everyone.

Post-Webcast Annotation. For example, this past weekend we received about 200 emails. If you assume it takes 5 minutes to reach and respond to each email, that would be 1,000 minutes (over 16 hours) of work right there. We’re just too small a team to handle that volume of email. Sorry. If you have questions that need immediate responses, you might try the newsgroup for system administration scripting.


feedback.gifspacer.gifWhatever happened to posting the scripts from "Look Mom, I'm a Scripting Guy" from Scripting Week 2?

We are still working on that, and customer-submitted scripts in general. We're almost there (we think). I know it sounds like a trivial thing, but it's taken us a whole lot of work to get approval to do it and we're still jumping through the last few hurdles. Should be fun though; we're really looking forward to it. Sorry for the long wait.


feedback.gifspacer.gifWhy don't you guys write a GUID-o-matic?

Might be a good idea.


feedback.gifspacer.gifIs there an easy way to browse or discover ActiveX Controls that would be useful in scripting? Do these also work in HTA's?

I think Greg's about to talk about that. Yes, they work in HTA's, and that makes for very cool GUI wrappers.


feedback.gifspacer.gifIs there a script to enumerate all available controls?

Not that I'm aware of, but it's a good idea. We'll look into it.


feedback.gifspacer.gifDoes the ActiveX control’s class ID vary due to language changes on the OS?

No, this should be universal as far as I know.


feedback.gifspacer.gifWhere are the virtual scripting labs? And can I test LDAP there? Need to figure out how to list a user's OU and don't have AD locally.

The labs are available here: http://www.microsoft.com/technet/scriptcenter/learnit.mspx#EKF.


feedback.gifspacer.gifIs that browser IE 7?

Doesn't look like it; Greg must just have some add-on stuff installed.

Post-Webcast Annotation. Actually, Greg has been playing around with some of the Internet Explorer add-ons available from MSN. He downloaded and installed several of the add-ons to see whether or not they could be scripted. (The answer: kind of sort of.)


feedback.gifspacer.gifThat's the biggest problem I've run into when scripting: finding properties for classes! Any suggestions?

Yes, that's why we wrote the Scriptomatic (available in the Script Center) for WMI class properties. For COM objects, check out the VB Object Browser (search should give you plenty of hits).


feedback.gifspacer.gifHow can play a sound without Sndrecorder?

As long as you have Windows Media Player or another media player, you just link to the sound file with an A HREF link. Other ways are possible as well.


feedback.gifspacer.gifDid you guys ever integrate that great Maticoscript into Scriptomatic 2?

Not in Scriptomatic 2, but Matico will be one of the first community-submitted scripts we'll get up.


feedback.gifspacer.gifCan you repeat that link?

For the calendar control? It’s here: http://www.microsoft.com/technet/scriptcenter/topics/htas/calendar.mspx.


feedback.gifspacer.gifWhere can I find a list of available objects and their class ID/parameters?

Check out the Script Center next week. Otherwise, it's a matter of digging around the documentation for the control.


feedback.gifspacer.gifCalendar control: I get a Service Pack 2 "To help protect your security..." warning. Can't you create it as an HTA?

Yes, you can use these controls in an HTA.


feedback.gifspacer.gifIs there a way to patch the day in other formats, such as Monday, October 24, 2005?

Not sure of the context, but if you need to convert between date formats, check out: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vsfctformatdatetime.asp.


feedback.gifspacer.gifIs Err in this case the HTTP status code?

No, it's the VBScript Error object.

Post-Webcast Annotation. The question refers to the script that opens an HTML page and then waits for the value of the hidden field to change; this is done by periodically checking the value of that field. If the browser process should disappear for some reason, that will generate an error. And, yes, this will be the VBScript Err object.


feedback.gifspacer.gifFor this script, then, the html file would have to be copied to the machine first?

This is assuming you're running the HTML page and the script together on the local machine.


feedback.gifspacer.gifIs there an ActiveX control for browsing Active Directory, maybe one that returns the GUID of the object selected?

Not that I'm aware of.


feedback.gifspacer.gifCan you use system variables with objExplorer.Navigate?

I don't believe so: you're giving Internet Explorer a URL and Internet Explorer doesn't have access to the local system variables (as far as I know).

Post-Webcast Annotation. One thing that does work is to construct the file path (using a variable) and then pass that file path to the Navigate method. Here’s an example that uses WMI to retrieve the path to the Windows folder, and then constructs a path to the file Calendar.htm. That path is stored in the variable strFilePath and then passed to the Navigate method:

strComputer = "." 
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") 
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem") 
For Each objOperatingSystem in colOperatingSystems 
    strWindowsFolder = objOperatingSystem.WindowsDirectory 
Next 
strPath = strWindowsFolder & "\calendar.htm" 
Set objExplorer = CreateObject ("InternetExplorer.Application") 
objExplorer.Navigate "file:///" & strPath
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Width = 400
objExplorer.Height = 300
objExplorer.Visible = 1


feedback.gifspacer.gifWouldn't it be better to do (intHorizontal - ojbExplorer.width)/2 ?

Might be. Sorry, I missed Greg's slide.

Post-Webcast Annotation. Yes. So why didn’t we do that? Well, because we’re trying to teach a new concept we wanted to make it very clear where we were getting our values from. But, yes, in a real script you’d want to avoid hard-coding in widths and heights.


feedback.gifspacer.gifI'm trying to grab some PerfMon data from a front end Exchange box regarding IMF data. I don't know what to use in the script. Here are the counters I’m trying to get::

"(PDH-CSV 4.0) (Central Daylight Time)(300)"

"\\MAILFE01\MSExchange Intelligent Message Filter(_Total)\Total Messages Scanned for UCE"

"\\MAILFE01\MSExchange Intelligent Message Filter(_Total)\Total UCE Messages Acted Upon"

Don't know that off the top. We have to focus on questions relevant to today.

Post-Webcast Annotation. If you’re running on Windows Server 2003, you can check WMI’s Win32_PerfFormattedData classes to see whether there are any Exchange-related performance counter classes (and there should be). The Script Center also has an article that discusses writing performance monitoring scripts for Windows Server 2003. If you’re running on Windows 2000, you can check WMI’s Win32_PerfRawData classes. Unfortunately, working with these “uncooked” performance counters classes can be tricky; for more details, see our article How’s My Driving: Monitoring Performance Using WMI.


feedback.gifspacer.gifCan I logoff users’ connections with Terminal Client without using the command Logoff.exe?

Sorry, don't know. We're focusing on questions that have to do with today's webcast.


feedback.gifspacer.gifAfter objExplorer.Quit shouldn't we set it to 'Nothing'?

You don't need to. Check out this article for more on setting object references to nothing: http://www.microsoft.com/technet/scriptcenter/resources/begin/ss0905.mspx#EDAA.


feedback.gifspacer.gifAlmost everyone has ActiveX blocked. Is there a way that the user does not have to click allow "ActiveX"?

You can script everyone's security configuration settings, but we don't think that's a good idea. We envision scripters using these controls to beef up their Administrator scripts as opposed to distributing the script to a bunch of users.


feedback.gifspacer.gifWhen I run this script on my desktop, the calendar is not loaded. I allowed the ActiveX to be loaded but it's missing. I’ve got the window and buttons.

We'll try to talk at the end of the webcast about how to troubleshoot controls, but I don't know if we'll be able to solve specific issues.


feedback.gifspacer.gifWhy would you do all this in a script? If you just use the VB application all of these components are available without all of the coding.

If you're used to working in VBScript/WSH, moving to the Visual Basic environment is a big step. There are a bunch of reasons why we don't push system administration scripters to move to Visual Basic, even given the advantages that you mention.


feedback.gifspacer.gifIs the date displayed in the local machine's locale?

I believe so. It should be getting the date from the operating system. It's not UTC time as far as I know.


feedback.gifspacer.gifIsn't this Cmdlib.vbs in the samples?

Yes, that's the sample that demonstrates this.


feedback.gifspacer.gifIf we do need to let users run our scripts, is there a way to protect/encrypt them?

You can obfuscate them using the script encoder: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/seUsingScriptEncoder.asp?frame=true. This is not secure encryption, just obfuscation.


feedback.gifspacer.gifIs there a way to have the password authenticated with Active Directory?

Would take some fancy footwork: you might run into security problems trying to do this outside of the logoff process. Active Directory doesn't keep the password in a form accessible to scripts.

Post-Webcast Annotation. One thing you might do is use ADSI and try to bind to Active Directory using the appropriate account and that password. If you can make a connection, then you have the right password; if you can’t make a connection, then you don’t have the right password. This Hey, Scripting Guy!column includes a sample script that shows how to bind to Active Directory using alternate credentials.


feedback.gifspacer.gifWhat is a .vbe file?

That's an obfuscated VBScript: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/seUsingScriptEncoder.asp?frame=true. You can read about the script encoder at the link.


feedback.gifspacer.gifI've read that Monad was pulled from Vista. Are there still plans to release it / a newer version of the Scripting Host?

I don't want to comment too much about the "pulled from Vista" and get myself in trouble. Let me just say that much of what is written about MSH on the Net is very uninformed. There are plans to release MSH: a beta shipped with the WinFX SDK beta, for instance.


feedback.gifspacer.gifIf I have 2 screens with different resolutions: which screen?

Tough question: depends on how WMI Win32_DesktopMonitor handles more than one monitor, and I've never played with that. Try Scriptomatic on this class and see what it gives you.


feedback.gifspacer.gifWhy does File:///have three forward slash's rather than two?

Hmmm, typo? I'm not sure.

Post-Webcast Annotation. Greg originally learned to do this using three slashes and so that’s how he continues to do it. Three slashes will work; so will two slashes.


feedback.gifspacer.gifSorry, how was the password masked in the code? I might have missed that.

Internet Explorer’s password box takes care of that for you. You don't have to do special coding.


feedback.gifspacer.gifIs there any limit to the size of the array that may be reached when a large amount of data is returned?

Nothing imposed by VBScript. Guess it would depend on your memory and paging file. But I've used some pretty big arrays without problems.


feedback.gifspacer.gifIs there a reason not to do the Redim only once just using the number of items in objProcess?

You could get the Count of colProcesses and Dim the array there I guess. Just a different way to do it.

Post-Webcast Annotation. One potential problem with that is this: when you get the Count for a WMI collection you have to iterate through the entire collection. (The Count property is not automatically supplied to you; WMI literally has to count each object.) To get the Count and then create the array you’d have to iterate through the collection twice: once to get the Count and once to configure the array. If you have a small number of items – like processes – that’s fine: going through the collection twice isn’t much slower than going through the collection once. However, if you have a lot of items – like events in an event log – then getting the Count could slow your script down quite a bit.


feedback.gifspacer.gifAre the webcasts and script samples from weeks 1 and 2 available for people who missed those webcasts?

Unfortunately we don't have week 1 available, but week 2 scripts are here: http://www.microsoft.com/technet/scriptcenter/webcasts/sw2scripts.mspx.


feedback.gifspacer.gifPrimalScript Professional offers a Script Packager that encapsulates the script in an .EXE (probably more secure than Screnc.exe).

That's a nice way to go.


feedback.gifspacer.gifAre arguments stored by default in an array?

Yes, they are stored in the WScript.Arguments collection which you index starting with 0. WScript.Arguments(0), WScript.Arguments(1), etc.


feedback.gifspacer.gifCan the columns be right justified or centered?

I don't believe that functionality is in the .wsc.

Post-Webcast Annotation. No, for better or worse all columns are left-justified.


feedback.gifspacer.gifWhere do I get the Script Encoder?

http://msdn.microsoft.com/library/default.asp?url=/downloads/list/webdev.asp in the scripting downloads at this URL.


feedback.gifspacer.gifWhat would it take to get Cmdlib.wsc to work on Windows 2000?

If you copy the file there and make sure you have WSH 5.6, I think it should work. But I haven't tried it.

Post-Webcast Annotation. You would also need to register the component on the Windows 2000 computer. That can be done by right-clicking the file and choosing Register.


feedback.gifspacer.gifGot here late this morning -- when will Day 1 be available as an archive?

It will be available within 24 hrs. You'll receive a follow up email tomorrow with a link to the on-demand webcast.


feedback.gifspacer.gifMy company does not like scripts.

What don't they like about scripts? Check out Eric Lippert's article here, it might help: http://msdn.microsoft.com/library/default.asp?url=/msdnmag/issues/01/04/wsh/toc.asp?frame=true.


feedback.gifspacer.gifDoes the drag and drop only work with text files? What about an Excel file?

Any file is fine; just the file name is passed. There’s nothing particular about the file type, except the extension I guess. But, yes, they all work.

Post-Webcast Annotation. The one thing to keep in mind is that if you intend to open that file you’ll have to use the proper code: while the FileSystemObject can open a text file, it can’t open an Excel file or a Word file.


feedback.gifspacer.gifIf you drop multiple files how are they ordered for the arguments?

I think in the order in which the multiple files were "selected.” Try it out.

Post-Webcast Annotation. In playing around with this a bit we couldn’t find any predictable order; it appears to be random. Therefore, you shouldn’t depend on the order when using this technique.


feedback.gifspacer.gifDoesn't the Mshta process circumvent the Active X control’s security?

The Mshta process is running on the local machine: you can't load it remotely with HTTP. So it doesn't use all the ActiveX control security that IE offers with XP SP2. It depends on you controlling which HTAs are run. If you script with WMI, it still is covered by WMI security.


feedback.gifspacer.gifIs it possible to have the script name as an argument like in C?

You could pass a script name as an argument just like any other filename. But I don't know if it works the same as in C; I'm not a C programmer.


feedback.gifspacer.gifWill an archive of this webcast be posted to the web today?

The archive will be available within 24 hours.


feedback.gifspacer.gifCan you use drag and drop to input data to a .bat file like you can a .vbs?

Not directly. But you can wrap your .bat file in a script. Do something like this:

strInput = WScript.Arguments(0)

Then create the shell object:

Set objShell = CreateObject("WScript.Shell")

Use it to run the bat file:

objShell.Exec cmd.exe /c whatever.bat strInput

Something along those lines.


feedback.gifspacer.gifIs there any Microsoft utility avail to convert .vbs to .exe?

No Microsoft utility, no. But there are third-party utilities.


feedback.gifspacer.gifWhen will the Scripting Week 3 webcasts be available for download?

Each webcast will be available for download within 24 hours of the event.


feedback.gifspacer.gifIf you have a script which requires a password to connect to a database, how do you prevent someone from seeing the password in the script?

If you want to enter it each time the script is run, you can use ScriptPW (search on your favorite search engine for details). This prompts with **** on enter. Otherwise, you might want to use a DSN.


feedback.gifspacer.gifIs that an Office 2005/6 icon on Greg’s slide next the IE icon in his Quick Launch tray?

Don't think so, but Greg is always on the cutting edge

Post-Webcast Annotation. Those icons actually come from this file: %SystemRoot%\system32\SHELL32.dll. And they’re just icons attached to a script, not to anything fancy like an unreleased version of Office. To attach one of these icons to a shortcut, right-click the shortcut in the Quick Launch Tray and then click Properties. In the Properties dialog box, click Change Icon and then click the Nrowse button and open the file %SystemRoot%\system32\SHELL32.dll.


feedback.gifspacer.gifDo you have to navigate at all when using InternetExplorer.Application to tap into the clipboard?

No. You can work with the clipboard without navigating.


feedback.gifspacer.gifI have a specific question that is out of the scope of this webcast. Should I ask it or email it to you guys?

E-mail to scripter@microsoft.com would be better. Mention the webcast.


feedback.gifspacer.gifWill the scripts used in the webcast be available for download at a later date?

They're available now from the Script Center: http://www.microsoft.com/technet/scriptcenter/default.mspx. They'll also continue to be available in the future.


feedback.gifspacer.gifCmdLib.wsc: any documentation?

Sorry, the only docs I know of are the comments in the code itself. The library was made to be used with a set of command-line tools in the operating system - eventquery.vbs comes to mind - and there are others. It wasn't really meant for external consumption directly but we thought it was useful to introduce you to it.


feedback.gifspacer.gifCan you hide IE?

Try this:

objExplorer.Visible = False


feedback.gifspacer.gifHey, do the Scripting Guys have an RSS feed? That would be an easy way to stay on top of updates to the Center.

We're working on it.


feedback.gifspacer.gifCan you script copying to the clipboard and then work with the clipboard text in IE?

I think Greg just covered that on the bonus slide, no?


feedback.gifspacer.gifAny chance you guys will take your show to the road at some future time? Dallas or Tech Ed?

Peter and I (Dean) are going on the road next month: Chicago and Indianapolis. We do take it on the road every once in a while; we'll try to get to Dallas sometime.


feedback.gifspacer.gifWe have a script where we send output to an IE page. Is there a way to have the window autoscroll when it reaches the bottom of the page?

Hmm, have to look for that in the IE SDK. Don't know off the top of my head.

Post-Webcast Annotation. Take a look at the documentation for the ScrollIntoView method and see if that will do the trick for you.


feedback.gifspacer.gifI missed the point about drag and drop. What is the idea? Drop into what?

The basic idea is that you can grab a bunch of files in Windows Explorer and drop them on a script as a way of entering all the file names as arguments to the script.


feedback.gifspacer.gifWell, he showed how to work with text that is already in the clipboard, but can you put it there first? I believe he still did the Ctrl-C to copy it first.

I see what you mean. Not sure.

Post-Webcast Annotation. Yes, in the example shown Notepad was opened manually, the desired computers were selected, and then we pressed Ctrl-C to copy that information to the Clipboard. You can’t (at least not easily) use a script to copy things out of Notepad.


feedback.gifspacer.gifWhat date will you be in Indianapolis?

November 17th. November 16th in Chicago.


feedback.gifspacer.gifI still have not received my T-Shirt from week 2. Waaaaa.

Send you name and address to scripter@microsoft.com. We'll make sure you get one.

Post-Webcast Annotation. We should note that originally we were not in charge of sending out T-shirts; that was handled by someone else. However, we now have a small supply of shirts ourselves, so let us know if you did not get one and we can take care of it. Remember, though, you must meet the criteria (watched a webcast, did a virtual lab, sent a script) to get a shirt.


feedback.gifspacer.gifWhat info did you need in the survey?

Name, mailing address, phone number, email address.


feedback.gifspacer.gifCan you share the slide deck again? Or will the slide deck be available for download later?

The slide deck will be available soon. You should receive an email tomorrow with a link to the .ppt file.


feedback.gifspacer.gifWhere can we find the bonus material mentioned at the end of the webcast?

The articles? They will be posted to the home page each day: http://www.microsoft.com/technet/scriptcenter/default.mspx. Today's will be available in a few minutes.


feedback.gifspacer.gif"Scripting Week 3 Challenge Sweepstake is Over." How is this when the week has just started?

We had four weeks of giveaways building up to Scripting Week 3. This week we're still giving away mugs and the "dinner with the Scripting Guys."


feedback.gifspacer.gifWill the questions and answers for this webcast be posted with the on-demand webcast?

I don't believe so. I'd suggest highlighting the Q&A pane and copying to Notepad.

Post-Webcast Annotation. It’s not with the on-demand webcast, but it’s been posted!


feedback.gifspacer.gifWill we see you at connections in San Diego?

As of right now we don't have plans to go there, sorry. Not that we wouldn't love to go to San Diego... :-)


feedback.gifspacer.gifHow many mugs are left :)

We're expecting to have plenty for everyone who fills out their three or more evaluation forms. :-)


feedback.gifspacer.gifHow about podcasts from those low budget events?

Believe it or not, that’s in the works. However, because we aren’t doing these ourselves we don’t know when they’ll be available.


feedback.gifspacer.gifIs there a way to make our own .wsc files?

Yes. Go to MSDN and the Windows Script Technologies node and click on Windows Script Components.


feedback.gifspacer.gifETA on newer version of Scriptomatic?

No ETA (sorry), but please send your suggestions for features to scripter@microsoft.com.


feedback.gifspacer.gifThe 2 screens - laptop and external monitor – are highly recommended. The pain is when an app window is on monitor 2 and the tool-popup is low in the corner of window 1.

Yeah, I can see that. Didn't mean to make light of it. Might have to go to VB.NET or C# for that; scripting does have its limits.


feedback.gifspacer.gifActiveX controls have been somewhat criticized for possible security problems. Can you script a sandbox idea around them?

Not that we know of.


feedback.gifspacer.gifIs there a way to pop up your AD OU structure to run something against objects in a particular OUs?

This is possible, but I don't know of any automatic way to do this. You could script it yourself, however. For an example of retrieving specified items from an OU see this Hey, Scripting Guy! column.


feedback.gifspacer.gifHow can I do RunAs (and hide credentials)?

You can use RunAs in a command line before cscript scriptname.vbs.


feedback.gifspacer.gifHow about this:
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Navigate("about:blank") talk = objIE.document.parentwindow.clipboardData.GetData("text")
objIE.Quit
call Speek (talk)
sub Speek (talk)
Set XL_tts = CreateObject("Excel.Application")
XL_tts.Speech.Speak
talk XL_tts.Quit
Set XL_tts = Nothing
End sub

What do you know, a talking spreadsheet. Neat idea.


Top of pageTop of page