NINite Integration, vbs script,copy file from server and replace existing

Answered NINite Integration, vbs script,copy file from server and replace existing

  • Wednesday, November 14, 2012 5:56 PM
     
     

    How would I go about integrating NINite with the deployment of Windows 7?  Thank goodness my boss gave me the go ahead, this will make my life a lot easier.

    The ninite one application is hosted on S:\NINite\PRO8-1-2012\NiniteOne.exe - I am aware of all the switches for the install S:\NINite\PRO8-1-2012\NiniteOne.exe /cachepath S:\NINite\Cache /silent S:\NINite\Windows7\RTreport-%date:~10,4%-%date:~4,2%-%date:~7,2%.csv /select Chrome Flash "Flash (IE)" "Java x64 7" Malwarebytes VLC /disableshortcuts /allusers /disableautoupdate (I have a script that updates our cache every hour)

    Can I do this as a task sequence?  If so how/can you point me into the right direction? This will only be for new machines as we wipe and re-image when there are issues.  Also, we will never be copying data through a task sequence.

    How would I integrate a vbs script to run once on every new deployment?  Can this be done VIA right clicking on the Task Sequance OS install image>properties>task sequence>add>>general>run command line?  The script location and name \\deploymentshare\scripts\replacepinnedicons.vbs

    As some of you may know,  when you open VLC it asks for Privacy and Network Access Policy and I would like to take that out of the equation.  I have heard if I copy “AppData\Roaming\vlc\vlcrc “ to all users or default user iIt will replace the settings across the computer. do you guys know if this is true?  Would this be another script?  I need these to be the last items of the deployment.

    Thanks for any help

    the string reads cmd.exe /c \\SERVERNAME\install$\NINiteblahblahblah



    So I made a task sequence to call the script on our server and I used a domain admin account and I get the above picture.  Instead of using\\SERVERNAME\blah\Ninite.bat would it be any better to use the IP?  I mapped the drive using the same credentials and it worked :(


    • Edited by localuserguest Wednesday, November 14, 2012 10:39 PM
    • Edited by localuserguest Wednesday, November 14, 2012 10:43 PM added error after testing
    • Edited by localuserguest Wednesday, November 14, 2012 10:47 PM more details
    •  

All Replies

  • Thursday, November 15, 2012 3:28 AM
     
     

    mdt runs in local admin, try adding the net use command to your bat file, the command window will prompt for password during deployment, call all the files from one bat file. If you need examples lmk. I also set it up as an application and then add a single app to the TS.



    • Edited by tiptronic13 Thursday, November 15, 2012 3:30 AM
    •  
  • Thursday, November 15, 2012 1:21 PM
     
     
    Even if I tell it to run as a different user inside the task sequence?
  • Thursday, November 15, 2012 8:47 PM
     
     

    So here is what I have done.

    I have changed the task sequence to look like this:



    I have added a net use command to before the ninite script so it now looks like this:

    net use I: \\itshares\install$ /u:crec\scollins PASSWORD /P:N

    \\itshares\install$\NINite\PRO8-1-2012\NiniteOne.exe /cachepath \\itshares\install$\NINite\Cache /select Chrome Flash "Flash (IE)" "Java 7" Malwarebytes VLC /allusers /disableshortcuts /disableautoupdate

    I am 100% sure the script runs with my credentials.  I can map to the that bat file and run it with no problems.  But I get this error:



    I am getting irritated because I keep reading oh its so simple but obviously I am doing something wrong.

  • Thursday, November 15, 2012 8:47 PM
     
     

    If you specify a user account during a task sequence step, that account will be used for that specific task.

    Whenever I need to execute a single command line from a task sequence and it fails, I tend to replace it temporary for something like this cmd.exe /c start /wait cmd.exe, this would open up a command prompt while pausing the task sequence and it's run as the user account that you've specified (you can verify this by executing whoami).

    Then from that command prompt, I'd execute the command line that fails in order to troubleshoot the error messages. If using a script that specifically uses exit commands, I would edit those out and replace them for pause commands so that when running the script from the command prompt, it does not exit your window and continue the task sequence without giving you a chance to read what happened.

    Also another tip; you can always append [>> c:\minint\smsosd\osdlogs\mycustomscript.log] to the command you're executing from the task sequence in order to output your batch file to a log file (I use this path so it's in the same folder as the regular mdt logs) make sure not to use @ECHO OFF though, since you want to capture all the output :).

    Kind regards

    Stephan Schwarz


    If one of these posts answered your question or issue, please click on "Mark as answer".

    My Blog | Twitter: @Schwarz_Stephan | MCTS, MCITP, MCSA, MCC-2011.
    How to configure Windows RE/OEM Recovery Partition with MDT
    How to configure Windows RE/OEM Recovery Partition with MDT 2012 Update 1


  • Thursday, November 15, 2012 10:41 PM
     
     
    1st line - So why didn't it lol

    So instead of start "" cmd.exe /c "%SCRIPTROOT%\blah you would replace that string with cmd.exe /c start /wait cmd.exe - Am I correct?

    Also what does "Load the users's profile" do - Does it run it as the account provided.  And do I need to completely regenerate the deployment share when I add TS's?

    Thank you for your help.  


  • Thursday, November 15, 2012 11:12 PM
     
     

    Yes, use that command line for testing purposes.

    I can't really explain what the "load the user's profile" option does. At least not in a simple sentence, in your case you'll also need to turn this option on.

    Kind regards,

    Stephan Schwarz


    If one of these posts answered your question or issue, please click on "Mark as answer".

    My Blog | Twitter: @Schwarz_Stephan | MCTS, MCITP, MCSA, MCC-2011.
    How to configure Windows RE/OEM Recovery Partition with MDT
    How to configure Windows RE/OEM Recovery Partition with MDT 2012 Update 1

  • Friday, November 16, 2012 5:13 PM
     
     

    I'm thinking this is a permission issue.  Also I should have stated this computer is NOT joining the domain.  I am going to continue to look into this but I think I am heading in the right direction.

    Earlier I chose to run cmd.exe /c start /wait cmd.exe with my creds but that still said bad password.  I unchecked the box and the command prompt came right up.  Now I am wondering if the computer will read 

    start "ninite" cmd.exe /c "%SCRIPTROOT%\NINiteWindows7.bat"

    time will tell.

    ____________________

    The above failed.  Is it smart to have this almost last on the list?  

  • Saturday, November 17, 2012 10:54 PM
     
     Answered
    So I figured this out:  I just put what I have in my batch file in the command line:

    \\srv\NINite\PRO8-1-2012\NiniteOne.exe /cachepath \\srv\NINite\Cache /select Chrome Flash "Flash (IE)" "Java x64 7" Malwarebytes VLC /disableshortcuts /allusers /disableautoupdate

    This worked in my test environment so we will see how it goes in production.  I wish I would have thought about this earlier and not over thinking it.

    Now I have to figure out if I can restart the machine and log back in as the admin account
    • Marked As Answer by localuserguest Saturday, November 17, 2012 10:54 PM
    •