Thank U.
Can this be changed as a startup script. if not present install else omit
And where all should i make the changes
Main Topics
Browse All TopicsHi,
On startup check if a Mspatch is there else install it according to the OS.
If os xp a different patch if Win 2003 then different if t then diff if Vista then diff if Win 2008 then another
If installed then log the time and date of the installation and the machine name to a log file in the UNC.
This installation should be 10% silent on the user end.
Can anyone help with a login script please
regards
Sharath
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Thank U Rob just checking ...I need help on these can you please have a look... If possible....
http://www.experts-exchang
http://www.experts-exchang
If you don't want to restart the system after installing the patch use following syntax for MSU, MSI, or MSP
<name>.<ext> /quiet /norestart
Or you can get detail information about silent switches on following location
http://unattended.sourcefo
Thanks
That's correct, this section:
If LCase(Right(strCorrectPath
intReturnCode = objShell.Run("cmd /c """ & strCorrectPatch & """ -q -f", 0, True)
ElseIf LCase(Right(strCorrectPath
intReturnCode = objShell.Run("cmd /c """ & strCorrectPatch & """ /quiet /forcerestart", 0, True)
End If
can be changed to this
If LCase(Right(strCorrectPath
intReturnCode = objShell.Run("cmd /c """ & strCorrectPatch & """ -q", 0, True)
ElseIf LCase(Right(strCorrectPath
intReturnCode = objShell.Run("cmd /c """ & strCorrectPatch & """ /quiet /norestart", 0, True)
End If
where I've removed the /f for EXEs and change /forcerestart to /norestart for the others.
Regards,
Rob.
Thank U..Checking on this...
Rob any help on these
http://www.experts-exchang
http://www.experts-exchang
Rob i just tested on a win 2003 machine. First i tried installing on a machine where the patch was available. I got its available. Then removed it restarted the machine and tried and i got this message
\\indphos\InterChk\Ms_Patc
Installing patch \\indphos\InterChk\Ms_Patc
Installation successful on DEVCS161
But cannot see in Add/Remove programs
How many ever times i run i get as its installing and its installed successful
OK, try this.
Note that the patch paths given by
' Request W2k client patch file.
strPatchW2k = "\\server\share\Win2K_Patc
' Request XP client patch file.
strPatchXP = "\\server\share\WinXP_Patc
' Request W2k3 client patch file.
strPatchW2k3 = "\\server\share\Win2K3_Pat
' Request Vista client patch file.
strPatchVista = "\\server\share\WinVista_P
' Request Win2008 client patch file.
strPatchWin2008 = "\\server\share\Win2008_Pa
' Request Windows 7 client patch file.
strPatchWindows7 = "\\server\share\Windows7_P
should *not* include any switches. The switches are automatically appended later. The paths above should be only the file path.
Regards,
Rob.
Oh, would that be because of UAC? If you disable UAC, does that help?
If UAC is the problem, we may need to try using the Elevate powertoy to run the install. Do you already have that downloaded?
Set strElevatePowerToy = "<file>" to suit where you have Elevate.exe and see if this works for Vista.
Regards,
Rob.
You can download it here:
Elevate powertool for Windows vista
http://www.microsoft.com/t
Install it onto one machine, and you should then be able to copy the Elevate.exe file to a network share.
Regards,
Rob.
I downloaded the exe from here and changed the paths accordingly
http://www.wintellect.com/
Still get the failed message
I get this
C:\Program Files\Sophos Sweep for NT\Mspatch>Elevate.exe
Elevate 4.0.10326.0
(c) 2007 - John Robbins - www.wintellect.com
Execute a process on the command line with elevated rights on Vista
Usage: Elevate [-?|-wait|-k] prog [args]
-? - Shows this help
-wait - Waits until prog terminates
-k - Starts the the %comspec% environment variable value and
executes prog in it (CMD.EXE, 4NT.EXE, etc.)
prog - The program to execute
args - Optional command line arguments to prog
Note that because the way ShellExecute works, Elevate cannot set the
current directory for prog. Consequently, relative paths as args will
probably not work.
In the Elevation folder that is created after downloading the file from here:
http://technet.microsoft.c
there is an Elevate.vbs and and Elevate.cmd file.
Copy both of those to the network folder, and change
strElevatePowertoy = "\\server\share\elevate.ex
to this
strElevatePowertoy = "\\server\share\elevate.cm
Regards,
Rob.
OK, so MSU files use wusa.exe, not msiexec.exe - I learn something new every day.
http://support.microsoft.c
And it works for Vista and Server 2008. Therefore, hopefully this works.
If the code doesn't work, the command it is running is
\\server\share\elevate.cmd
so try that and let me know what you get if the code doesn't work.
Regards,
Rob.
When i try the whole statement
I get an error encountered..
--------------------------
Windows Update Standalone Installer
--------------------------
Installer encountered an error: 0x80070002
The system cannot find the file specified.
--------------------------
OK
--------------------------
When i select just this
\\hos\InterChk\Mspatch\ele
I get this
--------------------------
Windows Script Host
--------------------------
Elevate - Elevation Command Line Tool for Windows Vista
Purpose:
--------
To launch applications that prompt for elevation (i.e. Run as Administrator)
from the command line, a script, or the Run box.
Usage:
elevate application <arguments>
Sample usage:
elevate notepad "C:\Windows\win.ini"
elevate cmd /k cd "C:\Program Files"
elevate powershell -NoExit -Command Set-Location 'C:\Windows'
Usage with scripts: When using the elevate command with scripts such as
Windows Script Host or Windows PowerShell scripts, you should specify
the script host executable (i.e., wscript, cscript, powershell) as the
application.
Sample usage with scripts:
elevate wscript "C:\windows\system32\slmgr
elevate powershell -NoExit -Command & 'C:\Temp\Test.ps1'
The elevate command consists of the following files:
elevate.cmd
elevate.vbs
--------------------------
OK
--------------------------
Checking on this Rob...I think some install problem.
Can you help on this
http://www.experts-exchang
Rob i did some testing and have come to this conclusion
When there is a Patch already installed and i try this command
wusa "\\t-dsm\logs\Mspatch\Wind
I get this
--------------------------
Windows Update Standalone Installer
--------------------------
The update does not apply to your system
--------------------------
OK
--------------------------
And the startup shows
11/3/2009 2:25:32 PM: DS050 - Installing patch \\t-dsm\logs\Mspatch\Windo
11/3/2009 2:25:33 PM: DS050 - Installation failed
The whole above senario is when there is a patch installed and it tries. So for such cases it needs to record the log as. Already available.
When i run this when there is no patch it properly installs
wusa "\\t-dsm\logs\Mspatch\Wind
Sharath, we just built a Windows 7 machine, so I grabbed it for a quick test. I was able to run this:
\\server\share\elevate.cmd
and it started, although I did get "The update does not apply to your system".
But that's OK, because at least we know the install started. Vista should be the same. I'm also guessing that Server 2008 has the same behaviour as well. So, see if this works.
Also a reminder, make sure you change strPatchNumber to the number of the patch that would be found in Add / Remove Programs if it was installed (usually just the KB number).
Regards,
Rob.
Thanks Rob shall check and get back.
If time permits can you help please
http://www.experts-exchang
http://www.experts-exchang
http://www.experts-exchang
http://www.experts-exchang
Yeah, there's a few....If you had a WSUS server, you could just use that to push it out....
Following instructions here (SP2 deployment has not changed for SP3):
http://technet.micros
You would first run
XPsp3.exe / X:C:\ExtractedSP3
to extact the service pack. Then copy it to a network location.
Then, at StartUp, you would run
\\server\share\SP3\XPSp
Bare in mine the SP3 install takes AGES!
Regards,
Rob.
Probably best just to use
psexec -accepteula -u domain\administrator -p password -e \\@RemotePCs.txt cmd /c \\server\share\SP3\XPSP3.e
where you specify @RemotePCs.txt for a list of computer names.
Then, for monitoring, run the Microsoft Baseline Security Analyzer (MBSA) to see which computers do not have SP3 installed.
Regards,
Rob.
Hi Rob
need to run this patch. its a Msi and has accept etc screens while i do it manually
http://support.microsoft.c
Will this script work in this case?
It certainly should. The script automatically adds these switches:
/quiet /norestart /li+ <logfile>
for MSI files, so it should install silently. If you test this command manually on a machine, and it works, the script should work as well:
msiexec /i "\\server\share\YourPatch.
Regards,
Rob.
Thanks Rob
can i install this patch with this script?
http://support.microsoft.c
http://www.microsoft.com/d
Also can i use this for Sql Sp3?
if no can you give me something that can do this as well
As the above patch prequesite is Sp3
It should if you change this
to this
You might need to add INSTANCENAME, BLANKSAPWD=1, or SAPWD arguments to specify your database instance and SA Password, but I'm not sure.
You might like to try it manually from a DOS prompt using
SQL2000-KB815495-8.00.0818
and also add BLANKSAPWD=1 *or* SAPWD=<yoursapwd> depending on whether you have one or not.
Then, if that works, add those arguments to the strCommand above. If your instance is always your server name, then try something like:
strCommand = """" & strCorrectPatch & """ /s /a /q INSTANCENAME=" & strComputer &" SAPWD=YourSAPWD"
Regards,
Rob.
Thanks Rob
Isn't this patch for SQL on whole itself
SQL2000-KB815495-8.00.0818
Then why should we mention password and instance etc?
For this patch should i make the above 2 snippet changes?
http://support.microsoft.c
I don't know why it has the password and instance names, but they are listed on that page as parameters to the EXE. I'm not sure if they're required. You could just try installing without those parameters and see what happens.
If you want to try it without those parameters, then just change snippet 1 to the code in snippet 2 in my post above, and see what it does.
Rob.
--------------------------
SQL2000-KB815495-8.00.0818
--------------------------
The application failed to initialize properly (0xc0000022). Click on OK to terminate the application.
--------------------------
OK
--------------------------
I get above error
Log has this
11/10/2011 3:45:10 PM: IN3434 - Installing patch \\IN3434\all\SQL2000-KB815
11/10/2011 3:45:11 PM: IN3434 - Started installation
11/10/2011 3:45:12 PM: IN3434 - Installation failed
Any help with this Rob
http://www.experts-exchang
Rob then whats the way for this exe
found something here
http://www.appdeploy.com/m
should we convert exe to msi and try or are there any other switches i can use
I get this popup Rob
Windows ® Installer. V 3.01.4000.3959
msiexec /Option <Required Parameter> [Optional Parameter]
Install Options
</package | /i> <Product.msi>
Installs or configures a product
/a <Product.msi>
Administrative install - Installs a product on the network
/j<u|m> <Product.msi> [/t <Transform List>] [/g <Language ID>]
Advertises a product - m to all users, u to current user
</uninstall | /x> <Product.msi | ProductCode>
Uninstalls the product
Display Options
/quiet
Quiet mode, no user interaction
/passive
Unattended mode - progress bar only
/q[n|b|r|f]
Sets user interface level
n - No UI
b - Basic UI
r - Reduced UI
f - Full UI (default)
/help
Help information
Restart Options
/norestart
Do not restart after the installation is complete
/promptrestart
Prompts the user for restart if necessary
/forcerestart
Always restart the computer after installation
Logging Options
/l[i|w|e|a|r|u|c|m|o|p|v|x
i - Status messages
w - Nonfatal warnings
e - All error messages
a - Start up of actions
r - Action-specific records
u - User requests
c - Initial UI parameters
m - Out-of-memory or fatal exit information
o - Out-of-disk-space messages
p - Terminal properties
v - Verbose output
x - Extra debugging information
+ - Append to existing log file
! - Flush each line to the log
* - Log all information, except for v and x options
/log <LogFile>
Equivalent of /l* <LogFile>
Update Options
/update <Update1.msp>[;Update2.msp
Applies update(s)
/uninstall <PatchCodeGuid>[;Update2.m
Remove update(s) for a product
Repair Options
/f[p|e|c|m|s|o|d|a|u|v] <Product.msi | ProductCode>
Repairs a product
p - only if file is missing
o - if file is missing or an older version is installed (default)
e - if file is missing or an equal or older version is installed
d - if file is missing or a different version is installed
c - if file is missing or checksum does not match the calculated value
a - forces all files to be reinstalled
u - all required user-specific registry entries (default)
m - all required computer-specific registry entries (default)
s - all existing shortcuts (default)
v - runs from source and recaches local package
Setting Public Properties
[PROPERTY=PropertyValue]
Consult the Windows ® Installer SDK for additional documentation on the
command line syntax.
Copyright © Microsoft Corporation. All rights reserved.
Portions of this software are based in part on the work of the Independent JPEG Group.
So if that works, it should work in the script just by changing the first snippet to the second snippet in comment ID 37110890.
Then, we could use code like that here:
http://www.experts-exchang
which splits your large computers.txt file into batches for the script to run. That script probably won't work as it is, but I can help rewrite that next week.
Rob.
Posted a new question. Please have a look
http://www.experts-exchang
Business Accounts
Answer for Membership
by: ram_keralaPosted on 2009-10-18 at 09:23:10ID: 25600345
Following link is an advanced way of installing hotfixes based on OS SP Level and version
atchInstal l.htm
Please let me know if you have queries in script, i will be able to assist you
http://www.rlmueller.net/P