Jump to content

davil

Active Members
  • Posts

    81
  • Joined

  • Last visited

Posts posted by davil

  1. Thanks for all your help op + hex.. I'll give these things a go. I had heard of cygwin but I was worried about how well it would work on each platform ie. does it work ok on NT? one way or another I'm gonna check it out.

    I have a fairly decent amount of info in the database already but I just thought it'd be nice to have a simple exe or whatever that could parse info from solid native utilities / commands like "net share". I'm also having trouble running some commands directly from php using system / exec  and I found out lately that any utils I write in freebasic or whatever should be in one of the directories defined by 'PATH' variable on the webserver, ie. c:windows or whatever and that seems to work fine but when I run the "psexec remotecomputer net share" or "psexec -s -i -d remotecomputer net share" commands through PHP it just stalls and gives me maximum execution time errors. I could easily write a nice parser in PHP but basic is teh crap and I haven't really learned any C yet as I'm self taught and too busy. so if anyone has a proper way to run psexec through PHP please let me know.

    So it's because psexec wasn't working through PHP that I originally wrote this thread. I was going to try to write the data from each machine to a file share on our server and if I could parse the data and send it to my webserver with curl well then all the better. They are very round-about ways of sending the data but it seems to work so I'm happy enough. If I was good enough I could build one big reporting app in C and connect directly to the MySQL server but I'm just not that good.

    for the minute I'm going to look into what I've heard from you guys but if anyone has anything else to add, please do.

    Thanks again.

  2. Hi,

    I use pstools for my network administration tasks and the relatively new EULAs that Microsoft put in are really starting to annoy me. What's the point of command line utils that need to be accepted by the user...

    Now I've seen posts that show where in registry to put the accept entries with maybe reg.exe or whatever but I'd much prefer if there were another tool like pskill that does the same job on machines from NT to XP but without the EULA bs. does anyone know of such a tool?

  3. Hi all,

    I'd just like to ask a silly question if I may... I've built a PHP / MySQL based database system that keeps track of all our PCs in my workplace (>600) and it works a treat but I try to keep the reporting to simple exes that run on any of  NT/2K/XP platforms as we have these types of machines. so simple things like "net share" piped to text files work great but I was wondering if theres any program out there that can sort the output from command like net share, netstat etc. into proper tables, or csv files etc.. I could have sworn I saw one last week but I've lost the link. Maybe it doesn't exist at all and I'm just going mad but if anyone has any idea please let me know.

    At the minute I'm pulling in the output into PHP and exploding it via rn  and then with t to seperate the tabs  and doing a bit of manipulation but it would be nice if there were an app out there that sorted the output of these commands. Actually the one I thought I saw was a windows built in thing I think. Or maybe it was a powershell thingy, which is useless cos I need this to run on NT-XP as I said before.

    Either way, any info at all is much appreciated.

  4. Here's my list, enumerated from my pstart.xml file - yes I use pstart, although it's a bit slow when u have loads of entries so if anyone has another suggestion?? I'm gonna try asuite as soon as I can be bothered.

    By the way, some of these (not many) are commercial apps I have paid for.. I will mark the commercial stuff..

    ok I've had a quick look through and I'm pretty sure everything is free / open source except for Everest Ultimate Edition, but you can always grab the old freeware version, AIDA32... It doesn't detect newer CPUs very well though :-D

    if anything else on my list is not free please let me know. I have paid for any commercial software on it.

    Anyway, here goes ( watch out for duplicates :-D ):

    ------Networking------
    PuTTY Portable,PortableAppsPuTTYPortablePuTTYPortable.exe
    TCP/UDP endpoint viewer,SOFTWAREPORTABLESysinternalsTcpview.exe
    ------Games------
    PokerTH Portable,PortableAppsPokerTHPortablePokerTHPortable.exe
    Tetris,SOFTWAREPORTABLEGAMESTetrisbricks.exe
    NagaSkaki Chess,SOFTWAREPORTABLEGAMESNagaskaki ChessNagaSkaki.exe
    Armadillo Run,SOFTWAREPORTABLEGAMESArmadillo RunArmadillo.exe
    DOSBox Portable,PortableAppsDOSBoxPortableDOSBoxPortable.exe
    DOPEWARS,SOFTWAREPORTABLEGAMESDOPEWARS.EXE
    Wormux,SOFTWAREPORTABLEWormux-0.7.9-win32.exe
    Monkey Lander,SOFTWAREPORTABLEGAMESmonkey-lander.exe
    Babo Violent 2,SOFTWAREPORTABLEGAMESBabo Violent 2Bv2Launcher.exe
    simutrans,SOFTWAREPORTABLEGAMESsimutranssimutrans.exe
    Charred Dirt,SOFTWAREPORTABLEGAMESCharred Dirtcdirt.exe
    Simon32,SOFTWAREPORTABLEGAMESSimon32SIMON.EXE
    Crack Attack,SOFTWAREPORTABLEGAMESCrack-Attackbincrack-attack.exe
    NeverBall,SOFTWAREPORTABLEGAMESneverball-1.4.0neverball.exe
    Clicking,SOFTWAREPORTABLEGAMESclicking.exe
    Zen Bondage,SOFTWAREPORTABLEGAMESZen BondageZenBondage.exe
    Pengupop (puzzle bobble),SOFTWAREPORTABLEGAMESpengupop.exe
    4stAttack,SOFTWAREPORTABLEGAMESPortable4stAttackPortable4stAttack.exe
    AlienBlaster,SOFTWAREPORTABLEGAMESPortableAlienBlasterPortableAlienBlaster.exe
    Armagetron,SOFTWAREPORTABLEGAMESPortableArmagetronPortableArmagetron.exe
    Disasteroids3D,SOFTWAREPORTABLEGAMESPortableDisasteroids3DPortableDisasteroids3D
    .exe
    FooBillard,SOFTWAREPORTABLEGAMESPortableFooBillardPortableFooBillard.exe
    Pouet Chess,SOFTWAREPORTABLEGAMESPortablePouetChessPortablePouetChess.exe
    zeRace,SOFTWAREPORTABLEGAMESPortablezeRacePortablezeRace.exe
    ------RSS------
    FeedReader,SOFTWAREPORTABLEFeedReader30feedreader.exe
    ------CD+DVD Burning + ISO------
    Micro CD Burner,SOFTWAREPORTABLEmicroburner.exe
    PowerLaserExpress,SOFTWAREPORTABLEPowerLaserExpress.exe
    WinImage,SOFTWAREPORTABLEWinImagewinimage.exe
    WinISO,SOFTWAREPORTABLEWinISOWinISO.exe
    InfraRecorder,SOFTWAREPORTABLEInfraRecorderInfraRecorder.exe
    InfraRecorder express,SOFTWAREPORTABLEInfraRecorderirExpress.exe
    ------OpenOffice------
    Word Processor (OpenOffice.org Writer Portable),PortableAppsOpenOfficePortableOpenOfficeWriterPortable.exe
    Database (OpenOffice.org Base Portable),PortableAppsOpenOfficePortableOpenOfficeBasePortable.exe
    Spreadsheet (OpenOffice.org Calc Portable),PortableAppsOpenOfficePortableOpenOfficeCalcPortable.exe
    Drawing (OpenOffice.org Draw Portable),PortableAppsOpenOfficePortableOpenOfficeDrawPortable.exe
    Presentation (OpenOffice.org Impress Portable),PortableAppsOpenOfficePortableOpenOfficeImpressPortable.exe
    OpenOffice.org Math Portable,PortableAppsOpenOfficePortableOpenOfficeMathPortable.exe
    ------Internet + Web------
    Firefox Portable,PortableAppsFirefoxPortableFirefoxPortable.exe
    Thunderbird Portable,PortableAppsThunderbirdPortableThunderbirdPortable.exe
    Firefox 3 Beta 2 Portable,PortableAppsFirefoxPortableTestFirefoxPortable.exe
    IPNetInfo,SOFTWAREPORTABLEIPnetinfoipnetinfo.exe
    ------Audio + Video------
    VirtualDub Portable,PortableAppsVirtualDubPortableVirtualDubPortable.exe
    Audacity Portable,SOFTWAREPORTABLEAudacityPortableAudacityPortable.exe
    VLC Portable,PortableAppsVLCPortableVLCPortable.exe
    MediaInfo,SOFTWAREPORTABLEMediaInfoMediaInfo.exe
    ------Graphics + Flash------
    DrawSWF,SOFTWAREPORTABLEdrawswf.cmd
    Osiva,SOFTWAREPORTABLEosiva.exe
    ------LINUX + VMS------
    QEMU Manager,qemuQemuManager.exe
    DOSBox Portable,PortableAppsDOSBoxPortableDOSBoxPortable.exe
    PuppyLinux,puppyqemupuppy.exe
    ------Coding------
    ------Text------
    WinMerge,SOFTWAREPORTABLEX-WinMergeX-WinMerge.exe
    AutoIt3Help,SOFTWAREPORTABLEAutoIt3AutoIt3Help.exe
    AutoIT info window,SOFTWAREPORTABLEAutoIt3Au3Info.exe
    Notepad++ Portable,PortableAppsNotepad++PortableNotepad++Portable.exe
    Numerimal,SOFTWAREPORTABLENumerimalNumerimal.exe
    ------WWW sites------
    GMAIL,PortableAppsFirefoxPortableFirefoxPortable.exe www.gmail.com
    ------PSP hacks------
    PopstationGUI,SOFTWAREPORTABLEPopstationPopstationGUI.exe
    ------Antivirus------
    ClamWin Portable,PortableAppsClamWinPortableClamWinPortable.exe
    ------Sysinternals------
    TCP/UDP endpoint viewer,SOFTWAREPORTABLESysinternalsTcpview.exe
    Autoruns,SOFTWAREPORTABLESysinternalsautoruns.exe
    File Monitor,SOFTWAREPORTABLESysinternalsFilemon.exe
    Process Explorer,SOFTWAREPORTABLESysinternalsprocexp.exe
    Process Monitor,SOFTWAREPORTABLESysinternalsProcmon.exe
    Registry Monitor,SOFTWAREPORTABLESysinternalsRegmon.exe
    ------SECURITY------
    Ferret,SOFTWAREPORTABLEferret_start.cmd
    Password Sniffer,SOFTWAREPORTABLESniffPassSniffPass.exe
    KeePass Portable,PortableAppsKeePassPortableKeePassPortable.exe
    LSASecretsView,SOFTWAREPORTABLELsaSecretsViewLSASecretsView.exe
    IE Passwords Viewer,SOFTWAREPORTABLEIEpassvieweriepv.exe
    WirelessKeyView,SOFTWAREPORTABLEWirelessKeyViewWirelessKeyView.exe
    Win MD5 sum,PortableAppswinMd5SumPortablewinMd5Sum.exe
    MD5,SOFTWAREPORTABLEmd5.exe
    Eraser Portable,PortableAppsEraserPortableEraserPortable.exe
    Password Sniffer,SOFTWAREPORTABLESniffPassSniffPass.exe
    IPNetInfo (internet),SOFTWAREPORTABLEIPnetinfoipnetinfo.exe
    TCP/UDP endpoint viewer,SOFTWAREPORTABLESysinternalsTcpview.exe
    Process Explorer,SOFTWAREPORTABLESysinternalsprocexp.exe
    ------File Utils------
    Double Killer,SOFTWAREPORTABLEDoubleKiller.exe
    SpaceMonger,SOFTWAREPORTABLESpaceMongerSpaceMonger.exe
    Duplicate Finder,SOFTWAREPORTABLEduplicate_finder.exe
    DupDetector,SOFTWAREPORTABLEDupDetectorDupDetector.exe
    Filemon,SOFTWAREPORTABLESysinternalsFilemon.exe
    FileTool,SOFTWAREPORTABLEFileTool.exe
    WinRAR portable,SOFTWAREPORTABLEWinRAR-3.62-PortableWinRAR.exe
    7-Zip Portable,PortableApps7-ZipPortable7-ZipPortable.exe
    ------Disk Utils------
    WinDirStat,SOFTWAREPORTABLEwindirstatwindirstat.exe
    SpaceMonger,SOFTWAREPORTABLESpaceMongerSpaceMonger.exe
    OpenedFilesView,SOFTWAREPORTABLEOpenedFilesViewOpenedFilesView.exe
    7-Zip Portable,PortableApps7-ZipPortable7-ZipPortable.exe
    Virtual Floppy Drive (console),SOFTWAREPORTABLEVirtual Floppy Drivevfd.exe
    Virtual Floppy Drive (GUI),SOFTWAREPORTABLEVirtual Floppy Drivevfdwin.exe
    Duplicate Finder,SOFTWAREPORTABLEduplicate_finder.exe
    ------File Recovery------
    DataRecovery,SOFTWAREPORTABLEDataRecovery_ENDataRecovery.exe
    Undelete Plus,SOFTWAREPORTABLEundelete_plus.exe
    Recuva,SOFTWAREPORTABLERecuvarecuva.exe
    Pandora Recovery,SOFTWAREPORTABLEPandora RecoveryPandoraRecovery.exe
    Restoration,SOFTWAREPORTABLErestorationRestoration.exe
    Testdisk,SOFTWAREPORTABLEtestdisk+photorecwintestdisk_win.exe
    Photorec,SOFTWAREPORTABLEtestdisk+photorecwinphotorec_win.exe
    DupDetector,SOFTWAREPORTABLEDupDetectorDupDetector.exe
    HD Speed,SOFTWAREPORTABLEhd_speed.exe
    Auslogics Disk Defrag,SOFTWAREPORTABLEdiskdefragdiskdefrag.exe
    Pagefile defragmenter,SOFTWAREPORTABLEpagedefragpagedfrg.exe
    Filemon,SOFTWAREPORTABLESysinternalsFilemon.exe
    ------Audit------
    WinAudit,SOFTWAREPORTABLEWinAudit.exe
    StartupList,SOFTWAREPORTABLEStartupList.exe
    SIW - System Information,SOFTWAREPORTABLEsiw.exe
    Unknown Device Identifier,SOFTWAREPORTABLEUnknownDeviceIdentifier.exe
    MemTest,SOFTWAREPORTABLEMemTestmemtest.exe
    RegShot,SOFTWAREPORTABLERegShotregshot.exe
    Autoruns,SOFTWAREPORTABLESysinternalsautoruns.exe
    EVEREST Ultimate Edition 2006,SOFTWAREPORTABLEEverest Ultimate Editioneverest.exe [COMMERCIAL]
    StartUpLite,SOFTWAREPORTABLEStartUpLite.exe
    WinUpdatesList,SOFTWAREPORTABLEWinUpdatesListwul.exe
    Revo Uninstaller,SOFTWAREPORTABLErevouninstaller142revouninstaller.exe
    MyUninstaller,SOFTWAREPORTABLEMyUninstallermyuninst.exe
    Executor,SOFTWAREPORTABLEExecutorExecutor.exe
    ColorPix,SOFTWAREPORTABLEColorPix.exe
    Sunbird Portable,PortableAppsSunbirdPortableSunbirdPortable.exe
    Converber,SOFTWAREPORTABLEConverberConverber.exe
    Numerimal,SOFTWAREPORTABLENumerimalNumerimal.exe
    XAMPP Control Panel,PortableAppsXAMPPXAMPP.exe
    RegexBuddy,SOFTWAREPORTABLERegexBuddy3RegexBuddy.exe

    I have a few other bits and bobs on this 2Gb stick and it's constantly changing ... good old http://www.portablefreeware.com/

    if anybody wants the basic exe that enumerates pstart.xml and gives u this text list let me know... :-D

  5. That's genius!! I've had problems getting psexec to do some of the things I wanted to do but this works a treat... Thanks

    I'll basically use it now to tell users to log out of their machines over and over again... you see once a month we log everybody out and backup our servers here. This script is ideal... and a bit of a laugh too.

    Thanks again

  6. Thanks Coop you really helped me here and I appreciate it... I did a lot of googling but got nowhere.

    I usually use AUTOIT or AUTOHOTKEY or NIRCMD or FREEBASIC for scripting but NIRCMD is the one I use the least and I had forgotten all about the hide feature..

    Thanks again

    for anybody that wants to know here's the command line:

    NirCMD exec hide "path to batch file"

    in my case, it's

    "%logonserver%netlogonNirCMD" exec hide "%logonserver%netlogonlocal.bat"

  7. er yeah? I mean thanks and all for the info but I'm still stuck..

    I definitely saw on an old NT network before (when I was in High School) the boxes greyed out but I think that was done using POLEDIT and I'm not very good with that.. .to be honest as well on a mixed network I'd prefer not to touch it... But the more I think about it the more I think there's probably no way to do it unless somebody programmed a perfect little EXE... oh well

  8. Does anybody know a way to disable the X on a command prompt window when it is running a batch script..

    Is there a simple exe that can do it...

    I already use minwin.exe and that minimises the window but unfortunately people are still closing it.

    we have a mixed environment with a lot of old NT machines and not all of them run VBS scripts.

    The windows 2000 machines and newer all run the script in the background through active directory so they're not a problem.

    I was thinking about just writing an AUTOIT script to run the batch file.. Is that the best way?

  9. TEXTools (TCL.exe) - found at http://www.fireflysoftware.com/recommended/text_editors.htm seems to be the man for the job..

    Here are some examples of what TCL (Textools command line) can do:

    Removing a Section from an .INI File

    Translate quoted comma-delimited to fixed-width

    Translate fixed-width to quoted, comma-delimited

    Replace XML attribute values

    Selective Updates Using an Isolation Block

    Search and replace carriage returns

    Help screen to C++ string

    Help screen to Delphi string

    Create mailing labels from a list of addresses

    Cull unused database table fields

    I found a load of info at ezinearticles dot com but I can't post the link because the URL is blacklisted by Hak.5 -

    Should I be alarmed?

    Anyway hopefully the above tool should help solve my problem.

    I will report back if I get it to work..

  10. Ok I've decided on AUTOIT3 and Telnet - it seems to work fine... this is to run on one Machine only anyhow so I have no compatibility issues

    It seems to be working well and capturing all the stuff I need to a text file which I can parse easily with PHP - I'll post up all the code when I am finished..

    Kermit looks nice though but I can't get my hands on it here as it costs money

    http://www.columbia.edu/kermit/k95.html

  11. Yep that sounds like a plan alright.. I've tried the WRQ reflections and I recorded a macro and this is what I got:

    Sub cisco_test()
    ' Generated by the Reflection Macro Recorder on 07-20-2007 09:37:01.26.
    ' Generated by WRQ Reflection for UNIX and Digital 11.0.
        On Error GoTo ErrorHandler
    
        Dim username As String
        Dim password As String
        Dim password2 As String
    
        Const NEVER_TIME_OUT = 0
    
        Dim LF As String    ' Chr$(rcLF) = Chr$(10) = Control-J
        Dim CR As String    ' Chr$(rcCR) = Chr$(13) = Control-M
    
        LF = Chr$(rcLF)
        CR = Chr$(rcCR)
    
        username = "OLRO"
        ' Password was removed from this macro for security.
        ' Prompt for (what is assumed to be) a password.
        password = Session.GetPassword( _
            Prompt:="Password:", _
            HostUserName:=username)
        If password = "" Then Exit Sub
    
        ' Password was removed from this macro for security.
        ' Prompt for (what is assumed to be) a password.
        password2 = Session.GetLoginProperty( _
            Property:="Password2", _
            Prompt:="Password:", _
            HostUserName:=username, _
            Options:=rcIsPassword)
        If password2 = "" Then Exit Sub
    
        With Session
            If .Connected = False Then
                .ConnectionType = "TELNET"
                .ConnectionSettings = "Host 10.175.1.44"
            End If
            If .Connected = False Then
                .Connect
            End If
    
            .StatusBar = "Waiting for Prompt: Password:"
            .WaitForString LF & "Password: ", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit username
            .CapsLock = False
            .Transmit password, rcDecodePassword
            .Transmit CR
    
            .StatusBar = "Waiting for Prompt: OL_SRVRM_SW3550_1>"
            .WaitForString LF & "OL_SRVRM_SW", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
    
            ' String omitted because it might change:
            ' .WaitForString "3550_1", NEVER_TIME_OUT, rcAllowKeystrokes
    
            .StatusBar = "Waiting for Prompt: OL_SRVRM_SW3550_1>"
            .WaitForString ">", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
    
            .CommitLoginProperties
            .Transmit "enable" & CR
    
            .StatusBar = "Waiting for Prompt: Password:"
            .WaitForString LF & "Password: ", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit password2, rcDecodePassword
            .Transmit CR
    
            .StatusBar = "Waiting for Prompt: OL_SRVRM_SW3550_1#"
            .WaitForString LF & "OL_SRVRM_SW", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
    
            ' String omitted because it might change:
            ' .WaitForString "3550_1", NEVER_TIME_OUT, rcAllowKeystrokes
    
            .StatusBar = "Waiting for Prompt: OL_SRVRM_SW3550_1#"
            .WaitForString "#", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
    
            .CommitLoginProperties
            .Transmit "show mac-address-table" & CR
    
            .StatusBar = "Waiting for Prompt: --More--"
            .WaitForString LF & " --More-- ", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit CR
    
            .StatusBar = "Waiting for Prompt: --More--"
            .WaitForString LF & " --More-- ", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit CR
    
            .StatusBar = "Waiting for Prompt: --More--"
            .WaitForString LF & " --More-- ", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit CR
    
            .StatusBar = "Waiting for Prompt: --More--"
            .WaitForString LF & " --More-- ", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit " "
    
            .StatusBar = "Waiting for Prompt: --More--"
            .WaitForString LF & " --More-- ", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit " "
    
            .StatusBar = "Waiting for Prompt: --More--"
            .WaitForString LF & " --More-- ", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit " "
    
            .StatusBar = "Waiting for Prompt: --More--"
            .WaitForString LF & " --More-- ", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit " "
    
            .StatusBar = "Waiting for Prompt: --More--"
            .WaitForString LF & " --More-- ", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit " "
    
            .StatusBar = "Waiting for Prompt: --More--"
            .WaitForString LF & " --More-- ", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit " "
    
            .StatusBar = "Waiting for Prompt: --More--"
            .WaitForString LF & " --More-- ", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit " "
    
            .StatusBar = "Waiting for Prompt: --More--"
            .WaitForString LF & " --More-- ", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit " "
    
            .StatusBar = "Waiting for Prompt: --More--"
            .WaitForString LF & " --More-- ", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit " "
    
            .StatusBar = "Waiting for Prompt: --More--"
            .WaitForString LF & " --More-- ", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit " "
    
            .StatusBar = "Waiting for Prompt: --More--"
            .WaitForString LF & " --More-- ", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit " "
    
            .StatusBar = "Waiting for Prompt: --More--"
            .WaitForString LF & " --More-- ", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit " "
    
            .StatusBar = "Waiting for Prompt: --More--"
            .WaitForString LF & " --More-- ", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit " "
    
            .StatusBar = "Waiting for Prompt: --More--"
            .WaitForString LF & " --More-- ", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit " "
    
            .StatusBar = "Waiting for Prompt: --More--"
            .WaitForString LF & " --More-- ", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit " "
    
            .StatusBar = "Waiting for Prompt: --More--"
            .WaitForString LF & " --More-- ", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit " "
    
            .StatusBar = "Waiting for Prompt: OL_SRVRM_SW3550_1#"
            .WaitForString LF & "OL_SRVRM_SW", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
    
            ' String omitted because it might change:
            ' .WaitForString "3550_1", NEVER_TIME_OUT, rcAllowKeystrokes
    
            .StatusBar = "Waiting for Prompt: OL_SRVRM_SW3550_1#"
            .WaitForString "#", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit "                                                  " & CR
    
            .StatusBar = "Waiting for Prompt: OL_SRVRM_SW3550_1#"
            .WaitForString LF & "OL_SRVRM_SW", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
    
            ' String omitted because it might change:
            ' .WaitForString "3550_1", NEVER_TIME_OUT, rcAllowKeystrokes
    
            .StatusBar = "Waiting for Prompt: OL_SRVRM_SW3550_1#"
            .WaitForString "#", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit CR
    
            .StatusBar = "Waiting for Prompt: OL_SRVRM_SW3550_1#"
            .WaitForString LF & "OL_SRVRM_SW", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
    
            ' String omitted because it might change:
            ' .WaitForString "3550_1", NEVER_TIME_OUT, rcAllowKeystrokes
    
            .StatusBar = "Waiting for Prompt: OL_SRVRM_SW3550_1#"
            .WaitForString "#", NEVER_TIME_OUT, rcAllowKeystrokes
            .StatusBar = ""
            .Transmit "logout" & CR
            ' .WaitForString LF & "<Your 'TELNET' connection has terminated>" & CR & LF & LF, NEVER_TIME_OUT, rcAllowKeystrokes
        Exit Sub
    
    ErrorHandler:
        .MsgBox Err.Description, vbExclamation + vbOKOnly
    
        End With
        ' Recording stopped at 09:38:38.64.
    End Sub

    as you can see above it doesn't store the password (I know that's bad practice anyway) but I kinda need that facility... I presume I can add it in to the VB but to be honest I think I'm gonna need a one exe solution, none of this installing Reflections crap.... but we will see. I suppose putting reflections on the web server and getting it to do all the work from there.... I suppose I'm gonna have to brush up on me VB so...

    p.s. - Is "Extra" free? I doubt it.

  12. No I haven't tried that yet I'm only getting to grips with this batch programming (I've been at it for years but only started using FOR this year)

    to be honest I'm not sure what you mean by escaping the characters. I know it has something to do with getting rid of them and I've heard the term loads of times around the internet but I'm not sure how to do it. is it something to do with caret ^ symbol?

  13. ahah.... maybe the best way is to replace spaces with something like £-£ or something that shouldn't already be in the text and then replacing that again in the PHP with spaces... it would work but it's not great programming - I mean what happens when some crazy fool edits their registry and puts in £-£ - stranger things have happened.

    [edit]I'll probably write a quick EXE in Freebasic to do some of the replacing work but it just seems a bit messy[/edit]

  14. Oh yeah, I forgot to mention I even tried replacing spaces with %20 but that didn't work either

    set longdate=dd%20mm%20yyyy

    gives the following output:

    `longdate` = 'dd0mm0yyyy'

    I could write PHP to strip the zeroes but again this doesn't get my original REG string into the MySQL database, which is what I want to do.

    I could write loads of checking PHP and batch but I'm sure there's a better/more efficient way to do this.

    Any ideas?

  15. Hi all,

    I'm having problems here at work - I'm trying to setup a registry information reporting system that reports info on each client PCs registry back to a Web Server and into a MySQL database.

    This seems to be working fine except for some info from the registry that can have spaces, i.e. longdate from the registry comes out as "dd MMMM yyyy" or similar... This is fine if you paste it into a url in firefox or whatever, like test.php?longdate=dd MMMM yyyy but command prompt / dos doesn't like this behaviour (I'm using batch files + CURL on each client PC to send the info to the server).

    There's probably a quick fix to solve this problem using FOR but I can't figure it out.. I tried replacing the spaces with dashes but that will only work if the info in the registry string is as above, so as it can change I need a more flexible solution.

    at the minute I'm just echoing the SQL query rather than running it but you still get the idea.

    Here's go.bat that I use to start the process

    @ECHO OFF
    cls
    setlocal
    
    
    oldat03wupdatesNOW.EXE > %TMP%NOW.TXT
    
    for /F "tokens=1,2,3,4,5 delims=/ " %%i in (%TMP%NOW.TXT) do set d=%%i %%j %%k %%m
    for /F "tokens=1,2,3,4,5 delims=/ " %%i in (%TMP%NOW.TXT) do set day=%%i
    for /F "tokens=1,2,3,4,5 delims=/ " %%i in (%TMP%NOW.TXT) do set month=%%j
    for /F "tokens=1,2,3,4,5 delims=/ " %%i in (%TMP%NOW.TXT) do set dayofmonth=%%k
    for /F "tokens=1,2,3,4,5 delims=/ " %%i in (%TMP%NOW.TXT) do set timey=%%l
    for /F "tokens=1,2,3,4,5 delims=/ " %%i in (%TMP%NOW.TXT) do set year=%%m
    
    DEL %TMP%NOW.TXT
    
    if /i [%month%] == [Jan] set month=01
    if /i [%month%] == [Feb] set month=02
    if /i [%month%] == [Mar] set month=03
    if /i [%month%] == [Apr] set month=04
    if /i [%month%] == [May] set month=05
    if /i [%month%] == [Jun] set month=06
    if /i [%month%] == [Jul] set month=07
    if /i [%month%] == [Aug] set month=08
    if /i [%month%] == [Sep] set month=09
    if /i [%month%] == [Oct] set month=10
    if /i [%month%] == [Nov] set month=11
    if /i [%month%] == [Dec] set month=12
    
    
    
    
    FOR /F "tokens=2* delims=     " %%A IN ('oldat03wupdatesreg.exe QUERY "HKCUControl PanelInternational" /v sCountry') DO SET Country=%%B
    FOR /F "tokens=2* delims=     " %%A IN ('oldat03wupdatesreg.exe QUERY "HKCUControl PanelInternational" /v sCurrency') DO SET Currency=%%B
    FOR /F "tokens=2* delims=     " %%A IN ('oldat03wupdatesreg.exe QUERY "HKCUControl PanelInternational" /v sLongDate') DO SET LongDate=%%B
    FOR /F "tokens=2* delims=     " %%A IN ('oldat03wupdatesreg.exe QUERY "HKCUControl PanelInternational" /v sShortDate') DO SET ShortDate=%%B
    FOR /F "tokens=2* delims=     " %%A IN ('oldat03wupdatesreg.exe QUERY "HKCUControl PanelInternational" /v sTimeFormat') DO SET TimeFormat=%%B
    
    FOR /F "tokens=2* delims=     " %%A IN ('oldat03wupdatesreg.exe QUERY "HKEY_CURRENT_USERControl PanelPowerCfg" /v CurrentPowerPolicy') DO SET PowerPolicy=%%B
    
    FOR /F "tokens=2* delims=     " %%A IN ('oldat03wupdatesreg.exe QUERY "HKLMSOFTWARENetwork AssociatesTVDShared ComponentsVirusScan Engine4.0.xx" /v "szVirDefVer"') DO SET VirusDefs=%%B
    FOR /F "tokens=2* delims=     " %%A IN ('oldat03wupdatesreg.exe QUERY "HKLMSOFTWARENetwork AssociatesTVDShared ComponentsVirusScan Engine4.0.xx" /v "szEngineVer"') DO SET VirusEngine=%%B
    
    
    
    echo LONG DATE in batch file=%longdate%
    echo SHORT DATE in batch file=%shortdate%
    echo.
    echo.
    
    
    SET URL="http://localhost/it2/test.php?datestamp=%year%%month%%dayofmonth%&timestamp=%timey%&hostname=%computername%&username=%username%&country=%Country%&currency=%Currency%&longdate=%LongDate%&shortdate=%ShortDate%&timeformat=%TimeFormat%&powerpolicy=%PowerPolicy%&virusdefs=%VirusDefs%&virusengine=%VirusEngine%&end=1"
    
    "oldat03wupdatescurl.exe" -B -0 %URL%
    
    
    :end

    here's test.php

    <?php
    require("config.php");
    $tablename="reginfo";
    
    echo "LONGDATE IN PHP=".$_REQUEST['longdate']."nn";
    echo "SHORTDATE IN PHP=".$_REQUEST['shortdate']."nn";
    
    
    
    if ( ($_REQUEST['currency'] == "€")or ($_REQUEST['currency'] == "Ç") ){$_REQUEST['currency']="€";}
    
    
    echo "<PRE>nn";
    
    
    $sqltest = "UPDATE `$tablename` SET ";
    foreach ($_REQUEST as $key => $value) {$sqltest.= "`$key` = '$value'n,";}
    $sqltest= rtrim ($sqltest,",");
    $sqltest.= " WHERE `macaddress` = '".$_REQUEST['macaddress']."' LIMIT 1";    
    
    
    echo $sqltest;
    ?>

    Here's the output in Firefox / IE if I just paste the url into the address bar, which works fine:

    LONGDATE IN PHP=dd MMMM yyyy SHORTDATE IN PHP=dd/MM/yyyy
    
    UPDATE `reginfo` SET `datestamp` = '20070719'
    ,`timestamp` = '14:42:18'
    ,`hostname` = 'mypcname'
    ,`username` = 'jsmith'
    ,`country` = 'Ireland'
    ,`currency` = '€'
    ,`longdate` = 'dd MMMM yyyy'
    ,`shortdate` = 'dd/MM/yyyy'
    ,`timeformat` = 'HH:mm:ss'
    ,`powerpolicy` = '3'
    ,`virusdefs` = '4.0.5070'
    ,`virusengine` = '5.1.00'
    ,`end` = '1'
    ,`PHPSESSID` = '8l3f649g8aihsf8bleaeqloos6'
     WHERE `macaddress` = '' LIMIT 1

    Here's the output in command prompt when I use go.bat

    LONG DATE in batch file=dd MMMM yyyy
    SHORT DATE in batch file=dd/MM/yyyy
    
    
    LONGDATE IN PHP=dd
    
    SHORTDATE IN PHP=
    
    <PRE>
    
    UPDATE `reginfo` SET `datestamp` = '20070719'
    ,`timestamp` = '15:40:16'
    ,`hostname` = 'mypcname'
    ,`username` = 'jsmith'
    ,`country` = 'Ireland'
    ,`currency` = 'Ç'
    ,`longdate` = 'dd'
     WHERE `macaddress` = '' LIMIT 1

    Now I have tried adding inverted commas around the URL, like this:

    "oldat03wupdatescurl.exe" -B -0 "%URL%"

    but that didn't work - obviously DOS doesn't like the ampersand so I tried replacing every ampersand with caret + ampersand( ^& ) but that didn't work either.

    Is there any way to get the Command prompt to ignore the spaces (if there are any spaces)

    If anybody can point me in the right direction, any help would be much appreciated.

    I'm using curl for windows, here's the Version output

    curl 7.16.0 (i586-pc-mingw32msvc) libcurl/7.16.0 zlib/1.2.2

    Protocols: tftp ftp telnet dict ldap http file

    Features: Largefile libz

    [edit] Obviously I intend to add a hell of a lot more registry info to this when I get the space problem sorted [/edit]

  16. Thanks, I'll check that out... it's funny though I just checked out their webpage and the favicon looks a lot like the WRQ one (i.e. WRQ reflections client)  , yep it's the same one... We have the WRQ reflections client 11 here and it has macro support and VBA so I think maybe that's the one to use... I've tried to get into it though and I'm just hitting the start hurdle... If I could get it to do the simplest of things using VB then I could work from there and get it to do exactly what I want but looking through the help and googling gave me nothing.. I'm impatient though so I'll try to have another look. Thanks again.

  17. Hi all,

    I was wondering how you guys do your telnet scripting? if any?

    I.e. we have a lot of jetdirect print servers and cisco switches to administer and I'd like to automate some common tasks and I'd like to be able to request specific info from the switches etc.

    I've done a bit of research on this and tried a few different solutions.

    One of the things I've tried is the Telnet scripting tool - TST10.exe - http://mike-tech.com/article.php?gif=cisco&article=72 but it no longer has a website and info on it is pretty scant.

    I can get it to wait for keystrokes etc. and send keystrokes but it's not like it's a fully fledged scripting/programming language. I need to be able to write a program that can handle any of the possibilities, i.e. if you have to press return at the end of a page of info , and there's five pages of info on one router and only two on another... I'm sure you get what I mean... I'd love to be able to send keystrokes etc. with VBS and the windows scripting host but I'm not sure where to start...

    I have found after a lot of searching that maybe I should learn PERL but I am extremely impatient and I just want a quick fix solution and I don't want to have to install yet another compiler or whatever. Plus it's a work thing and I don't have to do it but I'd like to improve my PHP/MYSql based I.T. info system. - we look after 600 PCs here and my colleagues aren't exactly uber-hax0rs they're worse than me so I had to build a web based system that uses aida32/winaudit csv files (saved to a network share) and then a freebasic(like QBASIC) exe that simply converts the CSV into variables that I pass to a .php file on the server via curl which then puts the info into the mysql database, but I also save the CSV to the server and the server checks the CSV files against the MYSQL data once a day against what was entered, for security etc. Anyway to cut a long story short I'm keeping to text based stuff rather than the ODBC because a lot of our computers are quite instable, or are running NT4 or whatever...

    I can do basic code in PHP, VBS, BATCH and BASIC only (file input/output,string searching,if else,for loops,you know, the easy stuff) but I should be able to turn my hand to most coding as long as it doesn't involve compilers that you need to include libraries and stuff like that. Like C for example... I'm sure C is amazing but I haven't got time to figure out why a simple "HELLO WORLD" app won't compile.

    Anyway rant over.... if anybody can help a n00b out he'd much appreciate it.

  18. Hi all,

    maybe somebody can help me with this one:

    I bought an AverMedia A700 (PCI Hybrid DVB-S and TV and FM card).

    I installed the drivers + software from the disk and when I try to use the AverTV software or

    any other software like ProgDVB for example,

    The exe crashes and gives up details as ntdll.dll - I did a few searches and came up empty until today:

    I tried the following windows update but to no avail:

    Update for Windows XP (KB896626)

    Brief Description

    An issue has been identified with your Windows-based system that may cause problems when a DirectShow TV tuner program is tuned to receive a Digital Video Broadcasting (DVB) video stream on a computer that is running Microsoft Windows XP Service Pack 2.

    http://www.microsoft.com/downloads/details...;displaylang=en

    I am severely lost on this issue and any help is much appreciated.

    here are some links to product info

    Link1

    Link2

    Btw I am seriously considering Linux options here but I don't think the card has much support

×
×
  • Create New...