Support Forums

Search found 10021 matches

by jvierra
Thu Aug 20, 2009 5:22 pm
Forum: Other Scripting Languages
Topic: please solve my problem
Replies: 18
Views: 5935

please solve my problem

Please try to post long listings as an attachment in a file as it is much easier to obtain and read that way. Set c = MakeCell( r, "Stop") Set cb = document.createElement("input") cb.type = "checkbox" cb.value = objService.DisplayName cb.attachEvent "onclick", getRef("myevent") c.appendChild cb cb.c...
by jvierra
Thu Aug 20, 2009 4:07 pm
Forum: VBScript
Topic: checking a specific local user account
Replies: 5
Views: 1083

checking a specific local user account

The error message reads as " Untitled1.vbs(18, 181) Microsoft VBScript compilation error: Expected ')' " That is because you need single quotes. This will compile: Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_GroupUser WHERE PartComponent = \" & strComputer &a...
by jvierra
Thu Aug 20, 2009 3:59 pm
Forum: VBScript
Topic: checking a specific local user account
Replies: 5
Views: 1083

checking a specific local user account

Account names cannot have spaces in them. This: Set colAccounts = GetObject("WinNT://" & strComputer & "") SHould be : Set colAccounts = GetObject("WinNT://" & strComputer) MsgBox GetUser() Function GetUser()     Set colAccounts = GetObject("WinNT://omega2")     For Each objUser In colAccounts      ...
by jvierra
Thu Aug 20, 2009 3:49 pm
Forum: VBScript
Topic: checking a specific local user account
Replies: 5
Views: 1083

checking a specific local user account

Not much help without the whole error message. I would try to guess but it wouldn't work.
Must use single quote around filter variables.


Query makes no sense. You need to test this with WBEMTEST. Not sure where you got the idea for this or what you expect it to return.


by jvierra
Thu Aug 20, 2009 9:56 am
Forum: Other Scripting Languages
Topic: GetReF parameters
Replies: 3
Views: 2694

GetReF parameters

As usual "apples and oranges". anchor.attachEvent "click", getRef("test") It's "click" not "onClick". click and href will conflict on an anchor unless you know how to deconflict the events. <html> <head> <meta http-equiv="Content-Type" cont...
by jvierra
Thu Aug 20, 2009 6:23 am
Forum: Windows PowerShell
Topic: Out-File question
Replies: 4
Views: 544

Out-File question

Not sure what you are asking. Write-Host writes to teh console. It is used to display information. Out-File sends objects to a file. Are you saying you want to put this stuff in a file? Try this: get-wmiobject "Win32_NetworkAdapterConfiguration" -computername $a | Where{$_.IpEnabled -Match "True"} |...
by jvierra
Thu Aug 20, 2009 2:38 am
Forum: VBScript
Topic: Edit Multiple Users Object TerminalServicesHomeDir
Replies: 4
Views: 798

Edit Multiple Users Object TerminalServicesHomeDir

ADSI TranslateName is much faster and also much easier to remember so we can just type it into a script once you see how it works.


Ras - look at your script. It has a few mistakes/typos.

by jvierra
Wed Aug 19, 2009 6:55 pm
Forum: VBScript
Topic: Edit Multiple Users Object TerminalServicesHomeDir
Replies: 4
Views: 798

Edit Multiple Users Object TerminalServicesHomeDir

Here is a much easier way to get the DN for a user knowing the account name. It is faster and direct. msgBox GetDN( "SEC", "jvierra" ) Function GetDN( domain, samAccount )      ' Use ADSI to translate SAM account name to DN     Set NT= CreateObject("NameTranslate")      NT.Init 3, ""      NT.Set 3, ...
by jvierra
Wed Aug 19, 2009 7:08 am
Forum: Windows PowerShell
Topic: New line fails in XML file
Replies: 2
Views: 458

New line fails in XML file

Code: Select all


   
$foo = "`r`n"
$foo = $foo + " `r`n"
$foo = $foo + ""
Add-Content C:File.xml $foo
notepad c:file.xml
by jvierra
Wed Aug 19, 2009 4:00 am
Forum: VBScript
Topic: Vbscript to query SQL Express 2005 DB?
Replies: 3
Views: 2272

Vbscript to query SQL Express 2005 DB?

Consider Getting PrimalScript as it can generrate these conenctions for you which is definitely fasteer than typing and much easier than trying to remmeber connection strings.

Good Luck


Go to advanced search