Software Installation using Group Policy

  • Thread starter Thread starter raghu
  • Start date Start date
R

raghu

Hi,

I know how to install a software using group policy with the help of
gpedit.But I have to know the way to do it via C++ or scripting.
Thanks raghu
 
I think this might do it:


Install Software on a Remote Computer



Description
Installs a hypothetical software program (using a Windows Installer package)
on a remote computer. Requires delegation for the computer and user accounts
involved in the procedure.



Supported Platforms

Windows Server 2003
Yes

Windows XP
Yes

Windows 2000
Yes

Windows NT 4.0
Yes

Windows 98
Yes




Script Code

Const wbemImpersonationLevelDelegate = 4

Set objWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objConnection = objwbemLocator.ConnectServer _
("WebServer", "root\cimv2", "fabrikam\administrator", _
"password", , "kerberos:WebServer")
objConnection.Security_.ImpersonationLevel = wbemImpersonationLevelDelegate

Set objSoftware = objConnection.Get("Win32_Product")
errReturn = objSoftware.Install("\\atl-dc-02\scripts\1561_lab.msi",,True)
 
Back
Top