Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


RE: List add and remove programs

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,54859
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> RE: List add and remove programs
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: <<   < prev  1 [2] 3   next >   >>
Login
Message << Older Topic   Newer Topic >>
 RE: List add and remove programs - 1/4/2008 5:59:23 AM   
  DiGiTAL.SkReAM


Posts: 1097
Score: 6
Joined: 9/6/2005
From: Florida, USA
Status: offline
quote:

ORIGINAL: ebgreen

@Digital:
You would be amused to hear this story. I was at a work Christmas party and I saw someone that I don't see very often. She says to me "I thought that your hair was darker". My reply "You're right. Every time I get it cut it seems to be a little more grey".


Heh heh heh
That's ok.  My dad had a serious medical problem when he was younger, about in his late 20's.  The medical problem was that his wife at that time tried to poison him with arsenic.  In any case, she ran off to Canada, and he lost all of his hair!  Literally.  Not a hair left on his body.  Well, he turns 70 in 2 more years, and know what?  His hair is just starting to grow back.  So now he has grown a "Shaggy" beard (like from Scooby - a Fu Manchu), but it's all white.  He was overheard lamenting the other day, "Last time I shaved, it was all dark hair.  The next time I shaved, it was all white!"

_____________________________

"There's the one man who learns by reading, the two men that learn by watching, and the rest of us have to pee on the electric fence for ourselves." - Roy Rogers

"Would you like to touch my monkey?" - Dieter (Mike Meyers)

(in reply to ebgreen)
 
 
Post #: 21
 
 RE: List add and remove programs - 1/4/2008 6:47:38 AM   
  ebgreen


Posts: 4595
Score: 29
Joined: 7/12/2005
Status: offline
"E:\Scripts\addremove.vbs(49, 1) Microsoft VBScript runtime error: Variable is undefined: 'scomp' "


Then I suggest that you look at your code and determine what variable you meant to use instead of scomp.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to aburt)
 
 
Post #: 22
 
 RE: List add and remove programs - 1/4/2008 7:27:32 AM   
  aburt

 

Posts: 104
Score: 0
Joined: 12/4/2006
Status: offline
Ok I looks like I needed to declare the variable scomp so for now i commented option explicit

when I run the script I again I get the almost the same as before

a text file with the all local applications
output of the base image applications

and then it list

Every application on the local computer again but now that is preceded by
"Machine xyz is missing"

Machine XYZ is missing INSTALLED SOFTWARE (300) - DT-82411 - 1/4/2008 3:25:13 PM
Machine XYZ is missing ADM Files For XP SP2 Ver: 1.0.0
Machine XYZ is missing Adobe Anchor Service CS3 Ver: 1.0
Machine XYZ is missing Adobe Asset Services CS3 Ver: 3
Machine XYZ is missing Adobe Bridge CS3 Ver: 2

(in reply to ebgreen)
 
 
Post #: 23
 
 RE: List add and remove programs - 1/4/2008 7:59:46 AM   
  ebgreen


Posts: 4595
Score: 29
Joined: 7/12/2005
Status: offline
Well commenting out Option Explicit is a classic example of fixing the wrong problem. What would you think of someone that simply put black tape over the check engine light in their car when it came on rather than finding out why the light was on in the first place? In this case since scomp was not declared that indicates that there probably is a declared variable that you should be using instead. I suggest reading your code and understanding what it is doing and why. Go through your code and comment out every place that you see WScript.Echo. Next go back and selectively put in one and only one WScript.Echo at the first place that you see a variable that you do not know exactly what it holds. Echo out the value of that one variable and only that variable. Now run your code so you can know what is in that variable. After you understand that variable, delete that WScript.Echo and continue reading your script and understanding it. Every time tht you come to something that you don't understand exactly what it is doing, go ahead and temporarily put in an echo that will let you understand it. Continue doing this until you know exactly how your script works.

I know that this sounds like I am just trying to avoid helping you, but I really am not. I'm happy to answer any questions about some specific part of the script that you can't figure out on your own. Regardless learning how to do this is in my personal opinion one of the most important parts of learning to script or to program for that matter. Eventually you will get to the point where you won't have to put echos in at all except for when you aren't sure what you are getting back from things that are outside your script (WMI for example). I have always called this Bench Testing a script. The practice of walking through it line by line and ubderstanding what it is doing.

