UserOnline

, 5 Guests, 4 Bots

Archives

Print This Post Print This Post

Group Policy update on a remote machine

I’m over in Korea and we are working on systems that are scattered all through 7 different buildings.  It is only a few hundred machines but pushing out Group Policy updates is a pain with them scattered all over.  So This little script will send out a update using the gpupdate command.  We don’t have any of the fancy software that will do this for you either.  So this is what we did.

This assumes you are running a domain so you have admin privilege on all workstations.  First you will need a list of your machine names, we call it a nodelist.  You will also have to go to Sysinternals and get the free PsExec tool.  PsExec allows you to connect remotely to the workstations through a command line terminal.  The psexec.exe has to be in the same folder as the batch file.  Finally you just build you batch file.  Here is what I did.

@echo off

echo ************************************************

echo           GPUPDATE ON REMOTE HOSTS

echo ************************************************

echo.

echo.

echo.

echo.

echo.

echo  This will update the GPO on all machines in the nodelist and reboot them

echo  writing the node info to the logfile.txt

pause

For /f %%n IN (nodelist.txt) DO echo *********************************************** >> logfile.txt && echo  %%n >> logfile.txt && echo ************************************* >> logfile.txt && psexec.exe \\%%n -d gpupdate /force /boot >> logfile.txt

cls

echo Process is complete.  Check the logfile for errors

pause

This will write the workstation name and the output from the process with a complete status to the logfile.  I like to add in menus to my scripts so you can get ride of all of of it and just run the for statement.  we ran this on 217 machines several times to push printers and other policies to the workstations now instead of waiting.  Plus the way we do printers requires the machines to reboot after an update.

Test it out and see if it can work for you.  I like psexec and it is a handy tool for executing batch file and commands on remote hosts.  I just put this out there because when you are looking for easier ways to do this, they can be hard to find.  Goodluck.

Print This Post Print This Post

Installing printers using Prnmngr.vbs

 

I recently ran into a problem with the need to install network printers on quit a few non domain computers.  Then the need to stream line this process and make it easier for everyone to do I went back to using the printer vbscripts that were part of XP.  For the people that have never used Prnmngr.vbs and the other scripts that are part of the package, they do a really good job of install drivers, creating printers, and deleting the same printers.  The files needed are part Windows XP in the c:\Windows\System32 directory.

File list:

  1. Prnmngr.vbs
  2. Prnjobs.vbs
  3. Prndrvr.vbs
  4. Prnport.vbs
  5. Prncnfg.vbs
  6. Prnqctl.vbs

So with these files I pulled out a script I had written a few years ago and put it to use.  The biggest problem is getting the right drivers for the printer, not just one but this script was to have all of the printers that we would possibly install on these computers.  So after some modification and playing around this is what I came up with.  A simple menu based batch file that can be used to install printers.  Here is what it looks like.

