Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

runas local admin on client PC to install software with VBS

Status
Not open for further replies.

mbunixadm

IS-IT--Management
Dec 11, 2008
3
US
Hello.

I wrote a Visual Basic script to install our SMS Client to client machines, but found out that the only way it works is if the user logged in is a System Administrator and runs the script manually.

I want to be able to run the script as the local admin account on the machine from the VB Script so I can push the client via AD.

We can't use the Push from SMS becuase it will push the wrong client. Any pointers?
 
If you have the .msi file of the SMS Client install, why not use Group Policy to push it out instead of the script?

Or, again via Group Policy, set the install VB script as the computer's Startup Script (which I believe will run under the context of the System account).

JJ
[small][purple]Variables won't. Constants aren't[/purple]
There is no apostrophe in the plural of PC (or PST, or CPU, or HDD, or FDD, and so on)[/small]
 
We tried to push the msi file, but the error logs kept saying that the client.msi file was being called by a process not ccmsetup.exe and wouldn't install.

Also, we tried setting it up as a computer startup script, and it didn't install that way either. The only way we have been able to get this stupid hybrid client to install was logging in as either the local administrator or as a domain admin and installing it either from the script or command line.
 
Set up a GPO to run the script as a "startup script". When the machine reboots, it will apply the needed software under the credentials of system account, which is an administrator of the machine. I recommend placing your SMS installation package in the sysvol of your DC so that systems can pull a copy from the local DC instead of over the WAN. (think: \\mydomain.tld\SYSVOL\mydomain.tld\SCRIPTS\...)

Good Luck!

PSC

Governments and corporations need people like you and me. We are samurai. The keyboard cowboys. And all those other people out there who have no idea what's going on are the cattle. Mooo! --Mr. The Plague, from the movie "Hackers
 
The application uses BITS to transfer the files across port 80. So would I have to share out my sysvol\domain.sub\scripts directory with webshareing and ensure that bits is installed?
 
No. Install package will execute directly from the CIFS share.

PSC

Governments and corporations need people like you and me. We are samurai. The keyboard cowboys. And all those other people out there who have no idea what's going on are the cattle. Mooo! --Mr. The Plague, from the movie "Hackers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top