You essentially have your script completed and in reality you are debugging its behavior now and not really writing a new script any more. In that vein, let me leave you with this quote:


"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."
--Brian W. Kernighan


So until you understand the code that you have, you won't be able to mold it and reshape it to what you really want. I apologize if I am frustrating you, but I really do prefer to teach rather than do it for people. Or with another quote:

"Build a man a fire and he will be warm for a day. Set a man on fire and he will be warm for the rest of his life."
--Anonymous as far as I know 

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to aburt)
 
 
Post #: 24
 
 RE: List add and remove programs - 1/4/2008 9:02:42 AM   
  aburt

 

Posts: 104
Score: 0
Joined: 12/4/2006
Status: offline
ok Fair Enough the point is to learn.

I removed the comment for Option Explicit and declared the variable.

So Now I have no errors and I get

One text file with all application on the local machine
output of all applications on the baseimage
and then

output of all applications on the local machine preceded by "Machine XYZ is missing "

Ok I need clarification, I dont understand why the ouput from below gives me everything on the local client and not just the missing applications

I believe the  For Each strItem in Split(GetAddRemove(sComp), vbCrLf)  states for every item in the list of application on the local machine
if Instr returns a postion less than 0 meaning the value is not found
then print the local machine item

For Each strItem in Split(GetAddRemove(sComp), vbCrLf)
  If InStr(strBaseAppList, strItem) <= 0 Then
      WScript.Echo "Machine XYZ is missing " & strItem
  End If
Next

(in reply to ebgreen)
 
 
Post #: 25
 
 RE: List add and remove programs - 1/4/2008 5:45:57 PM   
  Meg


Posts: 123
Score: 2
Joined: 7/13/2006
From: Australia
Status: offline
ebgreen's forum style is teaching while mine is just doing it. I do it that way because I am just learning VBSript and as you aburt have noted in this thread, doing is better for learning rather just being shown an answer. Fair enough.

It upsets me though that that in earlier thread (exactly same topic) I noted your comments, removed all the HTML thus making the add remove program script compatible with your use, posted a plain VBS version and what do I get? Nothing, (total ignore mode) you abandoned your original thread and started another exactly same one.
http://visualbasicscript.com/m_53899/mpage_1/key_/tm.htm#54023


I have two or three new original fantastic scripts that I have nearly finished and was going to post here, but why bother, there is never any feedback unless I prod someone with a stick.
I will go away now.
Goodbye.

(in reply to aburt)
 
 
Post #: 26
 
 RE: List add and remove programs - 1/4/2008 6:02:47 PM   
  ebgreen


Posts: 4595
Score: 29
Joined: 7/12/2005
Status: offline
What you believe about the loop is correct. However, stop to think about what the value of scomp is.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to aburt)
 
 
Post #: 27
 
 RE: List add and remove programs - 1/4/2008 6:05:34 PM   
  ebgreen


Posts: 4595
Score: 29
Joined: 7/12/2005
Status: offline
I won't comment on the other thread or it's abandonment, however I will comment on getting feedback. If you want feedback you should ask for it. You seem like you know what you are doing so to be honest with you I don't look at your code a lot. If you want myself or others to look at it further, post up some code with a specific question.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to ebgreen)
 
 
Post #: 28
 
 RE: List add and remove programs - 1/6/2008 3:10:53 AM   
  aburt

 

Posts: 104
Score: 0
Joined: 12/4/2006
Status: offline
Meg

As I said before,  I learned from this site that should not abandon the code that you start with.   When I first started editing scripts I would keep jumping from one suggestion to another and realized that I was getting no where so I am trying to hang in there.   Im sorry if I have offended you that was not my intention.  In my first attempt at help with my script.   You were very helpful in offering my your script I never got any information from you on how to edit the one I was working with.  After looking at some of your script I knew It would be starting over.

Ebgreen
I hear your point about me knowing what I am doing and I consider it a complement as I am struggling to get through this.  Boy do I wish it were true. 

For Each strItem in Split(GetAddRemove(sComp), vbCrLf)
If InStr(strBaseAppList, strItem) <= 0 Then
     WScript.Echo "Machine XYZ is missing " & strItem