@echo off
cls
echo =======================================================================
echo                                                                    PRINTER INSTALLATION
ECHO =======================================================================
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
set /p _ip=Enter printer IP:
cls
echo =======================================================================
echo                                                                     SELECT PRINTER TYPE
ECHO =======================================================================
echo.
echo.
echo.
echo              1.  Dell 1720.
echo              2.  Phaser 3600.
echo              3.  HP 4600
echo              4.  HP 2055
echo.
echo              x.  Exit
echo.
set /p _sel=Enter number:
if “%_sel%” == “1” call goto d1720
if “%_sel%” == “2” call goto Phaser
if “%_sel%” == “3” call goto hp4600
if “%_sel%” == “4” call goto hp2055
if “%_sel%’ == “x” call goto en
exit
: d1720
cscript Prndrvr.vbs -a -m “Dell Laser Printer 1720” -v 3 -e “Windows NT x86” -i “%CD%”\dell1720\DKABJ740.inf
cscript prnport.vbs -a -r IP_”%_ip%” -h “%_ip%” -o RAW -n 9100
cscript prnmngr.vbs -a -p “Dell 1720” -m “Dell Laser Printer 1720″ -r IP_”%_ip%”
pause
cscript prnmngr.vbs -t -p “Dell 1720”
exit
: Phaser
cscript Prndrvr.vbs -a -m “Xerox Phaser 3600 PCL 6” -v 3 -e “Windows NT x86” -i “%CD%”\phaser3600\sxk2m.inf
cscript prnport.vbs -a -r IP_”%_ip%” -h “%_ip%” -o RAW -n 9100
cscript prnmngr.vbs -a -p “Phaser 3600” -m “Xerox Phaser 3600 PCL 6″ -r IP_”%_ip%”
pause
cscript prnmngr.vbs -t -p “Phaser 3600”
exit
:hp4600
cscript Prndrvr.vbs -a -m “HP Color LaserJet 4600 PCL 5c” -v 3 -e “Windows NT x86” -i “%CD%”\hp4600\PCL5c\hp4600p5.inf
cscript prnport.vbs -a -r IP_”%_ip%” -h “%_ip%” -o RAW -n 9100
cscript prnmngr.vbs -a -p “HP Laserjet 4600” -m “HP Color LaserJet 4600 PCL 5c” -r IP_”%_ip%”
pause
cscript prnmngr.vbs -t -p “HP Laserjet 4600”
exit
:hp2055
cscript Prndrvr.vbs -a -m “HP LaserJet P2050 Series PCL6” -v 3 -e “Windows NT x86” -i “%CD%”\HP_P2055\hppcp613.inf
cscript prnport.vbs -a -r IP_”%_ip%” -h “%_ip%” -o RAW -n 9100
cscript prnmngr.vbs -a -p “HP 2055” -m “HP LaserJet P2050 Series PCL6″ -r IP_”%_ip%”
pause
cscript prnmngr.vbs -t -p “HP 2055”
exit
:en
exit

To get the installation to work correctly you have to have the driver name as it shows up in the printer install dialog.  This is pretty easy to find you can try to install a fake printer on a system or you can look in the driver inf file to see what it is called.  First let me explain the script,  the basic syntax is straight forward.  By that I mean the echos, pause, and other basic commands.  The group of printer commands that run the vbs scripts are what I will cover.  The Prndrvr.vbs will simply install the driver before you create the printer, here is the syntax for the vbs file:

prndrvr {-a | -d | -l | -x | -?} [-m <model>] [-v {0|1|2|3}] [-e <environment>] [-s <ServerName>] [-u <UserName>]
[-w <Password>][-h <path>] [-i <inf file>]

prnport.vbs -a -r PortName [-s RemoteComputer] -h IPAddress [-u UserName -w Password]
[-o {raw -n PortNumber | lpr}] [-q QueueName] [-m{e | d}] [-i IndexName] [-y CommunityName] [-2{e | d}]

prnmngr.vbs -a -p PrinterName [-s RemoteComputer] -m DriverName -r PortName [-u UserName -w Password]

These are just what I used to make this work. You can do more than what I did here. I also wrote a script that would check
remote computers for the the printers that are installed. It would write back to the server and append a file. Anyhow this is
something else.

This printers script asks for the IP of the printer then you select the printer to install, then it installs the driver, creates
the printer port, and creates the printer. I did have to do some playing around with drivers, due to different OS versions and
32 vs 64 bit drivers. But a little work and I can pop in the cd, open an admin command window and install printers. I should
also add that our users can’t install their would printers due to security.

There is a number of ways to work with printers. I just wanted to throw out what I have been doing and you can even do this
over a network. I read about these is an admin book and they work well. I have also used these scripts on Windows 7 and they
worked. So if this will work for you check it out and there is more functionality than the little bit that I used it for.

 

UPDATE

These scripts can be found in Windows 7 at :  C:\Windows\System32\Printing_Admin_Scripts\en-US

Print This Post Print This Post

Acer Iconia A500 Review and Guide

I had been looking for a while at the Acer Iconia 10.1 inch tablet.  I found it on sale at Wally World for $300 so I decided to pick one up.  I am impressed with this tablet.  It has Android 3.1 with quit a few apps that are nice.  One  I think is cool is the video creator.  Any how here are the specs for the tablet.

Display
* Display Type 10.1 in TFT active matrix – LED backlight – Yes
* Display Resolution 1280 x 800

Memory
* Flash Memory 16 GB Integrated
* RAM 1 GB,
DDR2 SDRAM
* Supported Flash Memory Cards microSD,
microSDHC
* Max Supported Capacity 32 GB

Processor
* Processor 1 GHz,
NVIDIA Tegra 250
* Multi-Core Technology Dual-Core

