Jump to content

FrankE9999

Member
  • Posts

    114
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Everything posted by FrankE9999

  1. Windows XP Service Pack 2 Support Tools has a program called filever.exe. filever C:\WINNT\NOTEPAD.EXE ----- W32i APP ENU 5.1.2600.2180 shp 69,120 08-04-2004 notepad.exe You could pipe the output of the filever command into a find or grep (part of UnxUtils) then use the returned errorlevel. The problem with this method is you can only search of a direct match. You could also write a vbs script and call it using cscript from your batch file. Here is a sample script I wrote. If the program was t.vbs call it using "cscript -nologo t.vbs". It is also possible to remove the Run command from the function and use the return value to control what is run. Anyway it's not perfect but its a good starting point. function compare(strFile, strVer, srtRun) dim arrVer, arrInst, intCount if NOT fso.FileExists(strFile) then WScript.Echo strFile & " dosen't exist" : compare=false : exit function arrVer=Split(strVer, ".") arrInst = Split(fso.GetFileVersion(strFile), ".") intCount = UBound(arrVer) : if UBound(arrVer) > UBound(arrInst) then intCount = UBound(arrInst) for i=0 to intCount if CInt(arrVer(i)) < CInt(arrInst(i)) then WScript.Echo "Installed version is newer" compare=false exit function end if if CInt(arrVer(i)) > CInt(arrInst(i)) then WScript.Echo "Installed version is older" rem http://www.devguru.com/Technologies/wsh/qu...hshell_Run.html WshShell.Run srtRun, 1, TRUE compare=true exit function end if next WScript.Echo "Installed version is the same" compare=false exit function end function Set WshShell = WScript.CreateObject("WScript.Shell") Set fso = WScript.CreateObject("Scripting.FileSystemObject") z=compare ("C:\Notepad.exe","5.1.2600.2181","cmd.exe") z=compare ("C:\WinNT\Notepad.exe","5.1.2600.2181","cmd.exe")
  2. I'm just getting started on this so I can't give you all the answers. Most of the information here came from the following reference. Windows Vista Deployment Step by Step Guide The link for AIK incase anyone needs it. Windows Automated Installation Kit (AIK) Note don't forget to install sysprep on the system before you create the image. From a command prompt run pushd "C:\Program Files\Windows AIK\Tools\PETools" Copype.cmd x86 D:\WinPE_x86 Copy imagex to the WinPE_x86 folder. You can change the output folder if you like but I use D:\WinPE_x86. md D:\WinPE_x86\ISO\imagex_x86 copy "C:\Program files\Windows AIK\Tools\x86\imagex.exe" D:\WinPE_x86\ISO\imagex Create a file D:\WinPE_x86\ISO\imagex\wimscript.ini and add the following to it. [ExclusionList] ntfs.log hiberfil.sys pagefile.sys "System Volume Information" RECYCLER Windows\CSC [CompressionExclusionList] *.mp3 *.zip *.cab \WINDOWS\inf\*.pnf Use Oscdimg to create the winpe_x86.iso and burn it to CD. Oscdimg -n -bD:\winpe_x86\etfsboot.com D:\winpe_x86\ISO D:\winpe_x86\winpe_x86.iso Boot your source image system using the PE disk created above and map a drive from the command line. net use z: \\server\share /user:domain\user_name Run Imagex.exe to create the image (On my system the CD ROM shows up as D:). D:\Imagex\Imagex.exe /compress fast /capture C: Z:\Temp\WXPTest.wim "Windows XP Text" /verify I use the same method to restore so I would map the drive and use the following. D:\Imagex\Imagex.exe /apply Z:\Temp\WXPTest.wim "Windows XP Text" C: Note if the drive isn't already partitioned you will need to use diskpart to create the partitions and format to format the drive. DiskPart Command-Line Options In your case you should be able to copy the WXPTest.wim to the D:\WinPE_x86\ISO and rebuild the WinPE disk using Oscdimg -n -bD:\winpe_x86\etfsboot.com D:\winpe_x86\ISO D:\winpe_x86\winpe_x86.iso Now your WinPE disk should include the wim image.
  3. make sure you have the path rignt. type dir "%systemdrive%\Documents and Settings\All Users\Menu Inicio\Asistencia remota.lnk" if you get "The system cannot find the file specified." then the path is wrong. use the /F /Q option with delete to delete read only files. del /F /Q "C:\Documents and Settings\All Users\Start Menu\Programs\TextPad.lnk" ALLUSERSPROFILE=C:\Documents and Settings\All Users so you could write del /F /Q "%ALLUSERSPROFILE%\Start Menu\Programs\TextPad.lnk" I like to check that a link exists before deleting it. if exist "%ALLUSERSPROFILE%\Start Menu\Programs\TextPad.lnk" del /F /Q "%ALLUSERSPROFILE%\Start Menu\Programs\TextPad.lnk"
  4. Get right stores the registration information in HKEY_LOCAL_MACHINE\SOFTWARE\Headlight. Getright configuration information is stored in HKEY_CURRENT_USER\Software\Headlight\GetRight Use /S to do a silent install. Another good web site for building silent installed is www.appdeploy.comte.
  5. The file you linked to is a inno installer. You should be able to do a silent install using the /SILENT or /VERYSILENT command line options. You can also download a zip version of JkDefrag from http://jkdefrag.trad-fr.com/ and install this using zipinst http://www.nirsoft.net/utils/zipinst.html or just uncompress it.
  6. Windows XP has scripts for this Creates, deletes, and lists standard TCP/IP printer ports, in addition to displaying and changing port configuration [url="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/prnport.mspx?mfr=true"]Prnport.vbs [/url] Adds, deletes, and lists printers or printer connections, in addition to setting and displaying the default printer [url="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/prnmngr.mspx?mfr=true"]Prnmngr.vbs[/url] Configures or displays configuration information about a printer [url="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/prncnfg.mspx?mfr=true"]Prncnfg.vbs[/url] Adds, deletes, and lists printer drivers [url="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/prndrvr.mspx?mfr=true"]Prndrvr.vbs [/url] Pauses, resumes, cancels, and lists print jobs [url="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/prnjobs.mspx?mfr=true"]Prnjobs.vbs [/url] Prints a test page, pauses or resumes a printer, and clears a printer queue. [url="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/prnqctl.mspx?mfr=true"]Prnqctl.vbs [/url] Sample Adding a port and installing a printer (replace %1 with the computer name or remove "-s %1" for local system) cscript -nologo c:\WINNT\system32\Prnport.vbs -a -s %1 -r IP_192.168.1.2 -h 192.168.1.2 -o raw -n 9100 -me -i 1 -y public cscript -nologo c:\WINNT\system32\Prnmngr.vbs -a -s %1 -p "HP LaserJet 4000 (2nd Level)" -m "HP LaserJet 4000 Series PCL6" -r "IP_192.168.1.2" List printers on a system cscript -nologo c:\WINNT\system32\Prnmngr.vbs -l -s %1 Delete printer cscript -nologo c:\WINNT\system32\Prnmngr.vbs -d -s %1 -p "HP LaserJet 4000 (2nd Level)" Delete all printers cscript c:\WINNT\system32\Prnmngr.vbs -x -s %1 Delete unused drivers rem cscript c:\WINNT\system32\prndrvr.vbs -x -s %1 The only problem I ran into is creating a port for a shared printer. If a user on MyComp had shared his printer as HPLaserJ I couldn't create the port "\\MyComp \HPLaserJ" using the above. I was able to work around this by stopping the spoller service, creating the registry entry and restarting the spoller service. NETSVC spooler \\MyComp /stop NETSVC spooler \\MyComp /stop reg.exe add "\\MyComp\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports" /v "\\MyComp \HPLaserJ" /f NETSVC spooler \\MyComp /start
  7. try tracert 192.168.1.55 If the system is in a domain and you have a domain admin account you can read the machine name from the registry. reg query "\\192.168.1.55\HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName"
  8. If you add the drive to working XP system you still need to change the security permissions on the files. First take ownership of the files. Logon the XP computer using an account that has administrator rights. Right click on the folder and select properties. Select the security tab, click the advanced tab, click the owner tab. Select the administrators group or the current users and check the option to replace the owner on subcontainers and objects then press ok. Next change the security perms on the files. Open the properties folder again and add the administrators group to the folder and give it full access. Select the option to reset the permissions on all child objects and enable propagation of inheritable permissions.
  9. I need to read the registry on a remote machine from a .js file. I have found many examples using StdRegProv in .vbs files but can't get it working in a .js file. I know that there are problems passing arguments by reference to some COM objects in jscript.
  10. You could use robocopy or xxcopy. Robocopy is part to the Windows Server 2003 Resource Kit Tools robocopy folder2 folder1 /s /xo /xn /xx /l I added the /l so the command will only list the changes. Once you get it working the way you want run the command without the /l option to copy the files. /XN :: eXclude Newer files. /XO :: eXclude Older files. /XX :: eXclude eXtra files and directories /S :: copy Subdirectories, but not empty ones. /L :: List only - don't copy, timestamp or delete any files. /E :: copy subdirectories, including Empty ones.
  11. You could try using robocopy which is part of the Windows Server 2003 Resource Kit Tools Create an empty directory. robocopy "Empty Directory" "parent directory of directories that can't be deleted" /purge /l The /l option only shows what the command is going to do. Once you get it right remove the /l and run it again. robocopy "Empty Directory" "parent directory of directories that can't be deleted" /purge
  12. If you have the retail version of XP it will still prompts you for the product key even though you have it in your winnt.sif file. You can change this by editing the setupp.ini file and changing the last three digits of the Pid to 270. You still need the product key in the winnt.sif file for this to work. I think that 000 is the default value for the last three digits in the retail version.
  13. How can I install Windows 2000 without supplying the CD key? Also add the [userData] ProductKey=xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
  14. pg2-050918-nt.exe /VERYSILENT /SP-
  15. Bart's Stuff Test 5 HD Tune Version v2.52
  16. Works for me. Extract the contents of IP55_32Eng.exe Go to the IPoint\Setup folder You need IP55.msi and the Files folder and sub folders. IP55.msi setup.bat Files\commands.xml Files\dpgcmd.dll Files\dpgmkb.dll Files\dplaunch.exe Files\dw15.exe Files\hcg.chm Files\ipcoin7.dll Files\ipcplact.dll Files\ipcplbtn.dll Files\ipcplwhl.dll Files\ipcplwir.dll Files\ipoint.exe Files\mhook.dll Files\mousinfo.exe Files\mscmdmou.xml Files\point32.cat Files\point32.inf Files\point32.sys Files\1033\dwintl.dll Files\1033\iphelp.chm Files\1033\ipres.dll Files\1033\Readme.txt Files\1033\srres.dll Files\1033\Denmark.rtf Files\1033\Dutch.rtf Files\1033\Eng.rtf Files\1033\Finland.rtf Files\1033\Leesmij.txt Files\1033\Norway.rtf Files\1033\setupres.dll Files\1033\Sweden.rtf setup.bat @echo off pushd "%~dp0" msiexec /i IP55.msi MM=3 REBOOT=REALLYSUPRESS /qb popd
  17. Try msiexec /i IP55.msi MM=3 REBOOT=REALLYSUPRESS /qb
  18. If the new HD doesn't help it could be a drive issue. If your XP install CD doesn't have SP2 build another disk with integrated SP2. Also remove any unneeded cards and USB devices while installing XP.
  19. If you run Windows critical updates it will give you an error code as to why it couldn't install. You should also look as the event log to see if you have any error information.
  20. check out http://www.appdeploy.com/ .Net Framework 2 dotnetfx.exe I'm sure there are silent switched for this but I would repack this and include the latest critical update. rem Unpack the dotnetfx.exe to C:\Temp\dotnetfx2 md C:\Temp\dotnetfx2 dotnetfx.exe /T:C:\Temp\dotnetfx2 /C rem Extract the NDP20-KB917283-X86 C:\Temp\NDP20-KB917283-X86 md C:\Temp\NDP20-KB917283-X86 NDP20-KB917283-X86.exe /extract C:\Temp\NDP20-KB917283-X86 rem Build the Admin install md C:\Temp\dotnetfx2Admin msiexec.exe /a C:\Temp\dotnetfx2\netfx.msi TARGETDIR=C:\Temp\dotnetfx2Admin /qb msiexec /p C:\Temp\NDP20-KB917283-X86\NDP20-KB917283-X86.msp /a C:\Temp\dotnetfx2Admin\netfx.msi /q rem cleanup rmdir /s /q C:\Temp\NDP20-KB917283-X86 rmdir /s /q C:\Temp\dotnetfx2 rem Use this to install files are in the C:\Temp\dotnetfx2Admin directory rem msiexec /i "netfx.msi" REBOOT=REALLYSUPRESS /qb jre-1_5_0_07-windows-i586-p.exe /S /v/qn http://java.sun.com/j2se/1.4.2/docs/guide/...ide/silent.html AdbeRdr708_en_US.exe Run the installer it extracts the install file to "C:\Program Files\Adobe\Acrobat 7.0\Setup Files\RdrBig708\ENU" msiexec /i "Adobe Reader 7.0.8.msi" REBOOT=ReallySuppress /q 7z442.exe /S spywareblastersetup351.exe This is an inno installer and the author didn't include a silent install option. You can unpack this application and create one. http://www.msfn.org/board/index.php?act=ST...=80&t=17540 Note when creating an admin install you can recompress the files into a single executable file using 7zip.
  21. With that many machines you will probably want to use imaging software such as ghost. The ghost cast server can do much of what you are looking to do including backup user data although I've never used this option. Most of the users where I work use roaming profiles and store all their files on a server. The laptop systems are configured with two partitions one with the operating systems and applications and the other with the users files. The bad thing about this solution is that you have to buy a license for each computer. Look at http://www.interclasse.com/scripts/SoftwareMeteringCLS.php for a script that builds a list of software installed on a computer.
  22. Extended Change Access Control List Tool (Xcacls) How to use Xcacls.vbs to modify NTFS permissions "xcacls.vbs is an unsupported utility that addresses a limitation with the original xcacls.exe, specifically the inability to append permissions to a folder whose child objects have the inheritance flag set. The .vbs version does not suppport unc paths. " XCACLS-Windows Command
  23. I have several systems that were imaged using ghost 7.5 and I need to determine what date thet were loaded and the image name used to load the system. I thought this information was in the registry by I haven't been able to find it.
  24. The script above should work but I would recomend adding some error checking. First verify that the system is running Windows XP. Next verify that service pack 2 is installed. Finally install missing hot fixes. @echo off rem Verify system is running windows XP reg.exe query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName | find "Microsoft Windows XP" > nul: if errorlevel 1 ( echo **** System not running Windows XP **** goto :EOF ) rem look for service pack 2 reg.exe query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v CSDVersion | find "Service Pack 2" > nul: if errorlevel 1 ( echo **** Installing Service Pack 2 **** rem add code to install service pack 2 goto :EOF ) rem look for missing hot fix KB901017 reg.exe query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB901017" /v Installed >nul: 2>&1 if errorlevel 1 ( echo Installing MS05-048 KB901017 rem add code to install missing hot fix ) Note: In some cases you may need to check the file version to determine if a patch is installed. You could write a vbs ot js script to do this or use the filever command which is part of the Windows XP Service Pack 2 Support Tools.
  25. If you know the local administrator account name and password you can try the following. Use netdom.exe which is part of the Windows 2003 Server CD Support Tools located on the Windows 2003 server CD. You can use this command to remotly add a computer to the domain although in this case you may have to use it to remove it from the domain first since the system already thinks it is in a domain. NETDOM REMOVE /? NETDOM JOIN /? You could also try enabling remote desktop and logging in using the local administrator account. Howevet this may not work because of firewall settings. reg.exe add "\\%1\HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f reg.exe add "\\%1\HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fAllowToGetHelp /t REG_DWORD /d 0 /f reg.exe add "\\%1\HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v AllowTSConnections /t REG_DWORD /d 1 /f
×
×
  • Create New...