End If
Next

 
the value for scomp is the local computer It is not clear to my why I am getting the output I am getting.  I don't see what I am doing wrong.
My question why is the list not giving applications not in the base image? instead the output is giving all applications on the local machine.


(in reply to ebgreen)
 
 
Post #: 29
 
 RE: List add and remove programs - 1/6/2008 4:25:53 AM   
  ehvbs

 

Posts: 2012
Score: 48
Joined: 6/22/2005
From: Germany
Status: offline
Hi aburt,

to me, it looks like no strItem is found in strBaseAppList. So I would insert

For Each strItem in Split(GetAddRemove(sComp), vbCrLf)
   WScript.Echo "|" & strItem & "|"
  If InStr(strBaseAppList, strItem) <= 0 Then
        WScript.Echo "Machine XYZ is missing " & strItem
  End If
Next

and compare strItem(s) to the content of your baseimage.txt. I'd pay
special attention to the question, wheter the version is seperated by
vbTab in that file.

Good luck

ehvbs

(in reply to aburt)
 
 
Post #: 30
 
 RE: List add and remove programs - 1/6/2008 4:34:35 AM   
  ehvbs

 

Posts: 2012
Score: 48
Joined: 6/22/2005
From: Germany
Status: offline
Hi meg,

I may misunderstand

  I will go away now.
  Goodbye.

but to be on the safe side: I do look at your scripts and I'm sure
may of those Guests will have copied them for use or study.

Regards

ehvbs

(in reply to Meg)
 
 
Post #: 31
 
 RE: List add and remove programs - 1/6/2008 7:53:24 AM   
  aburt

 

Posts: 104
Score: 0
Joined: 12/4/2006
Status: offline
ehvbs

I tried your suggestion thank you .  When I ran the script I got the same list of applicatins  for the base and the local machines.  Even though I have more applications on the local machine than I do in the base image file.  Also I noticed the local machine did have tab between the application and the version.  Thinking that might be the reason the application is not weeding out the applications that are not in the base image.  I removed the tab from the Get Add Remove function.  THis is the function that pulls the application list from the local client.  But after looking at the output ( I'm still getting all the applications installed on the local client)  Is it possible that I have not written the INSTR correctly.  


I got this =

The local machine item is|INSTALLED SOFTWARE (199) - LT-80401 - 1/6/2008 3:50:03 PM|
Machine XYZ is missing INSTALLED SOFTWARE (199) - LT-80401 - 1/6/2008 3:50:03 PM
The local machine item is||
The local machine item is|ActivClient for CAC - PKI OnlyVer: 6.00.00059|
Machine XYZ is missing ActivClient for CAC - PKI OnlyVer: 6.00.00059
The local machine item is|Adobe Acrobat 7.0 StandardVer: 7.0.9|
Machine XYZ is missing Adobe Acrobat 7.0 StandardVer: 7.0.9
The local machine item is|Adobe Acrobat 7.0.9 StandardVer: 7.0.9|
Machine XYZ is missing Adobe Acrobat 7.0.9 StandardVer: 7.0.9
The local machine item is|Adobe Flash Player 9 ActiveXVer: 9|
Machine XYZ is missing Adobe Flash Player 9 ActiveXVer: 9
The local machine item is|Adobe Flash Player 9 ActiveXVer: 9.0.16.0|
Machine XYZ is missing Adobe Flash Player 9 ActiveXVer: 9.0.16.0
The local machine item is|AiO_ScanVer: 47.0.1.000|
Machine XYZ is missing AiO_ScanVer: 47.0.1.000
The local machine item is|ALPS Touch Pad Driver|
Machine XYZ is missing ALPS Touch Pad Driver
The local machine item is|Apple Mobile Device SupportVer: 1.1.2.23|
Machine XYZ is missing Apple Mobile Device SupportVer: 1.1.2.23
The local machine item is|Apple Software UpdateVer: 2.0.2.92|
Machine XYZ is missing Apple Software UpdateVer: 2.0.2.92
The local machine item is|ATI - Software Uninstall UtilityVer: 6.14.10.1005|
Machine XYZ is missing ATI - Software Uninstall UtilityVer: 6.14.10.1005
The local machine item is|ATI Control PanelVer: 6.14.10.5028|
Machine XYZ is missing ATI Control PanelVer: 6.14.10.5028
The local machine item is|ATI Display DriverVer: 8.20-051110a1-028793C-Dell|
Machine XYZ is missing ATI Display DriverVer: 8.20-051110a1-028793C-Dell
The local machine item is|Broadcom Gigabit Integrated ControllerVer: 3.61|
Machine XYZ is missing Broadcom Gigabit Integrated ControllerVer: 3.61
The local machine item is|Broadcom Gigabit Integrated ControllerVer: 3.61|
Machine XYZ is missing Broadcom Gigabit Integrated ControllerVer: 3.61
The local machine item is|Conexant D480 MDC V.92 Modem|
Machine XYZ is missing Conexant D480 MDC V.92 Modem
The local machine item is|DBsign Web SignerVer: 2.3|
Machine XYZ is missing DBsign Web SignerVer: 2.3
The local machine item is|Dell ResourceCD|
Machine XYZ is missing Dell ResourceCD
The local machine item is|DlManifest for User State Migration Tools 3.0.1|
Machine XYZ is missing DlManifest for User State Migration Tools 3.0.1
The local machine item is|Hotfix for Windows Media Format 11 SDK (KB929399)|
The local machine item is|HP Image Zone 4.7Ver: 4.7|
Machine XYZ is missing HP Image Zone 4.7Ver: 4.7
The local machine item is|HP PSC & OfficeJet 4.7|
Machine XYZ is missing HP PSC & OfficeJet 4.7
The local machine item is|Installer ServiceVer: 1.00.0000|
Machine XYZ is missing Installer ServiceVer: 1.00.0000
The local machine item is|Installer ServiceVer: 1.00.0000|
Machine XYZ is missing Installer ServiceVer: 1.00.0000
The local machine item is|InterVideo WinDVD|
Machine XYZ is missing InterVideo WinDVD
The local machine item is|iTunesVer: 7.5.0.20|
Machine XYZ is missing iTunesVer: 7.5.0.20
The local machine item is|J2SE Runtime Environment 5.0 Update 10Ver: 1.5.0.100|
Machine XYZ is missing J2SE Runtime Environment 5.0 Update 10Ver: 1.5.0.100
The local machine item is|J2SE Runtime Environment 5.0 Update 11Ver: 1.5.0.110|
Machine XYZ is missing J2SE Runtime Environment 5.0 Update 11Ver: 1.5.0.110
The local machine item is|Java 2 Runtime Environment, SE v1.4.2_04Ver: 1.4.2_04|
Machine XYZ is missing Java 2 Runtime Environment, SE v1.4.2_04Ver: 1.4.2_04
The local machine item is|Java(TM) 6 Update 2Ver: 1.6.0.20|
Machine XYZ is missing Java(TM) 6 Update 2Ver: 1.6.0.20
The local machine item is|Juniper Networks Network Connect 5.4.0Ver: 5.4.0.11359|
Machine XYZ is missing Juniper Networks Network Connect 5.4.0Ver: 5.4.0.11359
The local machine item is|LiveUpdate 3.1 (Symantec Corporation)Ver: 3.1.0.90|
Machine XYZ is missing LiveUpdate 3.1 (Symantec Corporation)Ver: 3.1.0.90
The local machine item is|Macromedia Shockwave Player|
Machine XYZ is missing Macromedia Shockwave Player
The local machine item is|MetaFrame Presentation Server ClientVer: 9.100.36280|
Machine XYZ is missing MetaFrame Presentation Server ClientVer: 9.100.36280
The local machine item is|Microsoft .NET Framework 2.0|
The local machine item is|Microsoft .NET Framework 2.0Ver: 2.0.50727|
Machine XYZ is missing Microsoft .NET Framework 2.0Ver: 2.0.50727
The local machine item is|Microsoft Compression Client Pack 1.0 for Windows XPVer: 1|
Machine XYZ is missing Microsoft Compression Client Pack 1.0 for Windows XPVer: 1
The local machine item is|Microsoft Data Access Components KB870669|
Machine XYZ is missing Microsoft Data Access Components KB870669
The local machine item is|Microsoft Internet Explorer Administration Kit 5|
Machine XYZ is missing Microsoft Internet Explorer Administration Kit 5
The local machine item is|Microsoft Office Professional Edition 2003Ver: 11.0.7969.0|
Machine XYZ is missing Microsoft Office Professional Edition 2003Ver: 11.0.7969.0
The local machine item is|Microsoft Systems Management Server 2003 Administrator Console|
Machine XYZ is missing Microsoft Systems Management Server 2003 Administrator Console
The local machine item is|Microsoft User-Mode Driver Framework Feature Pack 1.0|
The local machine item is|Microsoft Windows User State Migration Tool version 2.61Ver: 2.61.0|
Machine XYZ is missing Microsoft Windows User State Migration Tool version 2.61Ver: 2.61.0
The local machine item is|O2Micro Smartcard DriverVer: 2.21.0000|
Machine XYZ is missing O2Micro Smartcard DriverVer: 2.21.0000
The local machine item is|O2Micro Smartcard DriverVer: 2.21.0000|
Machine XYZ is missing O2Micro Smartcard DriverVer: 2.21.0000
The local machine item is|Oracle JInitiator 1.3.1.9|
Machine XYZ is missing Oracle JInitiator 1.3.1.9
The local machine item is|PrimalScript 4.1 EnterpriseVer: 4.1|
Machine XYZ is missing PrimalScript 4.1 EnterpriseVer: 4.1

(in reply to ehvbs)
 
 
Post #: 32
 
 RE: List add and remove programs - 1/6/2008 8:12:34 AM   
  ehvbs

 

Posts: 2012
Score: 48
Joined: 6/22/2005
From: Germany
Status: offline
Hi aburt,

according to your dump of the local machine's software and to your earlier sample of
baseimage.txt, you compare

LM: >|Adobe Acrobat 7.0 StandardVer: 7.0.9|<
BI:  >|Adobe Acrobat 7.0 Standard Ver: 7.0.9|<

Mark the whitespace (vBTab or blank) in BI.

(in reply to aburt)
 
 
Post #: 33
 
 RE: List add and remove programs - 1/6/2008 9:11:13 AM   
  aburt

 

Posts: 104
Score: 0
Joined: 12/4/2006
Status: offline
ehvbs

thanks I did make that change but the output still comes up showing applications not on the base image as being installed on the baseimage.txt file.  i took a look at the baseimage.txt file it listed as

application tab versions  (attached)

The baseimage file does not have InterVideo WINDVD or itunes.  The local machine does.   

The local machine item is|Installer Service Ver: 1.00.0000|
Machine  XYZ is missing Installer Service Ver: 1.00.0000
The local machine item is|InterVideo WinDVD|
Machine  XYZ is missing InterVideo WinDVD
The local machine item is|iTunes Ver: 7.5.0.20|
Machine  XYZ is missing iTunes Ver: 7.5.0.20
The local machine item is|J2SE Runtime Environment 5.0 Update 10 Ver: 1.5.0.100|
Machine  XYZ is missing J2SE Runtime Environment 5.0 Update 10 Ver: 1.5.0.100
The local machine item is|J2SE Runtime Environment 5.0 Update 11 Ver: 1.5.0.110|
Machine  XYZ is missing J2SE Runtime Environment 5.0 Update 11 Ver: 1.5.0.110
The local machine item is|Java 2 Runtime Environment, SE v1.4.2_04 Ver: 1.4.2_04|
Machine  XYZ is missing Java 2 Runtime Environment, SE v1.4.2_04 Ver: 1.4.2_04
The local machine item is|Java(TM) 6 Update 2 Ver: 1.6.0.20|
Machine  XYZ is missing Java(TM) 6 Update 2 Ver: 1.6.0.20

Attachment (1)

(in reply to ehvbs)
 
 
Post #: 34
 
 RE: List add and remove programs - 1/6/2008 9:18:29 PM   
  ehvbs

 

Posts: 2012
Score: 48
Joined: 6/22/2005
From: Germany
Status: offline
Hi aburt,

as I couldn't understand, what you are telling me, here is what I did:

(1) I saved shortened version of your baseimage.txt


      

   to lm.txt. This simulates a machine with those 4 applications
   installed.

(2) I saved a even shorter version of your baseimage.txt


      

   to bi.txt. This is a list of 3 pieces of standard software.
   "Adobe Acrobat 7.0.9" is non standard software on the local
   computer.
   
(3) I wrote this script:


      

  As ebgreen proposed, it loads the list of standard software into a
  string (sBI) and searches for each installed application (got from
  lm.txt) in sBI.
  The output is:
 

      
 
In my opinion that shows: if you don't mess up the storage format (vbTabs,
Blanks) ebgreen's Instr() will catch all non standard software installed
on a local machine.

