Login | |
|
 |
RE: Run Maintenance on a PC through Script. - 9/6/2006 9:08:10 PM
|
|
 |
|
| |
gdewrance
Posts: 587
Score: 3
Joined: 3/16/2006
Status: offline
|
this page my help with your questions on cleanmgr http://www.ss64.com/nt/cleanmgr.html Open The Command Prompt START RUN cleanmgr /sageset:x (i recommend x=1) cleanmgr /sageset:1 a box will popup, then check mark all the items and click OK then type: cleanmgr /sagerun:x (if you choose 1...type 1) cleanmgr /sagerun:1 now...you can use the cleanmgr /sagerun:x as many times you want, ok ?... sageset is just one time or ...define it as many times you want it, by the way.. x is a # betwheen 0 and 65235
< Message edited by gdewrance -- 9/6/2006 9:14:45 PM >
|
|
| |
|
|
|
 |
RE: Run Maintenance on a PC through Script. - 9/12/2006 5:10:00 PM
|
|
 |
|
| |
gdewrance
Posts: 587
Score: 3
Joined: 3/16/2006
Status: offline
|
I would have just run sageset number and extracted my own reg settings to install to other computers as this sets the flag value. then just use sagerun number to execute it
|
|
| |
|
|
|
 |
RE: Run Maintenance on a PC through Script. - 9/26/2006 11:51:04 PM
|
|
 |
|
| |
gdewrance
Posts: 587
Score: 3
Joined: 3/16/2006
Status: offline
|
try modifying this const HKEY_LOCAL_MACHINE = &H80000002 strComputer = "." Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_ strComputer & "\root\default:StdRegProv") Set WshShell = WScript.CreateObject("WScript.Shell") ' Uninstall first application... strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\1st JavaScript Editor 3" '<--- change as needed strValueName = "UninstallString" oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strUninstallFullPath If IsNull(strUninstallFullPath) Then ' wscript.echo "Uninstall path for app1 is null" Else ' the following line -y switch suppresses the confirmation question from poping up strUninstallFullPath=strUninstallFullPath & " -y" '<--- change as needed WshShell.Run strUninstallFullPath,8,true End If ' Uninstall second application... strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\SomeOtherApp" '<--- change as needed strValueName = "UninstallString" oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strUninstallFullPath If IsNull(strUninstallFullPath) Then ' wscript.echo "Uninstall path for app2 is null" Else WshShell.Run strUninstallFullPath,8,true End If Set WshShell = Nothing Set oReg = Nothing
|
|
| |
|
|
|
 |
RE: Run Maintenance on a PC through Script. - 9/27/2006 7:04:46 PM
|
|
 |
|
| |
gdewrance
Posts: 587
Score: 3
Joined: 3/16/2006
Status: offline
|
did you check the path in the registry that the uninstall key points to
|
|
| |
|
|
|
|
|