Communications
* Wireless Connectivity 802.11b/g/n,
Bluetooth 2.1 EDR

Digital Camera
* Rear-facing Camera Yes
* Sensor Resolution 5 megapixels
* Focus Adjustment Automatic
* Camera Light Source LED light
* Front-facing Camera 2 Megapixel

Multimedia Functionality
* Audio Stereo microphone , speaker(s) – Stereo

GPS System
* GPS Navigation GPS receiver

Battery
* Installed Qty (Max Supported) 2
* Technology / Form Factor Lithium polymer
* Capacity 3260 mAh
* Run Time (Up To) 10 hour(s)
* Run Time Details Web browsing over Wi-Fi – up to 10 hour(s),
Video playback – up to 8 hour(s)

Expansion / Connectivity
* Expansion Slot(s) 1 x microSDHC
* Interfaces 1 x Audio / video – HDMI – 19 pin micro HDMI Type D,
1 x Hi-Speed USB – 4 pin USB Type A,
1 x Hi-Speed USB – 5 pin Micro-USB Type B,
1 x Audio – Line-out/microphone – Mini-phone 3.5 mm,
1 x Docking / port replicator
* USB Host Yes

Miscellaneous
* Sensors Proximity sensor,
Accelerometer,
Ambient light sensor,
Three-axis gyro sensor,
Digital compass

Operating System / Software

* OS Provided Android 3.1 Honeycomb

The games on this tablet are really nice.  I play Need For Speed, Lets Golf, Dungeon Defenders, and of course Angry Birds.  The graphics and performance is nice.  I heard that they were not so good but I think they are really good for a hand held device.  There are quit a few games but that isn’t really what I would use a tablet for.  It is nice to pass the time though.

I like the flash on the camera and the picture it takes are not bad.  But I don’t think I will use it to take that many pictures however it it is what you have with you it will get the job done even in the dark.  I do like the Movie Studio.  You can do some editing to videos or you can make a slide show from several pictures.  That would give you a reason to take pics with your tablet.

The email apps are a little bit nicer but still just email.  It does have a GPS and navigation but without a data source it really isn’t very good for it.  It is good for watching videos and movies.  One of the updates I got even installed a video app that is used for renting videos from Google Market.  I really wont use it but some people may.  There is also a media server installed to allow you to share your pics, videos, and music.  This is pretty cool as well.  A lot of these features are the same no matter what tablet you have as long as you have the same version of Android.  Plus Google Market is installed in the stock rom.

A few of the things I find annoying  are the notifications that keep popping up at the lower right corner, but you can turn that off.  The tablet is a little heavy but not too far off from most other 10.1 inch tablets at 1.5 lbs.  The battery life isn’t quit as good as I would like but it still will last 6 hours or so.  There is also an app out there that is suppose to increase the battery life, but it costs $.99.  It stops some of the 3G features that are in the Android software.

You can still root the tablet though.  It is really simple, you can download and install Gingerbreak from xda developers.  You can download it from this link. HERE

Here are the instructions:

1. Goto Settings->Applications and enable “Unkown sources”
2. Download the attached APK file
3. Copy the file to your Iconia
4. Install the APK & start the tool
5. Click “root”
Once the tablet is rooted you can install Acer Recovery from Google Market.  This app will install ClockWorkMod for recovery and backups without using nvflash.

You will need a few apps to make this device fully functional.  One is Rockplayer, this tablet has the same problem my G Tablet has.  It does not play ac3 audio format.  This will allow you to play pretty much every movie you have.  You will also need a file browser of some kind, I like ES File Explorer.  You may want to have an app killers such as Advanced Task Killer, this will auto kill apps depending on how you configure it.  This will help keep memory usage down and increase performance.  Another app you may want a battery monitor, I use Battery Booster.  It will turn off the WiFi when the screen blanks, warn you when the battery is low and turn off WiFi/Bluetooth, and has a little widget that can be to control some of the features.  Finally I like having File Expert installed.  This app turns you tablet into a web server so you can download and upload files to a computer on a network by logging into the tablets website.

This tablet truly shows the direction that Android is going.  As long as Acer doesn’t pull an HP and stop supporting the tablet right after it is launched, this device should be supported for a long time.  I have had two updates already in the 3 weeks I have owned it.  Go to a store that sales then and play with one of them for a little while, I am sure you will see some of the potential it has.  Check it out.