Search found 14225 matches

by jvierra
Thu Sep 18, 2008 2:29 am
Forum: VBScript
Topic: Some Array Questions
Replies: 12
Views: 2524

Some Array Questions

If objItem.Caption <> " Microsoft XP" Then If you want to remove things from your array then consider using a DIctionary as it is esier to remove from a dict. Set dct = CreateObject("Scripting.Dictionary") dct.Add "key","value" for each key in dct.Keys dct.Remove(key) Next keys = Dct.Keys ' returns ...
by jvierra
Thu Sep 18, 2008 12:38 am
Forum: Windows PowerShell
Topic: How do I run WinZip from a PowerShell Script?
Replies: 7
Views: 8522

How do I run WinZip from a PowerShell Script?

I am surprised that PowerGUI doesn't parse exactly the same way as PoSH. Might be an issue with the debugger implementation or just a program bug. Did you report it? In most cases if the first tokenin a command line is a known program iPS will pass teh remainder of the command line unchanged to teh ...
by jvierra
Wed Sep 17, 2008 6:52 am
Forum: Windows PowerShell
Topic: How do I run WinZip from a PowerShell Script?
Replies: 7
Views: 8522

How do I run WinZip from a PowerShell Script?

If WZZIP is an executable in teh DOS path then: WZZIP C:MyArchiveabackup.zip -a -P -r -ex C:MySrcAProject*.* Should work. To check path just type WZZIP and see if it give program banner. If not then just add the path to WZZIP in from of it. C:myutilsWZZIP .... Works like CMD mostly.
by jvierra
Wed Sep 17, 2008 5:34 am
Forum: Windows PowerShell
Topic: After-run directory
Replies: 3
Views: 2383

After-run directory

First profile entry should be:

function ed_pro(){
notepad $profile
}

Useful stuff: http://msdn.microsoft.com/en-us/library ... S.85).aspx
by jvierra
Wed Sep 17, 2008 4:44 am
Forum: VBScript
Topic: windows script component, type lib + registering
Replies: 9
Views: 4518

windows script component, type lib + registering

I am trying to get a handle on how VB6 handles this. I have not had a copy of VB6 installed for about 5 years so I am using VBA via Access to test this. I can use the controls normally in VBA and intellisense works. I will post more if and when I see what teh exact difference between the two registr...
by jvierra
Tue Sep 16, 2008 1:48 am
Forum: VBScript
Topic: Working with error codes
Replies: 12
Views: 3171

Working with error codes

It return a boolean. If'iing it will allow you to determine if the server can be used. For now just fix your original code. You almost have it. There appears to be only that one mistake and it will work. Your mistake is causing a cascading error with error checking turned off so you never see it. Fi...
by jvierra
Mon Sep 15, 2008 8:02 am
Forum: VBScript
Topic: Working with error codes
Replies: 12
Views: 3171

Working with error codes

I should probably clarify teh error management a bit. YOu turned off error checking permanently. Once you do this you have to check for errors on every line of code that can cause an error. YOu are not doing this. My fix is to turn error checking back on immedistely following the local error test th...
by jvierra
Mon Sep 15, 2008 7:10 am
Forum: Windows PowerShell
Topic: User ID Change Script
Replies: 1
Views: 1414

User ID Change Script

Best file CSV would be OldUser, NewUser "userid1","newuserid" This will allow for odd characters in the id if they exist. Assume input file like so: [c:myfile.csv] userid,newid "user01","newuser01" "user02,"newuser02" [end of file] import-csv users.csv |%{set-qaduser $_.userid -samaccountname $_.new...
by jvierra
Fri Sep 12, 2008 9:05 am
Forum: VBScript
Topic: Querying event log for LogFileName and TimeWritten
Replies: 3
Views: 4722

Querying event log for LogFileName and TimeWritten

I should have given you this solution first as it is the better solution. If you only want date then the string method is easiest. Here it is: Set dateTime = CreateObject("WbemScripting.SWbemDateTime") dateTime.SetVarDate Now - 1 WScript.Echo dateTime.Value TRhis will give you the exact 24 hour offs...
by jvierra
Fri Sep 12, 2008 7:15 am
Forum: VBScript
Topic: Take resource offline in a cluster
Replies: 8
Views: 7565

Take resource offline in a cluster

I think the error means that you have a firewall blocking th eadmin ports but it may also be that you do not have admin on the cluster from teh account you are using. Look at teh KB as it references many of these issues with SQS on a cluster. The SQS may not be installed completely correctly on teh ...