myITforum.com Community Forum myITforum.com Community Forum

Home  Forums  Blogs  Live Support chat  Search Articles  Wiki  FAQ  Email Lists  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

All Forums RSS Feed Subscription:


  


Script Running as Admin Fails

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
  Printable Version
All Forums >> [Management Products] >> System Center Products >> System Center Configuration Manager >> Script Running as Admin Fails Page: [1]
Login
Message << Older Topic   Newer Topic >>
Script Running as Admin Fails - 8/15/2008 5:24:17 PM   
nrunge

 

Posts: 56
Score: 0
Joined: 5/20/2008
Status: offline
I am deploying the OCS Client and an associated MSP. Here is the batch file.
msiexec.exe /i communicator.msi /passive transforms=communicator1.mst
msiexec.exe /update communicator.msp /qb

So I made a software package with the appropriate programs in it and created a program to run the script. I have the program set to run when a user is logged on with administrative rights. Users are not allowed to interact with the program.

When I log on with an account that has local admin rights the program downloads and executes fine. When I log in as a test user without admin rights the progress stops at 99% and just sits there. Execmgr logs do not indicate a failure but the software is clearly not running.

I then created two seperate programs for the software package. One that calls the msi and mst and a second that applies the MSP file. Both programs run with administrative rights as well. Next I made a task sequence that has both programs run one after the other. This method worked fine as a user without admin rights.

Why would that be the case? What is different about MSIEXEC being called directly from SCCM and MSIEXEC being called from within a shell by SCCM via the batch?

Lastly (and completely off topic) I experienced problems with the download pausing at a percentage complete and staying there. If I would cancel the download and start the task again it would go through, or possibly stop at a different percentage. Has anyone had that happen to them?
Post #: 1
RE: Script Running as Admin Fails - 8/15/2008 6:44:05 PM   
jnelson993


Posts: 925
Score: 127
Joined: 2/18/2005
From: Minneapolis, MN
Status: offline
My first guess would be it's because you're running this from a .bat file and you need to reference the path to the files properly. 
I wrote an article -->HERE<-- that might shed some light on things.

We also recently had a discussion-->HERE<-- that prompted me to write that aritcle.





_____________________________

Number2 (John Nelson)
MyITForum - Blog
MyITForum - Forum Posts

(in reply to nrunge)
Post #: 2
RE: Script Running as Admin Fails - 8/15/2008 6:53:00 PM   
jnelson993


Posts: 925
Score: 127
Joined: 2/18/2005
From: Minneapolis, MN
Status: offline
Actually, after re-reading your post, this is likely NOT the problem...but it's good information to know anyway :)


_____________________________

Number2 (John Nelson)
MyITForum - Blog
MyITForum - Forum Posts

(in reply to jnelson993)
Post #: 3
RE: Script Running as Admin Fails - 8/15/2008 8:34:05 PM   
nrunge

 

Posts: 56
Score: 0
Joined: 5/20/2008
Status: offline
I can run the batch file from the UNC path while I am logged in as a user with admin. I can paste the contents into a DOS prompt and run it as well. There seems to be something different about how the SCCM Administrator runs batch files.

By the way. When I choose "run as administrator" what account is actually running that? Can it be specified?

(in reply to jnelson993)
Post #: 4
RE: Script Running as Admin Fails - 8/16/2008 11:30:04 AM   
skissinger


Posts: 2168
Score: 135
Joined: 9/13/2001
From: Sherry Kissinger
Status: offline
"SYSTEM" is the run as administrator account.  Here's the two ways I figure out what it wants:

1) add /l*v c:\whatever.log to the installation line.  Monitor the log during installation, and you should see what it's blocked at.

2) Takes longer to explain, but it's sometimes easier to see what's wrong instead of reading the log file...
- outside of ConfigMgr completely...
- at an XP workstation, cmd prompt:    at 1-minute-into-the-future /interactive "cmd.exe".  for example, if it's 2:15pm now, type in   at 14:16 /interactive "cmd.exe"
- at 2:16, you'll get a cmd prompt running in SYSTEM context... just like Configmgr would use (check TaskMgr, you'll see).
- From that cmd prompt, run your installation line, without the quiet switches. 
- You should see the error interactively now; and hopefully can remediate the problem.

As an out-of-the-blue possibility... I'm guessing you might need ALLUSERS=1 or ALLUSERS=2 on your installation line.  Try it & see.

< Message edited by skissinger -- 8/16/2008 11:31:02 AM >


_____________________________

mofmaster@smsexpert.com (version 2007) | http://www.smsexpert.com | http://www.sccmexpert.com
My Blog
Microsoft MVP - ConfigMgr

(in reply to nrunge)
Post #: 5
RE: Script Running as Admin Fails - 8/16/2008 11:31:48 AM   
nrunge

 

Posts: 56
Score: 0
Joined: 5/20/2008
Status: offline
What does ALLUSERS do?

(in reply to skissinger)
Post #: 6
RE: Script Running as Admin Fails - 8/17/2008 5:49:02 AM   
skissinger


Posts: 2168
Score: 135
Joined: 9/13/2001
From: Sherry Kissinger
Status: offline
ALLUSERS=1 means a per-machine install is attemped; if admin rights to an object (registry, files) cannot be obtained by the machine, the install will fail.
ALLUSER=2 means a per-machine install is attempted; if admin rights to an object (registry, files) cannot be obtained by the machine, the install will attempt to install per-user.

Personally, I like ALLUSERS=1 because depending upon how a vendor created their MSI, if it's a per-user install, the history of that install will be kept in a different area of WMI, so you literally cannot see it correctly using ConfigMgr's hardware inventory.  There are occasions where the vendor's install forces me to use ALLUSERS=2, because they've built custom actions, etc., that I simply cannot get around using a transform. 

_____________________________

mofmaster@smsexpert.com (version 2007) | http://www.smsexpert.com | http://www.sccmexpert.com
My Blog
Microsoft MVP - ConfigMgr

(in reply to nrunge)
Post #: 7
RE: Script Running as Admin Fails - 8/17/2008 3:08:10 PM   
nrunge

 

Posts: 56
Score: 0
Joined: 5/20/2008
Status: offline
Thanks for the info. I was able to finally get it working by chaning my msiexec switches a bit and assigning the batch file to run with a drive letter.

However I was unaware of the ALLUSERS directive. Is that an msiexec thing? If so does ALLUSERS also mean that registry information for the install will be placed in the default users profile?

(in reply to nrunge)
Post #: 8
RE: Script Running as Admin Fails - 8/17/2008 7:53:09 PM   
skissinger


Posts: 2168
Score: 135
Joined: 9/13/2001
From: Sherry Kissinger
Status: offline
ALLUSERS= is a standard command line switch available to msiexec installations, like REBOOT=ReallySuppress for example.

Unfortunately, there are no guarantees, even with ALLUSERS= switches.  It depends how the vendor coded their install.  But "in general" I find better success over the long term using the ALLUSERS=1 switch.  Just my opinion, your mileage may vary, <insert any other standard disclaimer here>, etc. etc.  :-)

_____________________________

mofmaster@smsexpert.com (version 2007) | http://www.smsexpert.com | http://www.sccmexpert.com
My Blog
Microsoft MVP - ConfigMgr

(in reply to nrunge)
Post #: 9
Page:   [1]
All Forums >> [Management Products] >> System Center Products >> System Center Configuration Manager >> Script Running as Admin Fails Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts



  
Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.500