My favorites | Sign in
Logo
                
Details: Show all Hide all

Older

  • Dec 01, 2009
    r16 (In addition to the originally reported problem with being un...) committed by nigel.bree   -   In addition to the originally reported problem with being unable to save machine default configurations, there is another problem with the faulty way the GSS console UI handles these. If the configuration server service does not receive a default user name from the client when initially creating the machine, the corresponding name it assigns for display in the console is just the machine name instead of the machine name and default user name combined. The initial configuration name happens to be the name as this, which is normally fine. However, because the console incorrectly looks at machine default configurations as potentially clashing when saving a non-default named configuration, a default configuration which ended up being saved as a plain machine name will end up causing spurious conflicts for users which want to save an alternative named configuration with the machine name. This extends the script slightly to ensure that machine default configurations that don't contain the substring " - ", and which are thus plain machine names, are also considered candidates to rename internally as potentially conflicting.
    In addition to the originally reported problem with being unable to save machine default configurations, there is another problem with the faulty way the GSS console UI handles these. If the configuration server service does not receive a default user name from the client when initially creating the machine, the corresponding name it assigns for display in the console is just the machine name instead of the machine name and default user name combined. The initial configuration name happens to be the name as this, which is normally fine. However, because the console incorrectly looks at machine default configurations as potentially clashing when saving a non-default named configuration, a default configuration which ended up being saved as a plain machine name will end up causing spurious conflicts for users which want to save an alternative named configuration with the machine name. This extends the script slightly to ensure that machine default configurations that don't contain the substring " - ", and which are thus plain machine names, are also considered candidates to rename internally as potentially conflicting.
  • Oct 25, 2009
    issue 14 (Automated Data Cleanup to purge old retired clients from the...) reported by lhudsoniii   -   What would you like a script to be able to do? I would like the script automatically purge clients from the ghost console based off some criteria which would remove clients which have not communicated with the ghost server in a long time. The idea would be a client which has not touched the ghost console in over 2 months more than likely has been DOD wiped and tossed in a junk heap. This would purge those out leaving me only with my active inventory. Thanks If you would like an enhancement to an existing script, which one?
    What would you like a script to be able to do? I would like the script automatically purge clients from the ghost console based off some criteria which would remove clients which have not communicated with the ghost server in a long time. The idea would be a client which has not touched the ghost console in over 2 months more than likely has been DOD wiped and tossed in a junk heap. This would purge those out leaving me only with my active inventory. Thanks If you would like an enhancement to an existing script, which one?
  • Aug 28, 2009
    gss-scripts_2009-08.zip (The gss-scripts collection, August 2009 edition (r15)) file uploaded by nigel.bree   -  
    Labels: Featured Type-Archive OpSys-Windows
    Labels: Featured Type-Archive OpSys-Windows
  • Aug 28, 2009
    r15 (As I've not heard any reports of problems with the Vista bra...) committed by nigel.bree   -   As I've not heard any reports of problems with the Vista branch of the tools (and no reports about Windows 7, although I haven't yet had time to personally re-test everything with Win7), it's past time that I reintegrated the changes into the trunk and prepared a fresh download.
    As I've not heard any reports of problems with the Vista branch of the tools (and no reports about Windows 7, although I haven't yet had time to personally re-test everything with Win7), it's past time that I reintegrated the changes into the trunk and prepared a fresh download.
  • Jul 22, 2009
    issue 13 (Integrity error when trying to remove computer, script error...) changed by nigel.bree   -   This is because GSS1.0 (aka Ghost 8.2) doesn't use the Sybase database security mechanisms the same way that GSS1.1 and later do, where the database passwords are randomly generated at install time. I've made some changes to the set of scripts affected by this, including the database backup script backupdb.wsf (which other scripts such as delclients.wsf use indirectly if it is present). I've tested these changes by hand on a Ghost 8.0 system to ensure they work decently far back; for now the changes were made in the Vista branch since that's what I've been using as a working branch - the fix is in Revision 14 and thus you can get the fixed delclients.wsf from http://code.google.com/p/gss- scripts/source/browse/branches/vista/delclients.wsf (right-click on "View raw file" and use "Save as" in your browser to download the latest version of that to run).
    Status: Testing
    Labels: Type-Defect Priority-High
    This is because GSS1.0 (aka Ghost 8.2) doesn't use the Sybase database security mechanisms the same way that GSS1.1 and later do, where the database passwords are randomly generated at install time. I've made some changes to the set of scripts affected by this, including the database backup script backupdb.wsf (which other scripts such as delclients.wsf use indirectly if it is present). I've tested these changes by hand on a Ghost 8.0 system to ensure they work decently far back; for now the changes were made in the Vista branch since that's what I've been using as a working branch - the fix is in Revision 14 and thus you can get the fixed delclients.wsf from http://code.google.com/p/gss- scripts/source/browse/branches/vista/delclients.wsf (right-click on "View raw file" and use "Save as" in your browser to download the latest version of that to run).
    Status: Testing
    Labels: Type-Defect Priority-High
  • Jul 22, 2009
    r14 (Potential set of fixes for Issue #13 both as reported and as...) committed by nigel.bree   -   Potential set of fixes for Issue #13 both as reported and as well the related issues with the backupdb.wsf script which the delclients.wsf script wants to run automatically and which was also not working with GSS1.0
    Potential set of fixes for Issue #13 both as reported and as well the related issues with the backupdb.wsf script which the delclients.wsf script wants to run automatically and which was also not working with GSS1.0
  • Jul 22, 2009
    issue 13 (Integrity error when trying to remove computer, script error...) reported by strikerbb   -   What steps will reproduce the problem? 1. Run delclients.wsf 2. Enter anything 3. Hit okay What is the expected output? What do you see instead? Expect script to remove PCs from symantec ghost console that match the string given. Instead I get the following error message: Line: 152 Char: 4 Error: Object doesn't support this property or method: 'server.ConfigDatabase' Code: 800A01B6 Source: Microsoft VBScript runtime error What version of the product are you using? On what operating system? Ghost console 8.2.0.1117, script version unknown (full text of script below), Windows server 2003 Please provide any additional information below. ' Copyright (c) 2008, Symantec Corporation ' All rights reserved. ' ' Redistribution and use in source and binary forms, with or without modification, ' are permitted provided that the following conditions are met: ' ' * Redistributions of source code must retain the above copyright notice, ' this list of conditions and the following disclaimer. ' * Redistributions in binary form must reproduce the above copyright notice, ' this list of conditions and the following disclaimer in the documentation ' and/or other materials provided with the distribution. ' * Neither the name of the Symantec Corporation nor the names of its contributors ' may be used to endorse or promote products derived from this software without ' specific prior written permission. ' ' THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ' ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ' WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ' IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, ' INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ' NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ' PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ' WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ' ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ' POSSIBILITY OF SUCH DAMAGE. ' '-------------------------------------------------------------------------- --------- ' ' Attempt to locate all the various parts of the console database ' that clients are related to, and clean most of them out. This is ' useful largely because of a strange UI decision in the console ' which is to reject client deletes when they are part of tasks ' or reports, instead of simply cascading the delete of the ' dependent rows (which it does do for other things). ' ' In combination with the new backup/restore scripts, this also ' enables bulk cleanout of the clients in a database, which works ' well if the backup/restore scripts are used to move databases to ' fresh server instances. ' Places to look for clients (that we might need to remove if we ' want to help delete the client from the database). ' ' - [TaskOp] contains the link between a machine and custom ' configuration records for task items if the [TaskStepId] is 18 ' (for Configuration, see the [TaskStep] table for the meanings ' of the [TaskStepId] column) ' ' - [Task] can link directly to a machine view as well (whatever ' it links to, the [TaskOp]s in the task all link to the same view ' ID, whether it be a folder or machine, with the exception of ' any custom configuration records for individual machines as ' mentioned above). ' There's a detail with this, which is that we probably don't ' want to delete these outright. Instead, we should point them ' at the Default folder, which has [MachineViewId] of 1 so the ' task definitions stick around. ' ' - Backup regime instances, not just the link in the [MachineID] ' column of [BackupRegimeInstanceMachine] but also the [Filename] ' column which refers to the external file containing the backup. ' ' - WMI Reports, [WMIReport].[MachineViewId] ' ' - Inventory data, in [WMIData] by [MachineID] ' ' - [MachineWMIViewMap], by [MachineID] ' '----------------------------------------------------------------- ' ' Another detail to cover here is how the queries for the above ' have to be structured. Because of the way that the console has ' no distinction between shortcuts and machines, the separate names ' for the shortcuts in the [MachineView] table can be different but ' we have to match them all (unless we want to match the machine ' name in the default configuration instead). ' ' Because that means a many-to-one-to-many-to-many cascade, which we ' have to process in a really inconvenient order. Either we're going ' to have a really nasty collection of subqueries or we'll have to ' build up an in-memory list of machine view items and loop over ' them (which is the kind of style that the console itself uses). ' ' The other aspect of this is whether we do the name matching using ' SQL's 'LIKE' operator, or allow the use of full regular expression ' syntax. ' ' If we had a normal database to operate against, we could at least ' split the difference by materializing a table with the delete ' list, but with the SQLAnywhere runtime edition in GSS we can't ' create tables dynamically so this isn't an option. For now, I'm ' using a string containing a set to experiment with how well it ' works in larger environments. <job id="GSS Client Cleanup Utility"> <script language="VBScript"> ' Some basic setup - this script requires a 32-bit execution environment q = Chr (34) set Shell = WScript.CreateObject ("WScript.Shell") set Env = Shell.Environment ("Process") arch = Env ("PROCESSOR_ARCHITECTURE") if arch <> "x86" then host = Replace (WScript.FullName, "System32", "SysWow64") args = q & WScript.ScriptFullName & q for each arg in WScript.Arguments args = args & " " & q & arg & q next Shell.Run host & " " & args, 0, true WScript.Quit 1 end if if WScript.Version = "5.1" then badScript = true end if if badScript then set switches = namedArguments () unnamed = unnamedArguments () unnamedCount = UBound (unnamed) + 1 else set switches = WScript.Arguments.Named set unnamed = WScript.Arguments.Unnamed unnamedCount = unnamed.Count end if crlf = Chr (13) & Chr (10) set FS = WScript.CreateObject ("Scripting.FileSystemObject") if unnamedCount > 0 then find = unnamed (0) else find = InputBox ("Client name pattern to find" & crlf & _ "hit ESC or cancel to quit", "Client finder", "pattern") end if if find = "" then WScript.Quit 0 end if quiet = switches.Exists ("quiet") ' Access the Configuration Server service's root COM scripting object set server = CreateObject("ConfigServer.Application") ' Get the database configuration object from the configuration server set dbInfo = server.ConfigDatabase ' Obtain the current database username and password user = dbInfo.Username pass = dbinfo.Password '------------------------------------------------------------------------ --- ' Before we do anything, take an emergency undo backup of the current state. backupScript = Replace (WScript.ScriptFullName, "delclients", "backupdb") if FS.FileExists (backupScript) then result = Shell.Run (q & backupScript & q & " /undo:ClientDelete", 2, true) if result <> 0 then result = MsgBox ("Could not create undo cabinet, proceed with client delete?", 1) if result <> 1 then WScript.Quit 1 end if end if elseif not quiet then ' If we don't have the backup script sitting next to us, nag result = MsgBox ("Cannot find the backup script to create an undo file; " & lf & lf & _ "Are you sure you want to proceed?", 1) if result <> 1 then WScript.Quit 1 end if end if ' Form the ODBC connection string to the database - this is a 32-bit connection ' string, not usable on 64-bit systems (which also don't have the requisite ADODB ' providers for doing anything useful, either). conn = "DSN=Symantec Ghost;UID=" & user & ";PWD=" & pass ' Begin by getting a connection to the database set adoConn = CreateObject ("ADODB.Connection") adoConn.Open (conn) adoConn.BeginTrans ' Begin by matching the machine names and getting the machine unique ' database ID codes, from which we derive all the other stages in the ' pipeline. set machines = filterIds (find) if machines.Count = 0 then WScript.Echo "No matches found" WScript.Quit 1 end if ' Second stage is to expand that into the set of all the shortcuts ' that match the machine IDs, since many of the things that link to ' machines do so by their shortcut ID instead of the machine ID. set shortcuts = findShortcuts (machines) set configs = findConfigs (machines) shortcutSet = keysToSet (shortcuts) machineSet = keysToSet (machines) configSet = keysToSet (configs) x = clean_WMIReport (shortcutSet) + _ clean_Inventory (machineSet) + _ clean_Backups (machineSet) + _ clean_CustomConfigs (shortcutSet) + _ clean_Configs (configSet) + _ clean_Tasks (shortcutSet) + _ clean_Machines (machineSet) WScript.Echo machines.Count & " client(s) with " & x & " database records cleaned" ' Notify the configuration Server of the changes that we've made, which ' it handles by re-reading everything. adoConn.CommitTrans server.RefreshDatabase WScript.Quit 0 ' Since WScript 5.1 doesn't support the Named argument collection, split the regular ' arguments collection into pieces function namedArguments () set named = CreateObject ("Scripting.Dictionary") for each arg in WScript.Arguments if Mid (arg, 1, 1) = "/" then pos = InStr (arg, ":") if pos > 0 then named.Add Mid (arg, 2, pos - 2), Mid (arg, pos + 1) else named.Add Mid (arg, 2), "" end if end if next set namedArguments = named end function ' Similar to the above, get the set of unnamed arguments for WScript 5.1 function unnamedArguments () count = 0 for each arg in WScript.Arguments if Mid (arg, 1, 1) <> "/" then count = count + 1 end if next ' Now we now the array size, set it up. dim output () redim output (count) count = 0 for each arg in WScript.Arguments if Mid (arg, 1, 1) <> "/" then output (count) = arg count = count + 1 end if next unnamedArguments = output end function ' Extract a string from the dictionary which combines the strings into a ' set literal suitable for using with the IN operator. function keysToSet(dict) str = "" for each id in dict.keys if str = "" then str = "(" else str = str & "," end if str = str & id next if str = "" then str = "()" else str = str & ")" end if keysToSet = str end function ' Extract a string from the dictionary which combines the value strings ' into a set literal suitable for using with the IN operator. function valuesToSet(dict) str = "" for each id in dict.keys if str = "" then str = "(" else str = str & "," end if str = str & dict (id) next if str = "" then str = "()" else str = str & ")" end if valuesToSet = str end function ' Create a query object function query (sql) set adoRecord = CreateObject ("ADODB.RecordSet") adoRecord.ActiveConnection = adoConn adoRecord.Open (sql) set query = adoRecord end function ' Perform a one-shot execution function execSql (sql) rows = 0 adoConn.Execute sql, rows execSql = rows end function ' Build a list of Machine.ID values by looking through all the MachineView ' shortcut names and matching them. function filterIds (pattern) ' Create the RegExp object to do the matching set re = new RegExp re.Pattern = find re.IgnoreCase = true ' Create a dictionary to remember the view and machine table IDs. set dict = CreateObject ("Scripting.Dictionary") ' Look in all the returned rows for the pattern the user asked for set record = query ("select Description, MachineId " & _ "from Machine, MachineView " & _ "where Machine.ID = MachineView.MachineID") do while not record.EOF desc = record ("Description") id = record ("MachineId") if re.Test (desc) then ' We got a hit; record the ID in a dictionary object ' for future reference x = CStr (id) if not dict.Exists(x) then dict.Add x, desc end if end if record.MoveNext loop record.Close set filterIds = dict end function ' Take a dictionary of machine IDs and generate a dictionary of machine ' shortcut IDs function findShortcuts (machines) set dict = CreateObject ("Scripting.Dictionary") x = keysToSet (machines) set record = query ("select ID, MachineId from MachineView " & _ "where MachineId IN " & x) do while not record.EOF id = record ("ID") machineId = record ("MachineId") dict.Add id, machineId record.MoveNext loop record.Close set findShortcuts = dict end function ' Takes a dictionary of machine IDs and generate a dictionary of ' config IDs function findConfigs (machines) set dict = CreateObject ("Scripting.Dictionary") x = keysToSet (machines) set record = query ("select ID, MachineId from ResourceView " & _ "where MachineId IN " & x) do while not record.EOF id = record ("ID") machineId = record ("MachineId") dict.Add id, machineId record.MoveNext loop record.Close set findConfigs = dict end function '-------------------------------------------------------------------- ' The various cleanup functions to purge the client data. function clean_WMIReport (shortcuts) x = execSql ("delete from WMIReport " & _ "where MachineViewID IN " & shortcuts) clean_WMIReport = x end function function clean_Backups (machines) x = 0 set record = query ("select Filename " & _ "from BackupRegimeInstanceMachine " & _ "where MachineId IN " & machines) do while not record.EOF file = record ("Filename") FS.DeleteFile file record.Delete record.MoveNext x = x + 1 loop record.Close clean_Backups = x end function function clean_Inventory (machines) x = execSql ("delete from WMIData " & _ "where MachineId IN " & machines) y = execSql ("delete from MachineWMIViewMap " & _ "where MachineId IN " & machines) clean_Inventory = x + y end function function clean_CustomConfigs (shortcuts) x = execSql ("delete from TaskOp " & _ "where TaskStepId = 18 " & _ " and MachineViewId IN " & shortcuts) clean_CustomConfigs = x end function function clean_Configs (configs) x = execSql ("delete from ConfParam " & _ "where ConfigurationId IN " & configs) y = execSql ("delete from Configuration " & _ "where ID IN " & configs) clean_Configs = x + y end function function clean_Tasks (shortcuts) x = execSql ("update TaskOp " & _ "set MachineViewId = 1 " & _ "where MachineViewId IN " & shortcuts) y = execSql ("update Task " & _ "set MachineViewId = 1 " & _ "where MachineViewId IN " & shortcuts) clean_Tasks = x + y end function function clean_Machines (machines) x = execSql ("delete from MachineView " & _ "where MachineId IN " & machines) y = execSql ("delete from Machine " & _ "where ID IN " & machines) clean_Machines = x + y end function </script> </job>
    What steps will reproduce the problem? 1. Run delclients.wsf 2. Enter anything 3. Hit okay What is the expected output? What do you see instead? Expect script to remove PCs from symantec ghost console that match the string given. Instead I get the following error message: Line: 152 Char: 4 Error: Object doesn't support this property or method: 'server.ConfigDatabase' Code: 800A01B6 Source: Microsoft VBScript runtime error What version of the product are you using? On what operating system? Ghost console 8.2.0.1117, script version unknown (full text of script below), Windows server 2003 Please provide any additional information below. ' Copyright (c) 2008, Symantec Corporation ' All rights reserved. ' ' Redistribution and use in source and binary forms, with or without modification, ' are permitted provided that the following conditions are met: ' ' * Redistributions of source code must retain the above copyright notice, ' this list of conditions and the following disclaimer. ' * Redistributions in binary form must reproduce the above copyright notice, ' this list of conditions and the following disclaimer in the documentation ' and/or other materials provided with the distribution. ' * Neither the name of the Symantec Corporation nor the names of its contributors ' may be used to endorse or promote products derived from this software without ' specific prior written permission. ' ' THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ' ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ' WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ' IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, ' INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ' NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ' PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ' WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ' ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ' POSSIBILITY OF SUCH DAMAGE. ' '-------------------------------------------------------------------------- --------- ' ' Attempt to locate all the various parts of the console database ' that clients are related to, and clean most of them out. This is ' useful largely because of a strange UI decision in the console ' which is to reject client deletes when they are part of tasks ' or reports, instead of simply cascading the delete of the ' dependent rows (which it does do for other things). ' ' In combination with the new backup/restore scripts, this also ' enables bulk cleanout of the clients in a database, which works ' well if the backup/restore scripts are used to move databases to ' fresh server instances. ' Places to look for clients (that we might need to remove if we ' want to help delete the client from the database). ' ' - [TaskOp] contains the link between a machine and custom ' configuration records for task items if the [TaskStepId] is 18 ' (for Configuration, see the [TaskStep] table for the meanings ' of the [TaskStepId] column) ' ' - [Task] can link directly to a machine view as well (whatever ' it links to, the [TaskOp]s in the task all link to the same view ' ID, whether it be a folder or machine, with the exception of ' any custom configuration records for individual machines as ' mentioned above). ' There's a detail with this, which is that we probably don't ' want to delete these outright. Instead, we should point them ' at the Default folder, which has [MachineViewId] of 1 so the ' task definitions stick around. ' ' - Backup regime instances, not just the link in the [MachineID] ' column of [BackupRegimeInstanceMachine] but also the [Filename] ' column which refers to the external file containing the backup. ' ' - WMI Reports, [WMIReport].[MachineViewId] ' ' - Inventory data, in [WMIData] by [MachineID] ' ' - [MachineWMIViewMap], by [MachineID] ' '----------------------------------------------------------------- ' ' Another detail to cover here is how the queries for the above ' have to be structured. Because of the way that the console has ' no distinction between shortcuts and machines, the separate names ' for the shortcuts in the [MachineView] table can be different but ' we have to match them all (unless we want to match the machine ' name in the default configuration instead). ' ' Because that means a many-to-one-to-many-to-many cascade, which we ' have to process in a really inconvenient order. Either we're going ' to have a really nasty collection of subqueries or we'll have to ' build up an in-memory list of machine view items and loop over ' them (which is the kind of style that the console itself uses). ' ' The other aspect of this is whether we do the name matching using ' SQL's 'LIKE' operator, or allow the use of full regular expression ' syntax. ' ' If we had a normal database to operate against, we could at least ' split the difference by materializing a table with the delete ' list, but with the SQLAnywhere runtime edition in GSS we can't ' create tables dynamically so this isn't an option. For now, I'm ' using a string containing a set to experiment with how well it ' works in larger environments. <job id="GSS Client Cleanup Utility"> <script language="VBScript"> ' Some basic setup - this script requires a 32-bit execution environment q = Chr (34) set Shell = WScript.CreateObject ("WScript.Shell") set Env = Shell.Environment ("Process") arch = Env ("PROCESSOR_ARCHITECTURE") if arch <> "x86" then host = Replace (WScript.FullName, "System32", "SysWow64") args = q & WScript.ScriptFullName & q for each arg in WScript.Arguments args = args & " " & q & arg & q next Shell.Run host & " " & args, 0, true WScript.Quit 1 end if if WScript.Version = "5.1" then badScript = true end if if badScript then set switches = namedArguments () unnamed = unnamedArguments () unnamedCount = UBound (unnamed) + 1 else set switches = WScript.Arguments.Named set unnamed = WScript.Arguments.Unnamed unnamedCount = unnamed.Count end if crlf = Chr (13) & Chr (10) set FS = WScript.CreateObject ("Scripting.FileSystemObject") if unnamedCount > 0 then find = unnamed (0) else find = InputBox ("Client name pattern to find" & crlf & _ "hit ESC or cancel to quit", "Client finder", "pattern") end if if find = "" then WScript.Quit 0 end if quiet = switches.Exists ("quiet") ' Access the Configuration Server service's root COM scripting object set server = CreateObject("ConfigServer.Application") ' Get the database configuration object from the configuration server set dbInfo = server.ConfigDatabase ' Obtain the current database username and password user = dbInfo.Username pass = dbinfo.Password '------------------------------------------------------------------------ --- ' Before we do anything, take an emergency undo backup of the current state. backupScript = Replace (WScript.ScriptFullName, "delclients", "backupdb") if FS.FileExists (backupScript) then result = Shell.Run (q & backupScript & q & " /undo:ClientDelete", 2, true) if result <> 0 then result = MsgBox ("Could not create undo cabinet, proceed with client delete?", 1) if result <> 1 then WScript.Quit 1 end if end if elseif not quiet then ' If we don't have the backup script sitting next to us, nag result = MsgBox ("Cannot find the backup script to create an undo file; " & lf & lf & _ "Are you sure you want to proceed?", 1) if result <> 1 then WScript.Quit 1 end if end if ' Form the ODBC connection string to the database - this is a 32-bit connection ' string, not usable on 64-bit systems (which also don't have the requisite ADODB ' providers for doing anything useful, either). conn = "DSN=Symantec Ghost;UID=" & user & ";PWD=" & pass ' Begin by getting a connection to the database set adoConn = CreateObject ("ADODB.Connection") adoConn.Open (conn) adoConn.BeginTrans ' Begin by matching the machine names and getting the machine unique ' database ID codes, from which we derive all the other stages in the ' pipeline. set machines = filterIds (find) if machines.Count = 0 then WScript.Echo "No matches found" WScript.Quit 1 end if ' Second stage is to expand that into the set of all the shortcuts ' that match the machine IDs, since many of the things that link to ' machines do so by their shortcut ID instead of the machine ID. set shortcuts = findShortcuts (machines) set configs = findConfigs (machines) shortcutSet = keysToSet (shortcuts) machineSet = keysToSet (machines) configSet = keysToSet (configs) x = clean_WMIReport (shortcutSet) + _ clean_Inventory (machineSet) + _ clean_Backups (machineSet) + _ clean_CustomConfigs (shortcutSet) + _ clean_Configs (configSet) + _ clean_Tasks (shortcutSet) + _ clean_Machines (machineSet) WScript.Echo machines.Count & " client(s) with " & x & " database records cleaned" ' Notify the configuration Server of the changes that we've made, which ' it handles by re-reading everything. adoConn.CommitTrans server.RefreshDatabase WScript.Quit 0 ' Since WScript 5.1 doesn't support the Named argument collection, split the regular ' arguments collection into pieces function namedArguments () set named = CreateObject ("Scripting.Dictionary") for each arg in WScript.Arguments if Mid (arg, 1, 1) = "/" then pos = InStr (arg, ":") if pos > 0 then named.Add Mid (arg, 2, pos - 2), Mid (arg, pos + 1) else named.Add Mid (arg, 2), "" end if end if next set namedArguments = named end function ' Similar to the above, get the set of unnamed arguments for WScript 5.1 function unnamedArguments () count = 0 for each arg in WScript.Arguments if Mid (arg, 1, 1) <> "/" then count = count + 1 end if next ' Now we now the array size, set it up. dim output () redim output (count) count = 0 for each arg in WScript.Arguments if Mid (arg, 1, 1) <> "/" then output (count) = arg count = count + 1 end if next unnamedArguments = output end function ' Extract a string from the dictionary which combines the strings into a ' set literal suitable for using with the IN operator. function keysToSet(dict) str = "" for each id in dict.keys if str = "" then str = "(" else str = str & "," end if str = str & id next if str = "" then str = "()" else str = str & ")" end if keysToSet = str end function ' Extract a string from the dictionary which combines the value strings ' into a set literal suitable for using with the IN operator. function valuesToSet(dict) str = "" for each id in dict.keys if str = "" then str = "(" else str = str & "," end if str = str & dict (id) next if str = "" then str = "()" else str = str & ")" end if valuesToSet = str end function ' Create a query object function query (sql) set adoRecord = CreateObject ("ADODB.RecordSet") adoRecord.ActiveConnection = adoConn adoRecord.Open (sql) set query = adoRecord end function ' Perform a one-shot execution function execSql (sql) rows = 0 adoConn.Execute sql, rows execSql = rows end function ' Build a list of Machine.ID values by looking through all the MachineView ' shortcut names and matching them. function filterIds (pattern) ' Create the RegExp object to do the matching set re = new RegExp re.Pattern = find re.IgnoreCase = true ' Create a dictionary to remember the view and machine table IDs. set dict = CreateObject ("Scripting.Dictionary") ' Look in all the returned rows for the pattern the user asked for set record = query ("select Description, MachineId " & _ "from Machine, MachineView " & _ "where Machine.ID = MachineView.MachineID") do while not record.EOF desc = record ("Description") id = record ("MachineId") if re.Test (desc) then ' We got a hit; record the ID in a dictionary object ' for future reference x = CStr (id) if not dict.Exists(x) then dict.Add x, desc end if end if record.MoveNext loop record.Close set filterIds = dict end function ' Take a dictionary of machine IDs and generate a dictionary of machine ' shortcut IDs function findShortcuts (machines) set dict = CreateObject ("Scripting.Dictionary") x = keysToSet (machines) set record = query ("select ID, MachineId from MachineView " & _ "where MachineId IN " & x) do while not record.EOF id = record ("ID") machineId = record ("MachineId") dict.Add id, machineId record.MoveNext loop record.Close set findShortcuts = dict end function ' Takes a dictionary of machine IDs and generate a dictionary of ' config IDs function findConfigs (machines) set dict = CreateObject ("Scripting.Dictionary") x = keysToSet (machines) set record = query ("select ID, MachineId from ResourceView " & _ "where MachineId IN " & x) do while not record.EOF id = record ("ID") machineId = record ("MachineId") dict.Add id, machineId record.MoveNext loop record.Close set findConfigs = dict end function '-------------------------------------------------------------------- ' The various cleanup functions to purge the client data. function clean_WMIReport (shortcuts) x = execSql ("delete from WMIReport " & _ "where MachineViewID IN " & shortcuts) clean_WMIReport = x end function function clean_Backups (machines) x = 0 set record = query ("select Filename " & _ "from BackupRegimeInstanceMachine " & _ "where MachineId IN " & machines) do while not record.EOF file = record ("Filename") FS.DeleteFile file record.Delete record.MoveNext x = x + 1 loop record.Close clean_Backups = x end function function clean_Inventory (machines) x = execSql ("delete from WMIData " & _ "where MachineId IN " & machines) y = execSql ("delete from MachineWMIViewMap " & _ "where MachineId IN " & machines) clean_Inventory = x + y end function function clean_CustomConfigs (shortcuts) x = execSql ("delete from TaskOp " & _ "where TaskStepId = 18 " & _ " and MachineViewId IN " & shortcuts) clean_CustomConfigs = x end function function clean_Configs (configs) x = execSql ("delete from ConfParam " & _ "where ConfigurationId IN " & configs) y = execSql ("delete from Configuration " & _ "where ID IN " & configs) clean_Configs = x + y end function function clean_Tasks (shortcuts) x = execSql ("update TaskOp " & _ "set MachineViewId = 1 " & _ "where MachineViewId IN " & shortcuts) y = execSql ("update Task " & _ "set MachineViewId = 1 " & _ "where MachineViewId IN " & shortcuts) clean_Tasks = x + y end function function clean_Machines (machines) x = execSql ("delete from MachineView " & _ "where MachineId IN " & machines) y = execSql ("delete from Machine " & _ "where ID IN " & machines) clean_Machines = x + y end function </script> </job>
  • Jun 17, 2009
    r13 (Small adjustment to the script so that the only entries in t...) committed by nigel.bree   -   Small adjustment to the script so that the only entries in the ResourceView table it adjusts are the ones that need it; in addition, print a count of the number of rows adjusted.
    Small adjustment to the script so that the only entries in the ResourceView table it adjusts are the ones that need it; in addition, print a count of the number of rows adjusted.
  • Jun 11, 2009
    issue 12 (Unable to delete clients when partial name entered) changed by nigel.bree   -   Thanks to Rodney's help it's become apparent that the underlying cause is when the script cleans out data in the WMIData table, which can have 10,000 or so rows per machine. The ADO error seems to result from having too many rows being hit in one statement as a result of this. I've posted two updates to try and resolve this, and rodney has tried r10 and it appears to resolve the problem for him; change r11 fixes a bug in that which is actually what made it work, and building on the insight into the root cause that gave now fixes the problem with the WMIData table specifically.
    Status: Fixed
    Labels: Type-Defect Component-Scripts
    Thanks to Rodney's help it's become apparent that the underlying cause is when the script cleans out data in the WMIData table, which can have 10,000 or so rows per machine. The ADO error seems to result from having too many rows being hit in one statement as a result of this. I've posted two updates to try and resolve this, and rodney has tried r10 and it appears to resolve the problem for him; change r11 fixes a bug in that which is actually what made it work, and building on the insight into the root cause that gave now fixes the problem with the WMIData table specifically.
    Status: Fixed
    Labels: Type-Defect Component-Scripts
  • Jun 11, 2009
    r12 (Add a new script to help work around a design fault in the G...) committed by nigel.bree   -   Add a new script to help work around a design fault in the GSS2.0/GSS2.5 consoles with respect to the machine default configurations, where they have invisible and unchangeable names that are required to be unique. The underlying console and configuration server code is being changed so this can't happen in future, but as a simple-to-distribute workaround this script looks for duplicate names in this table and renames any affected rows, to avoid the console bug where any changes made to the configuration cannot be saved.
    Add a new script to help work around a design fault in the GSS2.0/GSS2.5 consoles with respect to the machine default configurations, where they have invisible and unchangeable names that are required to be unique. The underlying console and configuration server code is being changed so this can't happen in future, but as a simple-to-distribute workaround this script looks for duplicate names in this table and renames any affected rows, to avoid the console bug where any changes made to the configuration cannot be saved.
  • Jun 11, 2009
    r11 (More work on the client deletion script thanks to Issue 12 -...) committed by nigel.bree   -   More work on the client deletion script thanks to Issue 12 - the previous check-in did fix the problem, but inadvertently. It contained a bug that resulted in clients being deleted one by one, which turns out to be actually what was necessary; the root cause of the problem is a bug in ADO when handling the bulk delete being performed in the WMIData table, where there can be 10,000 rows stored for a single client. For that one table, we need to delete the client data one client at a time.
    More work on the client deletion script thanks to Issue 12 - the previous check-in did fix the problem, but inadvertently. It contained a bug that resulted in clients being deleted one by one, which turns out to be actually what was necessary; the root cause of the problem is a bug in ADO when handling the bulk delete being performed in the WMIData table, where there can be 10,000 rows stored for a single client. For that one table, we need to delete the client data one client at a time.
  • Jun 03, 2009
    r10 (Experimental code to resolve Issue #12 by giving the keysToS...) committed by nigel.bree   -   Experimental code to resolve Issue #12 by giving the keysToSet function a limit on the number of elements to convert and by making it mutate the incoming dictionary as the elements are drained. I don't yet have a good set of test data so the limit per query is arbitrarily set at 32 set elements for now.
    Experimental code to resolve Issue #12 by giving the keysToSet function a limit on the number of elements to convert and by making it mutate the incoming dictionary as the elements are drained. I don't yet have a good set of test data so the limit per query is arbitrarily set at 32 set elements for now.
  • May 28, 2009
    issue 12 (Unable to delete clients when partial name entered) commented on by rodneybetts   -   Sounds good, I appreciate your quick response. I have the info ready to upload to where ever, so just let me know when you get back and I'll be ready to get it done.
    Sounds good, I appreciate your quick response. I have the info ready to upload to where ever, so just let me know when you get back and I'll be ready to get it done.
  • May 28, 2009
    issue 12 (Unable to delete clients when partial name entered) Owner changed by nigel.bree   -   I can't replicate this with a small client population; it deletes multiple clients fine. This suggests that the root cause might be a limit in the ADO database layer, which only appears if the list of clients exceeds some undocumented internal limit. Presumably this means I'll need to devise a system for capping the number of clients processed in one query, but it would help to be able to zero in on the limit. I don't have access to a suitable cient population to experiment on at the moment but what might help me with this is to get a copy of your database (taken using the backupdb.wsf script) along with a partial query that you know will provoke this error. If you can get this and e-mail me I can arrange a secure upload facility for this. [ Just FYI, I'll be travelling without internet access for a couple of days since it's coming up to a holiday weekend here in New Zealand, so give me a few days. ]
    Owner: nigel.bree
    I can't replicate this with a small client population; it deletes multiple clients fine. This suggests that the root cause might be a limit in the ADO database layer, which only appears if the list of clients exceeds some undocumented internal limit. Presumably this means I'll need to devise a system for capping the number of clients processed in one query, but it would help to be able to zero in on the limit. I don't have access to a suitable cient population to experiment on at the moment but what might help me with this is to get a copy of your database (taken using the backupdb.wsf script) along with a partial query that you know will provoke this error. If you can get this and e-mail me I can arrange a secure upload facility for this. [ Just FYI, I'll be travelling without internet access for a couple of days since it's coming up to a holiday weekend here in New Zealand, so give me a few days. ]
    Owner: nigel.bree
  • May 27, 2009
    issue 12 (Unable to delete clients when partial name entered) reported by rodneybetts   -   What steps will reproduce the problem? 1. Enter partial computer name into delclients.wsf 2. 3. What is the expected output? What do you see instead? What version of the product are you using? On what operating system? GSS 2.5 11.5.0.2113 Windows Server 2003 Standard edition Sp2 Please provide any additional information below. Clients delete fine when full computer name is entered, but when I enter a partial computer name to delete multiple clients I get an error message. Message is attached.
    What steps will reproduce the problem? 1. Enter partial computer name into delclients.wsf 2. 3. What is the expected output? What do you see instead? What version of the product are you using? On what operating system? GSS 2.5 11.5.0.2113 Windows Server 2003 Standard edition Sp2 Please provide any additional information below. Clients delete fine when full computer name is entered, but when I enter a partial computer name to delete multiple clients I get an error message. Message is attached.
  • Feb 02, 2009
    gss-scripts-vista-r9_2009-02-03.zip (Script collection Vista test version r9) file uploaded by nigel.bree   -  
    Labels: Type-Archive OpSys-Windows Featured
    Labels: Type-Archive OpSys-Windows Featured
  • Feb 02, 2009
    issue 5 (clientname.wsf should have an option for purging machines wi...) Status changed by nigel.bree   -  
    Status: Verified
    Status: Verified
  • Feb 02, 2009
    issue 4 (clientname.wsf hangs if machine records exist but have no na...) Status changed by nigel.bree   -  
    Status: Verified
    Status: Verified
  • Feb 02, 2009
    issue 2 (macfind.wsf only looks in the "Default" machine group) Status changed by nigel.bree   -  
    Status: Verified
    Status: Verified
  • Feb 02, 2009
    issue 8 (the shortcuts created by backupdb need the "Run as Administr...) commented on by nigel.bree   -   It turns out that this wasn't working since the target of the shortcut wasn't an executable, fixed in r9 along with additional tests where the scripts will also try and request elevation themselves.
    It turns out that this wasn't working since the target of the shortcut wasn't an executable, fixed in r9 along with additional tests where the scripts will also try and request elevation themselves.
  • Feb 02, 2009
    issue 9 (restoredb.wsf doesn't extract SYMANTECGHOST.DB on Windows Se...) changed by nigel.bree   -   Restoring from an elevated restoredb.wsf worked fine using the Vista branch version of the tools, so this appears to be more a usability issue. Lowered priority to medium. There did turn out to be a small bug in the creation of the restore shortcut to request elevation because I forgot to make the shortcut target the script interpreter rather than the script (an odd quirk of Vista's shell means that elevation is controlled by the "RunAs" registry key based on the extension of the shortcut target), so that's fixed. Additionally, since I had to go to all the work of setting up a test system, I've taken the opportunity to add new code to make the backup and restore scripts request elevation programmatically (and fixed a small bug in the handling of the automatic shortcut creation in the backup script), which should completely fix the actual usability problem. In addition, the code to test for elevation on Vista is conditioned so that on non-Vista systems there is now an error clearly stating only admins can run the script, which on Vista systems when run as non-Admin the "runas" style of elevation is to an admin, which works well. Checked in with changelist 9, http://code.google.com/p/gss-scripts/source/detail?r=9
    Status: Fixed
    Labels: Priority-Medium Priority-High
    Restoring from an elevated restoredb.wsf worked fine using the Vista branch version of the tools, so this appears to be more a usability issue. Lowered priority to medium. There did turn out to be a small bug in the creation of the restore shortcut to request elevation because I forgot to make the shortcut target the script interpreter rather than the script (an odd quirk of Vista's shell means that elevation is controlled by the "RunAs" registry key based on the extension of the shortcut target), so that's fixed. Additionally, since I had to go to all the work of setting up a test system, I've taken the opportunity to add new code to make the backup and restore scripts request elevation programmatically (and fixed a small bug in the handling of the automatic shortcut creation in the backup script), which should completely fix the actual usability problem. In addition, the code to test for elevation on Vista is conditioned so that on non-Vista systems there is now an error clearly stating only admins can run the script, which on Vista systems when run as non-Admin the "runas" style of elevation is to an admin, which works well. Checked in with changelist 9, http://code.google.com/p/gss-scripts/source/detail?r=9
    Status: Fixed
    Labels: Priority-Medium Priority-High
  • Feb 02, 2009
    r9 (Fix a small bug in the Vista shortcut handling in the backup...) committed by nigel.bree   -   Fix a small bug in the Vista shortcut handling in the backupdb script where I forgot to make the restore shortcut target a script interpreter exe, so that the "Run as Administrator" bit is honoured. Add a test for Vista for both backupdb and restoredb to see if the user is elevated and if not, request elevation by re-launching. This may not be ideal on non-Vista systems if the scripts are run by non-Admin users, so this is conditional on Vista and now a message is printed if run by a non- admin on pre-Vista systems.
    Fix a small bug in the Vista shortcut handling in the backupdb script where I forgot to make the restore shortcut target a script interpreter exe, so that the "Run as Administrator" bit is honoured. Add a test for Vista for both backupdb and restoredb to see if the user is elevated and if not, request elevation by re-launching. This may not be ideal on non-Vista systems if the scripts are run by non-Admin users, so this is conditional on Vista and now a message is printed if run by a non- admin on pre-Vista systems.
  • Jan 30, 2009
    issue 9 (restoredb.wsf doesn't extract SYMANTECGHOST.DB on Windows Se...) Status changed by nigel.bree   -  
    Status: Testing
    Status: Testing
  • Jan 30, 2009
    issue 9 (restoredb.wsf doesn't extract SYMANTECGHOST.DB on Windows Se...) commented on by nigel.bree   -   Thanks for the report; I won't be able to try creating a Server 2008 test bench for this for a couple of days, and in any case I may not be able to reproduce the failure you are seeing straight away, so something that would be really helpful would be if you could take a Process Monitor trace covering the restore from start to the time it fails - you can get it from http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx The trace will be big but it will compress well with a zip utility; probably rather than attaching it here it's better to e-mail it to me (my username is my gmail.com address) to inspect.
    Thanks for the report; I won't be able to try creating a Server 2008 test bench for this for a couple of days, and in any case I may not be able to reproduce the failure you are seeing straight away, so something that would be really helpful would be if you could take a Process Monitor trace covering the restore from start to the time it fails - you can get it from http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx The trace will be big but it will compress well with a zip utility; probably rather than attaching it here it's better to e-mail it to me (my username is my gmail.com address) to inspect.
  • Jan 30, 2009
    issue 9 (restoredb.wsf doesn't extract SYMANTECGHOST.DB on Windows Se...) commented on by bestett...@yahoo.com   -   I tried your new set of DB restore tools here. With same failure as before on my new 2008 server, "Failed to extract data file "db\Symantecghost.db" from input cabinet. I'm coming from Windows 2003.
    I tried your new set of DB restore tools here. With same failure as before on my new 2008 server, "Failed to extract data file "db\Symantecghost.db" from input cabinet. I'm coming from Windows 2003.
  • Jan 18, 2009
    r8 (Move the new empty-folder script from the vista branch to tr...) committed by nigel.bree   -   Move the new empty-folder script from the vista branch to trunk
    Move the new empty-folder script from the vista branch to trunk
  • Jan 18, 2009
    r7 (Clean up some left-over pieces since I started writing this ...) committed by nigel.bree   -   Clean up some left-over pieces since I started writing this by cut-n-paste from delclients.wsf
    Clean up some left-over pieces since I started writing this by cut-n-paste from delclients.wsf
  • Jan 18, 2009
    issue 11 (Have a script which is able to delete empty folders) Status changed by nigel.bree   -   I have created a new script for this purpose to the Vista branch (which I need to merge back into "trunk" soonish): http://code.google.com/p/gss-scripts/source/browse/branches/vista/delfolders.wsf It only works with empty folders, and removes them along with editing any tasks that referred to the folder so that it no longer does. In addition, this script tries to work around a design defect in the GSS2.5 console UI where "machine decommission" tasks that referred to a machine folder would be able to live in the database forever, but were not visible in the task UI. This meant that they could block the removal of an empty folder, and since they didn't exist in the UI once in this condition the folders could never be deleted.
    Status: Testing
    I have created a new script for this purpose to the Vista branch (which I need to merge back into "trunk" soonish): http://code.google.com/p/gss-scripts/source/browse/branches/vista/delfolders.wsf It only works with empty folders, and removes them along with editing any tasks that referred to the folder so that it no longer does. In addition, this script tries to work around a design defect in the GSS2.5 console UI where "machine decommission" tasks that referred to a machine folder would be able to live in the database forever, but were not visible in the task UI. This meant that they could block the removal of an empty folder, and since they didn't exist in the UI once in this condition the folders could never be deleted.
    Status: Testing
  • Jan 18, 2009
    r6 (Add the svn:eol-style property (just in case), update the cl...) committed by nigel.bree   -   Add the svn:eol-style property (just in case), update the clientname.wsf and delclients.wsf scripts a little for hygiene with "dim" statements, and add the new "delfolders.wsf" script
    Add the svn:eol-style property (just in case), update the clientname.wsf and delclients.wsf scripts a little for hygiene with "dim" statements, and add the new "delfolders.wsf" script
  • Jan 12, 2009
    issue 11 (Have a script which is able to delete empty folders) reported by nigel.bree   -   The delclient.wsf script allows the deletion of clients which are referenced by other items in the console database, removing them automatically (since the existing GSS console UI doesn't cascade deletes this way). However, since tasks and reports can also target folders and not just machines, the same UI problem of not allowing cascaded deletes also can block the removal of folders and it would be useful to have a script for this.
    The delclient.wsf script allows the deletion of clients which are referenced by other items in the console database, removing them automatically (since the existing GSS console UI doesn't cascade deletes this way). However, since tasks and reports can also target folders and not just machines, the same UI problem of not allowing cascaded deletes also can block the removal of folders and it would be useful to have a script for this.
  • Sep 14, 2008
    issue 10 (Removal of PC from GSS Database) Owner changed by nigel.bree   -   I haven't been able to reproduce this problem; what's particularly puzzling is that none of the script versions here (which is a mirror of my personal repository) are going near the database at that line. Here's line 317 of the original version: http://code.google.com/p/gss-scripts/source/browse/trunk/scripts/delclients.wsf#317 And here's line 317 of the Vista version: http://code.google.com/p/gss-scripts/source/browse/branches/vista/delclients.wsf#317 What I'm wondering is whether the version you've downloaded is different in some way - for instance, I know some kinds of corporate firewall contain scanners which are looking for potentially malicious code, for instance. I know there was also some plan to put these scripts into the GSS2.5 install at some point but those should have been identical to the initial version I checked in here. If you can attach the specific delclients.wsf file you have that is giving the error, I'll use that specific one on my test system to try and reproduce this.
    Owner: nigel.bree
    I haven't been able to reproduce this problem; what's particularly puzzling is that none of the script versions here (which is a mirror of my personal repository) are going near the database at that line. Here's line 317 of the original version: http://code.google.com/p/gss-scripts/source/browse/trunk/scripts/delclients.wsf#317 And here's line 317 of the Vista version: http://code.google.com/p/gss-scripts/source/browse/branches/vista/delclients.wsf#317 What I'm wondering is whether the version you've downloaded is different in some way - for instance, I know some kinds of corporate firewall contain scanners which are looking for potentially malicious code, for instance. I know there was also some plan to put these scripts into the GSS2.5 install at some point but those should have been identical to the initial version I checked in here. If you can attach the specific delclients.wsf file you have that is giving the error, I'll use that specific one on my test system to try and reproduce this.
    Owner: nigel.bree
  • Sep 04, 2008
    issue 10 (Removal of PC from GSS Database) reported by ingraham.bs   -   Forgive me, not sure if I am posting in the correct area here so i am going to take a chance. What steps will reproduce the problem? 1. After selecting "Erase Machine" from Tools 2. I can no longer remove the PC that was "Erased" from the console 3. I found on the symantec forums a solution to this exact problem. The script delclients.wsf script does exactly what I need. Except that I get a error when I run said script. What is the expected output? What do you see instead? Expected output would be the removal of the PC in the Ghost Console What I get instead is this - Windows Script Host Script: G:\GSStools\delclients.wsf Line: 317 Char: 4 Error: [Sysbase][ODBC Driver][Adaptive Server Anywhere]Syntax error near ')' on line 1 Code: 80040E14 Source: Microsoft OLE DB Provider for ODBC Drivers What version of the product are you using? On what operating system? GSS Version 2.5 Symantec Ghost Console version 11.5.0.2113 Windows 2003 Server R2 Please provide any additional information below. I hope I have given you enough information. Thanks Brad
    Forgive me, not sure if I am posting in the correct area here so i am going to take a chance. What steps will reproduce the problem? 1. After selecting "Erase Machine" from Tools 2. I can no longer remove the PC that was "Erased" from the console 3. I found on the symantec forums a solution to this exact problem. The script delclients.wsf script does exactly what I need. Except that I get a error when I run said script. What is the expected output? What do you see instead? Expected output would be the removal of the PC in the Ghost Console What I get instead is this - Windows Script Host Script: G:\GSStools\delclients.wsf Line: 317 Char: 4 Error: [Sysbase][ODBC Driver][Adaptive Server Anywhere]Syntax error near ')' on line 1 Code: 80040E14 Source: Microsoft OLE DB Provider for ODBC Drivers What version of the product are you using? On what operating system? GSS Version 2.5 Symantec Ghost Console version 11.5.0.2113 Windows 2003 Server R2 Please provide any additional information below. I hope I have given you enough information. Thanks Brad
  • Aug 04, 2008
    issue 8 (the shortcuts created by backupdb need the "Run as Administr...) Status changed by nigel.bree   -   In r4 I checked in part of the fix accidentally, the rest goes in with r5 The actual script function that modifies the .lnk file has already been exercised somewhat in the GSS patcher used in the first GSS2.5 LiveUpdate, so it should work reasonably well.
    Status: Fixed
    In r4 I checked in part of the fix accidentally, the rest goes in with r5 The actual script function that modifies the .lnk file has already been exercised somewhat in the GSS patcher used in the first GSS2.5 LiveUpdate, so it should work reasonably well.
    Status: Fixed
  • Aug 04, 2008
    r5 (Hopefully resolve issue#8 by adding a fragment that modifies...) committed by nigel.bree   -   Hopefully resolve issue#8 by adding a fragment that modifies a .LNK in-place to adjust the undocumented "run as administrator" bit.
    Hopefully resolve issue#8 by adding a fragment that modifies a .LNK in-place to adjust the undocumented "run as administrator" bit.
  • Aug 04, 2008
    issue 9 (restoredb.wsf doesn't extract SYMANTECGHOST.DB on Windows Se...) Status changed by nigel.bree   -   Change to r4 contains a potential fix to this (along with some other in-process cleanup work) which needs testing. http://code.google.com/p/gss-scripts/source/detail?r=4
    Status: Fixed
    Change to r4 contains a potential fix to this (along with some other in-process cleanup work) which needs testing. http://code.google.com/p/gss-scripts/source/detail?r=4
    Status: Fixed
  • Aug 04, 2008
    issue 9 (restoredb.wsf doesn't extract SYMANTECGHOST.DB on Windows Se...) reported by nigel.bree   -   extract any backup cab on Windows 2008 and the above fails to extract due to a silent and incompatible change in the command-line behaviour of extract.exe
    extract any backup cab on Windows 2008 and the above fails to extract due to a silent and incompatible change in the command-line behaviour of extract.exe
  • Aug 04, 2008
    r4 (Change the copyright boilerplate a little, add a lot of dim ...) committed by nigel.bree   -   Change the copyright boilerplate a little, add a lot of dim statements for better namespace hygiene, and modify the restoredb.wsf script to work around a problem apparently introduced in Vista where the behaviour of expand.exe is no longer compatible with previous versions where the cab contains files with pathnames. Now -F does not accept a file with a path prefix (whereas it did before), and when extracted the path prefix is included (whereas if you included it with -F before, it was not extracted with the prefix).
    Change the copyright boilerplate a little, add a lot of dim statements for better namespace hygiene, and modify the restoredb.wsf script to work around a problem apparently introduced in Vista where the behaviour of expand.exe is no longer compatible with previous versions where the cab contains files with pathnames. Now -F does not accept a file with a path prefix (whereas it did before), and when extracted the path prefix is included (whereas if you included it with -F before, it was not extracted with the prefix).
  • Aug 04, 2008
    r3 (Working branch for vista compatibility ) committed by nigel.bree   -   Working branch for vista compatibility
    Working branch for vista compatibility
 
Hosted by Google Code