Good luck!

ehvbs

(in reply to aburt)
 
 
Post #: 35
 
 RE: List add and remove programs - 1/10/2008 6:59:00 AM   
  aburt

 

Posts: 104
Score: 0
Joined: 12/4/2006
Status: offline
After much tweaking and playing around with spacing,  I wanted to thank everyone for your help I did finally get my script to work.  You guys really hung in there with me to get this done. 

Thank you    Thank you       Thank you.

I still have one more issue I am now trying to get the output into the text file.  I can get the all the lines of the (Apps missing from baseimage.txt)  when I output from the command prompt using wscript.echo but I cant get any output when I try to put into the text file .  Can anyone explain what I should be doing.

I thought if I put my array into a function MSIAPP, then I could call MSIAPP and it would list all applications.


      

(in reply to ehvbs)
 
 
Post #: 36
 
 RE: List add and remove programs - 1/10/2008 7:14:46 AM   
  ehvbs

 

Posts: 2012
Score: 48
Joined: 6/22/2005
From: Germany
Status: offline
Hi aburt,

I'm happy you got it to work! A quick way to get the output into a .txt file would be

  cscript <your>.vbs >list.txt

(no programming involved). [This would give me some time to look into your script]

Regards

ehvbs

(in reply to aburt)
 
 
Post #: 37
 
 RE: List add and remove programs - 1/10/2008 8:02:42 AM   
  aburt

 

