Runas Question

Discussion in 'Scripting & Programming' started by Nelix, Feb 8, 2007.

  1. Nelix
    Honorary Member

    Nelix Gigabyte Poster

    1,416
    3
    82
    Hi All

    I have a requirement to replace a .bmp file on everymachine on the network to be used as the wallpaper. I only want to overwrite the current file.

    I have added a "copy" statement to the end of the login script to do this however the users only have read access to the C:\WINDOWS folder, I know that Runas would work BUT when you use Runas you need to input the password when prompted, can anyone think of an easy way to do replace this file?

    Thanks

    Nelix
     
    Certifications: A+, 70-210, 70-290, 70-291, 74-409, 70-410, 70-411, 70-337, 70-347
    WIP: 70-346
  2. Phoenix
    Honorary Member

    Phoenix 53656e696f7220 4d6f64

    5,749
    200
    246
    you could write a script that copys a file to a machine then loops back and does it again for the next (reads the a text file for a list of pcs)

    not entirely sure if thats the easiest way to do it or not :)
     
    Certifications: MCSE, MCITP, VCP
    WIP: > 0
  3. Fergal1982

    Fergal1982 Petabyte Poster

    4,196
    172
    211
    wouldnt group policy take care of this? i dont know how you'd manage it since i dont know group policy though.
     
    Certifications: ITIL Foundation; MCTS: Visual Studio Team Foundation Server 2010, Administration
    WIP: None at present
  4. Nelix
    Honorary Member

    Nelix Gigabyte Poster

    1,416
    3
    82
    Yeah, you can specify and enforce the wallpaper using group policy, however I dont want to do this, I just want to overwrite the .bmp file on each machine.
     
    Certifications: A+, 70-210, 70-290, 70-291, 74-409, 70-410, 70-411, 70-337, 70-347
    WIP: 70-346
  5. Fergal1982

    Fergal1982 Petabyte Poster

    4,196
    172
    211
    I still think GPO can help here. In the GPO editor, if you go into Computer Configuration>>Windows Setting>>Scripts - theres the settings for logon scripts. you can attach your vbscript to replace the file in here and it 'should' run outwith the users credentials, meaning that you dont have to bother with runas at all.

    That said, I havent tried this myself, so im not 100% sure it would work. you might need to fiddle around with it a bit.
     
    Certifications: ITIL Foundation; MCTS: Visual Studio Team Foundation Server 2010, Administration
    WIP: None at present
  6. Baba O'Riley

    Baba O'Riley Gigabyte Poster

    1,760
    23
    99
    I don't know if this will help or not in this situation, but the runas command has a \savecred switch which will save the password for you.
     
    Certifications: A+, Network+
    WIP: 70-270
  7. Boycie
    Honorary Member

    Boycie Senior Beer Tester

    6,281
    85
    174
    Nelix,

    I guess I don't understand what you are doing here. :oops:

    You say you want to change the wallpaper - cant you just alter the UNC to the new .bmp?

    Si
     
    Certifications: MCSA 2003, MCDST, A+, N+, CTT+, MCT

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.