/bundles/itninjaweb/img/Breadcrumb_cap_w.png
I have a command to add the currently logged on user to the Local Administrator's group using a bacth file.

the command I am using is NET LOCALGORUP ADMINISTRATORS %USERNAME% /add which works fine when I run on the local system. However once it gets into SMS, the application fails to execute despite running with Administrative Priv. I have also attempted to execute it with the Windows NT Client Software Installation account all to no avail.

Please does any1 know how to get around such problems in SMS.
0 Comments   [ - ] Hide Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity

Answers

0
Yeah it's definately going to fail if it's using the service account to install software.

I dunno if this wold work:
' -Start
' Get Currently Logged-On User details
Set sysinfo = CreateObject("ADSystemInfo")
Set oUser = GetObject("LDAP://" & sysinfo.UserName & "")
msgbox sysinfo.username
msgbox oUser.telephonenumber
wscript.quit
' -End

Or maybe this?

http://cwashington.netreach.net/depo/view.asp?Index=750&ScriptType=rexx

Honestly I'm guessing here so maybe someone else can help out better than me.
Answered 10/08/2004 by: kkaminsk
Ninth Degree Black Belt

Please log in to comment
0
Many thanks. I've been waiting here all day for someone to reply.
This package has been on my desk for 3 weeks and I've decided to install whilst upgrading user accounts to Local Administrator.

Which other account can I run it with? I am running as an Administrator from the SMS Console.
Answered 10/08/2004 by: oofemioo
Blue Belt

Please log in to comment
0
The script displays the currently logged on user fullnames, OU & DC.
Is there any other script I can use to add the user to the Local Admin Group?

Cheers
Answered 10/08/2004 by: oofemioo
Blue Belt

Please log in to comment
0
Ok, I needed some coffee and a good meal to get the ol brain fired up. I looked at VBScript and I don't think there is a straight forward way to do it. The easiest way I think you can find it out is check the HKLM\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AltDefaultUserName value. Then you can use that to batch file or vbscript. Otherwise there might be a way to do it in WMI but it'll likely be more painful.
Answered 10/08/2004 by: kkaminsk
Ninth Degree Black Belt

Please log in to comment
0
Does any1 know Windows commands that cant be used in batch files when deploying via SMS.

I ve noticed commands such as NET LOCALGROUP not working when deployed via SMS 2.0.

Is there any official documentation or information on this?

Many thanks.
Answered 10/25/2004 by: oofemioo
Blue Belt

Please log in to comment
0
Although I dont need this solution on my current project. I was faced with the dilemma whilst deploying some batch files with SMS.

Does any1 know how to solve such problem?
Answered 11/06/2004 by: oofemioo
Blue Belt

Please log in to comment