Problem Problem deploying msi via login script

Discussion in 'Scripting & Programming' started by Arroryn, May 1, 2011.

  1. Arroryn

    Arroryn we're all dooooooomed Moderator

    4,015
    193
    209
    Hi guys. Long time no see, and as per tradition, if I do post a problem it's usually something I've almost torn all my hair out over.

    I have a batch file which copies and registers a bunch of files and dlls for a piece of bespoke software we have internally. This batch file works like a charm, but there are clusters of PCs everywhere that have an older software version which, if I run my batch file on their PCs, they get runtime errors all over the shot. Basically, I need to run 3 MSI files if the software version is older.

    That in and of itself isn't an issue (I'll just add in msiexec to the script) but the problem is permissions - the user's don't have it, and this script *must* run at login, and *must* run as the user.

    So... I recall somewhere once, I have definitely seen a way of artificially elevating user permissions to administrator, which would enable them to run the msi, then you alter the registry back to normal when done. I've been Googling for an hour now and can't find a thing. Can anyone help please? If you've understood this lol. Let me know if I need to explain it more clearly!
     
    Certifications: A+, N+, MCDST, 70-410, 70-411
    WIP: Modern Languages BA
  2. MLP

    MLP Kilobyte Poster

    305
    19
    59
    Hi Arroyn,

    Would setting the user as local administrator using Restricted Groups in group policy help?

    Maria
     
    Certifications: HND Computing
  3. Arroryn

    Arroryn we're all dooooooomed Moderator

    4,015
    193
    209
    Hi Maria

    It would in an ideal world, but my boss won't use group policy, hence finding an alternative method for the install too.
     
    Certifications: A+, N+, MCDST, 70-410, 70-411
    WIP: Modern Languages BA
  4. MLP

    MLP Kilobyte Poster

    305
    19
    59
    No group policy? How do you cope with that?

    Anyway, I have no idea if this is any use - I haven't tried to use it before myself, but maybe:

    Code:
    NET localgroup Administrators /add "domain_name\domain_group"
    in your batch script.

    Best of luck with it.

    Maria
     
    Certifications: HND Computing
  5. Arroryn

    Arroryn we're all dooooooomed Moderator

    4,015
    193
    209
    Thanks Maria, will give it a blast in the morning and let you know :)
     
    Certifications: A+, N+, MCDST, 70-410, 70-411
    WIP: Modern Languages BA
  6. kevicho

    kevicho Gigabyte Poster

    1,219
    58
    116
    Could you try using the runas command??

    We cheated at our place and used a vbscript to put in the password for this.

    Ill mail you the script if i can get access to it
     
    Certifications: A+, Net+, MCSA Server 2003, 2008, Windows XP & 7 , ITIL V3 Foundation
    WIP: CCNA Renewal
  7. Arroryn

    Arroryn we're all dooooooomed Moderator

    4,015
    193
    209
    I get an access denied message for that unfortunately Maria.

    Kev - anything you could help with would be amazing thanks!
     
    Certifications: A+, N+, MCDST, 70-410, 70-411
    WIP: Modern Languages BA
  8. Sparky
    Highly Decorated Member Award 500 Likes Award

    Sparky Zettabyte Poster Moderator

    10,718
    543
    364
    I take it the script does not execute properly if you assign it to the machine rather than a user?
     
    Certifications: MSc MCSE MCSA:M MCSA:S MCITP:EA MCTS(x5) MS-900 AZ-900 Security+ Network+ A+
    WIP: Microsoft Certs
  9. crazy horse

    crazy horse Byte Poster

    199
    15
    24
    Last edited: May 1, 2011
  10. kevicho

    kevicho Gigabyte Poster

    1,219
    58
    116
    ok, its a bit cheating this but for one app there was one component which wouldnt deploy after trying most things we ended up doing something similar as follows

    Basically you are getting the script to type out into a command prompt, (when you open the command prompt you can use start /min it may be worth trying to incorporate this, but i couldnt get that to work, but it wasnt really necessary as this is used in an MDT deployment)

    Good luck
     
    Certifications: A+, Net+, MCSA Server 2003, 2008, Windows XP & 7 , ITIL V3 Foundation
    WIP: CCNA Renewal
  11. Arroryn

    Arroryn we're all dooooooomed Moderator

    4,015
    193
    209
    Thanks for the help and advice all. In again now, so will let you know how I get on!
     
    Certifications: A+, N+, MCDST, 70-410, 70-411
    WIP: Modern Languages BA

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.