Jump to content


  • Posts

  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Everything posted by dfnkt

  1. Here are my findings, his so far is working great. Alot of work for such a small script but it does its job. Revision 2 I guess would be a way to write directly to the registry without the need for text files. Not a bad attempt for never having used the FOR command. @ECHO OFF cd \ SET VAR=eTrust Antivirus Base SET VAR1=eTrust PestPatrol Signatures SET VAR2=eTrust Vet Engine CompVer | Find "%VAR%" >> C:\ITM.txt CompVer | Find "%VAR1%" >> C:\ITM2.txt CompVer | Find "%VAR2%" >> C:\ITM3.txt REG ADD HKLM\SOFTWARE\ComputerAssociates\eTrustITM\Status FOR /F "tokens=4 delims=, " %%i in (C:\ITM.txt) DO @REG ADD HKLM\SOFTWARE\ComputerAssociates\eTrustITM\Status /v "%VAR%" /d %%i FOR /F "tokens=4 delims=, " %%j in (C:\ITM2.txt) DO @REG ADD HKLM\SOFTWARE\ComputerAssociates\eTrustITM\Status /v "%VAR1%" /d %%j FOR /F "tokens=4 delims=, " %%k in (C:\ITM3.txt) DO @REG ADD HKLM\SOFTWARE\ComputerAssociates\eTrustITM\Status /v "%VAR2%" /d %%k DEL "C:\ITM.txt" && DEL "C:\ITM2.txt" && DEL "C:\ITM3.txt" EXIT
  2. I am looking on advice to writing a script in preferably Batch/CMD or VBS with PERL being an option. What I am trying to accomplish is either directly writing information obtained from a command line tool into some strings / keys into the registry. We are currently running CA Threat Manager 8.1 (AV and PestPatrol). From CA there is a command line tool called 'CompVer' that will output all the particular information related to signature version and AV base version. I either need to run this CompVer utility in a script and directly write 3 of the results into a registry key or write them out to a text file and import that into the registry. Here is the work I've done so far: >>>Run Compver and output to a text file<<< REM Run CompVer and output to a textfile @ECHO OFF compver | Find "eTrust Antivirus Base" >> C:\ITM.txt && compver | Find "eTrust PestPatrol Signatures" >> C:\ITM.txt && compver | Find "eTrust Vet Engine" >> C:\ITM.txt EXIT >>>Write entries to the registry<<< @ECHO OFF REM Write to REG Key REG ADD HKLM\SOFTWARE\ComputerAssociates\eTrustITM\Status REG ADD HKLM\SOFTWARE\ComputerAssociates\eTrustITM\Status /v "eTrust AntiVirus Base" /t REG_MULTI_SZ I am looking for some way, hopefully in the same script to write the entries inside of C:\ITM.txt into the registry. I am assuming that this would use the FOR command however I have little experience with this command when writing batch. Like I said, VBS is an option but I haven't explored it yet as I am looking for something quick.
  3. It was just orginally setup for them to not be domain users because of what little access they need from us. We are having other issues related to them being in their own little world, so we may have to break down and fold them into the mix and absorb the cost associated.
  4. We are looking for a way to have group policies apply to our remote sales force. We have approx 150 people who have laptops that are NOT joined to our domain but who do have to login as domain users when they connect to the VPN. For instance we want to create a GPO which will set the default saving type in Office 2007 to be compatible with Office 2003. We would like this to be applied to users who connect via VPN to our network. Important Points: Their computers are not part of our domain (or another domain for that matter, WORKGROUP all the way.) The users all have a domain user created for them that they use to login to our VPN We want to apply GPOs to these users. The VPN connection is established once windows if fully booted up and operating (usually by visiting a website). Anyone have any ideas on how to accomplish this?
  5. Well, if you did that, you'd be left with a script that's basically identical to mine. The only real differences, are the messages. Here's the same script again, with your new messages const HKLM = &H80000002 strComputer = "." Set objWMI=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv") strKeyPath = "Software\Microsoft\Internet Explorer" strValueName = "Version" objWMI.GetStringValue HKLM, strKeyPath,strValueName,strValue intIEVers = CInt(Left(strValue, InStr(strValue, ".")-1)) Set objWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colItems = objWMI.ExecQuery("Select * from Win32_OperatingSystem") For each elem in colItems intSP = elem.ServicePackMajorVersion Next if intIEVers < 7 and intSP = 3 then msgbox "IE 7 not found! Service Pack 3 Found! No further action is needed." elseif intIEVers < 7 and intSP < 3 then msgbox "IE 7 not found! Service Pack 3 not found! Please install Service Pack 3." elseif intIEVers > 6 and intSP < 3 then msgbox "IE 7 found! Service Pack 3 NOT found! Please go to Control Panel>Add/Remove Programs and remove Internet Explorer 7 and then install Service Pack 3." elseif intIEVers > 6 and intSP = 3 then msgbox "IE 7 and Service Pack 3 were found. You need to go to Control Panel>Add/Remove Programs and remove Service Pack 3 before you can remove Internet Explorer 7. Once completed, reinstall Service Pack 3." else msgbox "Unable to determine configuration." end if (also removed the line with blnBadIEVers -- had no use for it, went for actual version checks instead of using the boolean for the conditional statements) @jaclaz: totally. At a VERY strict minimum, it should work on IE as well as Firefox (that's at least 90% of users out there), but when you have it working on IE and FF, usually there's very little extra work required to test (and make updates) for Opera, Konqueror, Safari (for those poor guys with fruity computers ) and others. Usually that means standard compliant markup (that works with FF, Opera and all the others), and a IE-specific style sheet or such. I've been a permanent Firefox user for YEARS too (secure, fast, and all them GREAT extensions: the web dev toolbar, firebug, DOM inspector, etc etc) Anything IE 6 - only is single-platform/windows-only, and even limiting which version of windows can use it (windows only, but even then not all versions!). And that prevents you from updating to a not as sucky version of that browser for your other needs -- you're just stuck with an older version the poorest browser there is (IMO) Edit: oops, just noticed quoting my posts or copy/pasting from them removed backslashes, very strange... Fixed! Thanks again Crahak, much appreciated. I have used vbscript for a few months and I just don't use it heavily enough to learn all the ins and outs! Thanks for all your help again.
  6. Yes , programmers should also think about we "poor" users of Opera, Firefox, Konqueror.... jaclaz I have been a permanent firefox user since 2004, don't think I could ever go back.
  7. Like I said before... Looks like you're still trying to do it (in your last post). However, the script I wrote does EXACTLY what you asked for (it's tested). If you're doubting Thomas and don't trust the conditional statements, try using combinations of intSP = 2 or intSP = 3, and intIEVers = 6 or intIEVers = 7 (or even intIEVers = 8) just before the if's. You'll see exactly how it behaves for each scenario. Adding an OS check would be a good idea though, unless all your boxes run XP. Absolutely. Nowadays, IE7 has a far bigger market share than IE6 and is still on the rise. And it's been out for a good while now (close to 2 years). There's just no excuse for not having updates/fixes by now, especially when it should only be minor changes required to the web apps in question. Similarly, there's no excuse nowadays for most web apps to not support non-IE browsers. Usually that just means they're using non standard compliant markup that only renders OK in IE, which is very sloppy at best. Some companies seemingly need to work on supporting their products a LOT better... And IE8 will be out soon, and it's not gonna get any better then. And Vista users can't downgrade to crappy IE 6 either, and Vista is quickly gaining market share too... The only stupid web app I've had the displeasure to see in the last few years that was IE-only, was the web interface for Remedy (thanks to the use of ActiveX junk). Yes crahak thank you, i tested your code and it does just what I need! I was also able to see the syntax of the "if and then" and modify what I had to work as well. With the script i posted in my last post, how can I fix the integer problem you talk about. Our web app is written by siebel i believe, so frustrating. We also use Altiris HelpDesk which is IE only, doesn't render properly because it fails to recognize firefox as an uplevel browser. This is fixable by tweaking the web.config browsercaps section I just have not had the time to do this. Also the newer version is due out in a few months and I'm sure its been taken care of.
  8. ===== Post Nº 1 ===== Wow thanks for all the responses! The only problem for just checking for 2 conditions is that if IE7 is found as well as SP3, they just can't immediately remove IE7 without first removing SP3. I was wanting the script to be extra wordy to give them specific directions on what to do. I have so far gotten 2 scripts, the first will show you what SP is installed followed by a message of what IE version is installed. The second script uses an "If xxxxxx then If xxxxx then else" and seems to function fairly well when I only try to look for the presence of an IE version >=7 but upon adding the statements for IE 6 strValue < "7" it fails to execute. I will be working more with this today and try out the code suggestions that have been made, thank you again! ===== Post Nº 2 =====
  9. Is there not a way to make a vbscript look at multiple if's before having to "then"? If SP3 and IE7 found then msgbox "remove sp3, then remove ie7, reinstall sp3" if sp2 and IE7 found then msgbox "remove ie7 then install sp3" if SP3 and IE6 found then msgbox "no further action needed" if sp2 and ie6 found then msgbox "please install sp3" ^^ something like that?
  10. Will try the code out! But thanks to microsoft once SP3 is installed, IE 7 is locked onto a machine. http://blogs.msdn.com/ie/archive/2008/05/0...-and-xpsp3.aspx
  11. Thanks guys! One final question, I've pieced the IE7 detection together with a service pack detection script I had written. I have the two working together however how would you make it so that checks if IE7 and SP3 are installed and THEN gives you a msg box telling you that you need to uninstall SP3/ Then uninstall IE7? Here is the whole script I'm working with now: const HKLM = &H80000002 strComputer = "." Set objWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv") Set objWMI2 = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colItems = objWMI2.ExecQuery("Select * from Win32_OperatingSystem") strKeyPath = "Software\Microsoft\Internet Explorer" strValueName = "Version" objWMI.GetStringValue HKLM, strKeyPath,strValueName,strValue If strValue >= "7" Then MSGBOX "IE 7 Found! Please Go To Control Panel>Add/Remove Programs and Remove It." ELSE If strValue >= "6" Then MSGBOX "IE 7 Not Found! You are OK!" End If End If For each elem in colItems If instr(elem.CSDVersion, "2") Then msgbox "Found Service Pack2" Else If instr(elem.CSDVersion, "3") Then msgbox "Found Service Pack3" End If End If Next Basically What this does now is says "Hey IE7 is installed, remove it" then it tells you which SP is present. Can it be coded to determine if there is a combination of both SP3 / IE7 and then give them a message box to the effect of "IE7 AND Service Pack 3 was found. You will need to remove Service Pack3 before removing IE7. I assume its possible, I just seem to have lost my thinking cap today.
  12. We have line of business apps that do not have any support for IE 7 let alone IE 8 (or vista for that matter) anywhere in sight. The purpose of this is to make it easier for our helpers who are less technically inclined at an upcoming conference determine if IE7 is installed (which they need to remove). Thanks for the reply and I will take a look at it.
  13. I am currently trying to write a batch file to query the registry to determine if internet explorer 7 is installed and echo a message to the user appropriately. The path in the registry is HKLM\Software\Microsoft\Internet Explorer\Version Vector The key is: "IE" IE 7 has a value of "7.0000" and 6 has a value of "6.0000". I am trying to develop a batch (wouldn't be opposed to VBS) to echo a msg to the user regarding what was found. By simply using @ECHO OFF REG QUERY "HKLM\Software\Microsoft\Internet Explorer\Version Vector" /v IE I can see what the value is but I would like to do something such as piping the key into find and evaluating it like so @ECHO OFF REG QUERY "HKLM\Software\Microsoft\Internet Explorer\Version Vector" /v IE |Find /I /C "7.0000" IF (%ERRORLEVEL% NEQ 0 GOTO noie7) ELSE (goto foundie7) :noie7 ECHO Internet Explorer 7 Not Found! :foundie7 ECHO Internet Explorer 7 FOUND! PAUSE I have tried this exact batch only to get errors. It doesn't seem to want to recognize the ELSE part of the statement and just always says IE7 found regardless of what is actually present. I also looked at using vbs/wmi but I was unable to find the root\cimv2 or otherwise class for "add/remove" programs. Help?
  14. Need some help if anyone is good with vbscript. What I need the script to do is query for the existence of service pack version, and then use logic to say "if servicepack = 3 then msgbox "sp3 installed" or "else msgbox "sp3 not installed". I have pasted what I have into a pastebin in a link below. This was hacked together from 2 previous scripts that I wrote. It's been 6 months or more since I worked with VBscript and I'm sure I'm missing something easy. http://pastebin.com/m328b3e34
  15. There is an Enterprise.WW folder in there, how do I check to make sure that it is being used?
  16. Trying to setup a silent install of Office 2007 Enterprise. I have copied all the files from the CD to a folder inside of an XP virtual machine I'm running. I've ran setup.exe /admin and created an MSP named "custom.MSP". I have placed custom.MSP in the Updates folder as well as left a copy in the same directory as setup.exe. When I launch setup.exe from command line I receive a pop up asking me which version I would like to install. When I launch setup.exe /adminfile custom.MSP I get the same window asking for version. I have also adjusted autorun.inf just as a test and tried it from a CD and the same window still comes up. Any ideas anyone?
  17. Hello to everyone, I am pleased to join MSFN. I am 23 and currently work as a Systems Administrator for a medium sized yearbook company. Hope to see you around!

  • Create New...