Posts: 104
Score: 0
Joined: 12/4/2006
Status: offline
ehvbs

Ok I use that for now.  I appreciate you taking a look.

(in reply to ehvbs)
 
 
Post #: 38
 
 RE: List add and remove programs - 1/10/2008 8:17:51 AM   
  ehvbs

 

Posts: 2012
Score: 48
Joined: 6/22/2005
From: Germany
Status: offline
Hi aburt,

your script contains a function WriteFile(). I won't comment on it. You call
is once

   If WriteFile(MsiApp, sFileName) Then

with the uninitialized variable MsiApp. So I would expect you got a file

  sCompName & "_" & GetDTFileName() & "_Software.txt"

with a blank line in it when you run your script. Is that correct?

Your script contains 3 WScript.Echos. The relevant line is

    WScript.Echo "Machine vXYZ is missing " & a & " " & Applic

Do you want to get such lines into the file? If yes, try to add

    WriteFile "Machine vXYZ is missing " & a & " " & Applic, sFileName

after the WScript.Echo line. If we both are lucky, this will
work.

[Obviously, I need all the luck for myself to avoid posting wrong code]

< Message edited by ehvbs -- 1/10/2008 8:36:11 AM >

(in reply to aburt)
 
 
Post #: 39
 
 RE: List add and remove programs - 1/10/2008 9:13:45 AM   
  aburt

 

Posts: 104
Score: 0
Joined: 12/4/2006
Status: offline
your script contains a function WriteFile(). I won't comment on it. You call
is once

 
 
Im not sure what you mean?


  If WriteFile(MsiApp, sFileName) Then

with the uninitialized variable MsiApp. So I would expect you got a file

sCompName & "_" & GetDTFileName() & "_Software.txt"

with a blank line in it when you run your script. Is that correct?

 
 
Your absolute right I got a text file with nothing in it.

Your script contains 3 WScript.Echos. The relevant line is

   WScript.Echo "Machine vXYZ is missing " & a & " " & Applic

Do you want to get such lines into the file? If yes, try to add

   WriteFile "Machine vXYZ is missing " & a & " " & Applic, sFileName

Sorry about all the echo statements.  thats my attempt at testing output.
 
If i use WriteFile "Machine vXYZ is missing " & a & " " & Applic, sFileName   I still get a blank text file.


(in reply to ehvbs)
 
 
Post #: 40
 
 
Page:  <<   < prev  1