vbscript logging

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 12 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
saadmin
Posts: 3
Last visit: Wed Jul 31, 2013 10:57 am

vbscript logging

Post by saadmin »

Hi have a script that will uniinstall adobe X via a computer startup GPOThe script does the uninstall no problem however the out put to the log is incomplete. can anyone tell me where I need to adjust??Here is my script on error resume nextDim fso, oLogFile, sComputernameCONST ForAppending = 8CONST LOG_FILE_NAME = "adobeUninstall.log"CONST LOG_Path = "toronto09GPlogs$"sComputerName = WshShell.ExpandEnvironmentStrings("%COMPUTERNAME%")Set fso = CreateObject("Scripting.FileSystemObject")Set oLogFile = FSO.OpenTextFile(LOG_PATH & LOG_FILE_NAME, ForAppending, True, 0)oLogFile.WriteLine Date & " " & Time & vbTab & "Info" & vbTab & "COMPUTERNAME : " & sComputerNameoLogFile.CloseSet WshShell = CreateObject("WScript.Shell")' Uninstall Acrobat WshShell.Run "msiexec /x {AC76BA86-1033-F400-7760-000000000005} /q",1,true Log output 11/9/2011 7:30:00 AM Info COMPUTERNAME : I am trying to log if the uninstall indeed was successful and the computername
User avatar
saadmin
Posts: 3
Last visit: Wed Jul 31, 2013 10:57 am

vbscript logging

Post by saadmin »

Hi have a script that will uniinstall adobe X via a computer startup GPOThe script does the uninstall no problem however the out put to the log is incomplete. can anyone tell me where I need to adjust??Here is my script on error resume nextDim fso, oLogFile, sComputernameCONST ForAppending = 8CONST LOG_FILE_NAME = "adobeUninstall.log"CONST LOG_Path = "toronto09GPlogs$"sComputerName = WshShell.ExpandEnvironmentStrings("%COMPUTERNAME%")Set fso = CreateObject("Scripting.FileSystemObject")Set oLogFile = FSO.OpenTextFile(LOG_PATH & LOG_FILE_NAME, ForAppending, True, 0)oLogFile.WriteLine Date & " " & Time & vbTab & "Info" & vbTab & "COMPUTERNAME : " & sComputerNameoLogFile.CloseSet WshShell = CreateObject("WScript.Shell")' Uninstall Acrobat WshShell.Run "msiexec /x {AC76BA86-1033-F400-7760-000000000005} /q",1,true Log output 11/9/2011 7:30:00 AM Info COMPUTERNAME : I am trying to log if the uninstall indeed was successful and the computername
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

vbscript logging

Post by jvierra »

The installationwill be logged to the Event log. There will be an insert by MSI that tells if the instra/uninstall was successful.

The full installation log will probably be in the system TEMP folder.

There is no need to create your own logs. MSI does all of this automatically.

To fo an uninstally with a startup script just put this line in a batch file (BAT or CMD)

msiexec /x {AC76BA86-1033-F400-7760-000000000005} /q

You can force the location of the logfile by adding this switch:/log <LogFile>

All switches are here: msiexec /?


jvierra2011-11-09 08:16:38
User avatar
saadmin
Posts: 3
Last visit: Wed Jul 31, 2013 10:57 am

vbscript logging

Post by saadmin »

Hi JvierraI figured it outMy log file(adobeuninstall.log) located on my server now is recording all uninstalls
This topic is 12 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked