Jump to content
MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. ×


  • Posts

  • Joined

  • Last visited

  • Donations


About MHz

  • Birthday 08/27/1965

Contact Methods

  • Website URL

Profile Information

  • OS
    Windows 7 x64

Recent Profile Visitors

2,503 profile views

MHz's Achievements



  1. shorterxp, DT 3.46 setup is an executable which extracts an msi file to the %temp% directory. To get the msi: * Execute DT executable. * Click Install button. * Look in %temp% folder for an msi file with approximately 5 numbers or letters and a size of 813 KB. * Copy the msi file and rename the copy to something more meaningful. * Cancel the install. You can now use the msi file with arguments like /qn to perform a install silent. DT 4 is quite different and needs to be handled by a different method.
  2. Suitable compile directives added and added #RequireAdmin directive if run as not compiled. Scripts are still based on SlowView version 1.0 released in 2003. Silent Script: slowview_silent_updated.au3 Automated script: slowview_auto_updated.au3 Setting the variable $do_not_create_shortcuts to True will avoid creating shortcuts and thus no folder created in the Start Menu. If True, checks the "Do not create shortcuts" checkbox. Setting $move_wizard_window to False will not move the 2nd wizard window off the main screen. This script below has a fix for missing uninstall entries when selecting no shortcuts. slowview_auto_updated_uninstall_fix.au3 Installer: Get from brennig.com SlowView 1.0 - (January 2003, works on Windows 95/98/NT and newer)
  3. Your 1st line seems original. A person, like yourself, saying something and then using a contradiction will always be quite disturbing. This seems like a recurring pattern for you. Using a method of insult and then using a just kidding, but ..., however ..., and any other alternation does not hide the insult. To use a copy and paste of a movie quote used by Archie from the movie "The Fish called Wanda" is quite disingenious. So is the copy and pasted quote OK with me? I am not sure how to score such a non genuine statement from you. Silliness with the movie quote does not pass as sincere regret to me. I guess the joke is on me. MS-DOS exists in the Win 9x OSes as mentioned here. It details of how to boot into MS-DOS. So, it existed in Win 9x in one form or another and most possibly complies as an OS. So, as MS-DOS in 9x as being not a complete OS in its own right is very much in doubt considering an OS can be almost any operating environment.
  4. Sure , I was referring to the "usual plot" : http://www.msfn.org/board/topic/173609-btach-set-vast-with-echo-doesnt-work/#entry1096004 just kidding.... jaclaz I accept it as an insult else why the link? MS-DOS is a complete OS and QBasic is a part of it as I already mentioned. The comparison to batch is rather dry for my taste. Nice try again.
  5. jaclaz, QBasic is a part of MS-DOS 7.1 and offers a prompt. So, a nice try. Besides, VBScript did not exist in the era of MS-DOS AFAIK. Not much did exist for Microsoft at that time. Hard times then and I do not miss it. The more a programming language can do, the more flexible I find in using it. MS-DOS was/is differcult because of its limitations. Edit: Hmm, typing Microsoft adds a link to the Microsoft store. Such irony.
  6. A little more advanced BASIC was to use QBasic. Example test.bat could use: C:\DOS71\QBASIC /run test.basand test.bas in which QBasic interprets could use: REM Get the users input.INPUT "Enter the system Serial Number"; reply$REM Show the value of the reply.PRINT reply$REM Return to the system.SYSTEMSome examples shown in this PDF on page 14 for retrieving input from the user in QBasic. If you wanted the bas file compiled then the MS-DOS compatible version of FreeBasic could be used.
  7. Here are some specs gathered for your PC2 mainboards. The ASRock mainboard has various versions. Later versions are Gigabyte LAN. If you have version 1.0 or 2.0, then no Gigabyte LAN. http://www.asrock.com/mb/NVIDIA/ALiveNF7G-HD720p%20R1.0/ - Realtek PHY RTL8201CL - Speed: 10/100 Ethernet - Supports Wake-On-LAN - Supports PXE http://www.asrock.com/mb/NVIDIA/ALiveNF7G-HD720p%20R2.0/ - Realtek PHY RTL8201CL - Speed: 10/100 Ethernet - Supports Wake-On-LAN - Supports PXE http://www.asrock.com/mb/NVIDIA/ALiveNF7G-HD720p%20R3.0/ - Gigabit LAN 10/100/1000 Mb/s - Giga PHY Realtek RTL8211B - Supports Wake-On-LAN - Supports PXE http://www.asrock.com/mb/NVIDIA/ALiveNF7G-HD720p%20R5.0/ - Gigabit LAN 10/100/1000 Mb/s - Giga PHY RTL8211B - Supports Wake-On-LAN - Supports PXE The MSI mainboard is mentioned as Gigabyte though mentions at the bottom of the page that specs vary depending on area... , so could have different versions. http://msi.com/product/mb/880GMA-E45.html#hero-specification - Realtek PCI-E GbLAN controller 8111DL - Integrated Fast Ethernet MAC and PHY in single chip - Supports 10Mb/s, 100Mb/s and 1000Mb/s - Compliance with PCI-Express Bus specification v1.0a These mainboards may have settings for the LAN speed in the Bios though I would expect 1000Mb/s as default. Cat 5E cables are regarded as good for Gigabyte LAN. If your Router is saying that the LAN adapter is 100Mb/s and you are sure it is a Gigabyte, then I would check if a Bios update is available. Check for a LAN and chipset updated drivers.
  8. Depends on how much you can do by script. Manually doing it would be a PITA. Codepage affects the extended ASCII. This depends on the system language default that is set. It is not a BOM that defines codepage, but rather file encoding. If you look at the _FileWrite() function, you may noticed that I used FileGetEncoding() which gets the encoding that the file uses. I do not know probably half of those extensions and whether it is safe to use the Regular Expressions on those as they are designed for an ini file type structure. You may need to make Regular Expressions in different functions to be called by the detected file type.
  9. Have a look here. At least in Windows 7 is where your themes are saved. %LocalAppData%\Microsoft\Windows\ThemesTry customizing your theme in the Personalization panel, save it and then look at that path in Explorer. This may give your a theme that has been processed by the Personalization panel process. I have no understanding of your dll or the msstyles files and thus is out of my scope.
  10. You should be able to use *.* as first parameter and a folder as 2nd parameter. This is so long as you have only text based files in the source directory as no file type filtering is done by the script. Another way could be to rename the files adding a temporary extension i.e. file1.ini to file1.ini.text, file2.inf to file2.inf.text etc. Do a reformatini.exe *.text destfolder and then once done, rename the files removing the temporary extension. CMD For loop and using Rename should be able to do the mass file renaming. As for some whitespace which could be removed. The ini file format usually is not so spacious in its default API usage. i.e. Try this test. Requires reformatini.exe for the comparison. ; Create a default ini layout.IniWrite('test1.ini', 'section 1', 'key1', 'value1')IniWrite('test1.ini', 'section 1', 'key2', 'value2')IniWrite('test1.ini', 'section 2', 'key1', 'value1')IniWrite('test1.ini', 'section 2', 'key2', 'value2'); Clean the ini.RunWait('reformatini.exe test1.ini test2.ini'); Read the characters of the files into a variable.$test1 = FileRead('test1.ini')$test2 = FileRead('test2.ini'); Show some results.MsgBox(0x40000, @ScriptName, _ 'Size of test1 = ' & StringLen($test1) & @CRLF & @CRLF & _ $test1 & @CRLF & @CRLF & _ 'Size of test2 = ' & StringLen($test2) & @CRLF & @CRLF & _ $test2 & @CRLF _)I get this output. Size of test1 = 78[section 1]key1=value1key2=value2[section 2]key1=value1key2=value2Size of test2 = 88[section 1]key1 = value1key2 = value2[section 2]key1 = value1key2 = value210 characters are excess whitespace in the cleanup file as it adds spaces around the = character and adds spacing before section name lines. Something to consider. Minor changes to the Regular Expressions can change that result.
  11. The extra braces is forcing everything within them to be evaluated. In that example, they serve no meaningful purpose. Take care with something like that pattern as paths in your text files can have multiple spaces or tabs as an example which could break those paths. Adding (*UCP) at the beginning of each Regular Expression pattern may change the behavior of how certain characters are matched. I.e. \h may match unicode horizontal spaces as well as the ASCII + Extended ASCII horizontal spaces. So you can change this function to: Func _CleanIniFileContent($sContent) ; Trim whitespace from the end of each line. $sContent = StringRegExpReplace($sContent, '(*UCP)(?m)^\h*(.+?)\h*$', '\1') ; Remove horizonal whitespace on lines that have no other content. $sContent = StringRegExpReplace($sContent, '(*UCP)(?m)^\h+$', '\1') ; Remove empty lines. $sContent = StringRegExpReplace($sContent, '(*UCP)(\r\n|\n){2,}', '\1') ; Fix the spacing between the key values and the data values. $sContent = StringRegExpReplace($sContent, '(*UCP)(?m)^([^;#[])(.*?)\h*=\h*(.*)$', '\1\2 = \3') ; Trim the spacing from the quoted data values. i.e. " string " to "string". $sContent = StringRegExpReplace($sContent, '(*UCP)(?m)^([^;#[])(.+?) = "\h*(.+?)\h*"$', '\1\2 = "\3"') ; Add empty lines before section names. $sContent = StringRegExpReplace($sContent, '(*UCP)(?m)^(\[.+\])$', @CRLF & '\1') ; Trim both ends of the content. $sContent = StringStripWS($sContent, 0x3) Return $sContentEndFuncThis is untested so it may work OK or it may need to be updated to handle the different behavior. Edit1: Added extra info about using just \h+ in a pattern. Edit2: Created another version. v1.1. See below.
  12. Reshacker, hmm, not 64 bit compatible AFAIK. A shame really as it is renowned as being such a great program in its prime time. Even good programmers and their programs may need to retire. Cool. 1200 files, major BLEEP! By the time you have edited a couple of dozen or so, you could have a script to do the rest in seconds. Yeah, yeah, yeah, takes some known knowledge,though something to strive for. If Ultraedit is complaining about not being a DOS coded file then perhaps it thinks it is a binary file. A plain text file does not have a header yet alone a DOS header. Something strange may be going on there.
  13. Your welcome. I made it as a CUI i.e. console program so it can be used in a CMD script something like: if not exist subfolder md subfolderfor %%A in (*.ini) do reformatini.exe "%%~A" "subfolder\%%~nxA"Actually, you could do the above with it compiled as a GUI program though you would get no output in the CMD window. Look, I do not expect you to be a (professional,serious,whatever) programmer. Learning programming is like climbing a ladder. You go step by step. The rate of the climb is up to you. Do it as steep as you can handle. What I have learnt is not by magic but determination. You can probably be there one day. About regular expressions, I considered I could do it in 1 regular expression, I come close, but kept failing. So, bleep it, I did it over several expressions. Maybe not the best but got it done and if a bug is present then usually I can track it down to one of the expressions or needing another expression. PCRE may need unicode i.e. UCP turned on though I do not handle unicode characters in the patterns so hopefully it should not be needed. If I sound a little too advanced for you then say, hey, can you break this down. I will try though I may have lost some prior memory but I can only try to remember how I knew little about programming i.e. I may need to be reminded.
  14. Certainly something with Regular Expression support is suitable. Surprised that Perlscript cannot do it. But hey, AutoIt has Perl Compatible Regular Expression support . This is what I came up with. Many here seem to like using CMD scripts so I made this AutoIt script to be compiled as a CUI program. I am using AutoIt at present which should be compatible with the latest version. ; Name of compiled file.#pragma compile(Out, 'reformatini.exe'); CUI program. Set to False for a GUI program.#pragma compile(Console, True); Bit x86|x64. Set to true for 64 bit program.#pragma compile(x64, False); AutoIt version. Tested on this version.#pragma compile(FileVersion,; What this file is meant for.#pragma compile(FileDescription, 'Reformat ini file content. Use /?, -? or -h for help.'); A name for the program.#pragma compile(ProductName, 'Ini File Reformat Tool'); Version for this program.#pragma compile(ProductVersion, $CMDLINE[0] > 2 Then ; More then 1 parameter is not supported. ConsoleWriteError('Only maximum of 2 parameters is allowed.' & @CRLF) Exit 1ElseIf $CMDLINE[0] = 2 Then ; Read direct from the ini file. $sContent = FileRead($CMDLINE[1]) If @error Then ConsoleWriteError('Failed to read the file.' & @CRLF) Exit 2 EndIfElseIf $CMDLINE[0] = 1 Then Switch $CMDLINE[1] Case '/?', '-?', '-h' ; Help ConsoleWrite( _ 'Ini File Reformat Tool' & @CRLF & _ 'Outputs the reformatted content to the console or to a file.' & @CRLF & @CRLF & _ 'Pass 2 parameters as 1st being path to the source file and 2nd' & @CRLF & _ 'to the destination file. The file encoding of the destination file' & @CRLF & _ 'will be based on the source file encoding.' & @CRLF & _ ' i.e. "' & @ScriptName & '" source.ini destination.ini' & @CRLF & @CRLF & _ 'Or, pass 1 parameter as being the path to the source file.' & @CRLF & _ ' i.e. "' & @ScriptName & '" source.ini' & @CRLF & @CRLF & _ 'Or, pipe to this file.' & @CRLF & _ ' i.e. Type source.ini | "' & @ScriptName & '"' & @CRLF & @CRLF & _ 'Exitcode:' & @CRLF & _ ' 1 Only maximum of 2 parameters is allowed.' & @CRLF & _ ' 2 Failed to read the file.' & @CRLF & _ ' 3 No parameters and no input provided.' & @CRLF & _ ' 4 Failed to open the file for write.' & @CRLF _ ) Exit Case Else ; Read direct from the ini file. $sContent = FileRead($CMDLINE[1]) If @error Then ConsoleWriteError('Failed to read the file.' & @CRLF) Exit 2 EndIf EndSwitchElse ; Read from stdin. $sContent = '' Do $sContent &= ConsoleRead() Until @error If $sContent == '' Then ConsoleWriteError('No parameters and no input provided.' & @CRLF) Exit 3 EndIfEndIf; Clean the content from the ini file.$sNewContent = _CleanIniFileContent($sContent); Output the cleaned content.If $CMDLINE[0] = 2 Then ; Open the output file for erase and then write in the same encoding as the source file. $hWrite = FileOpen($CMDLINE[2], FileGetEncoding($CMDLINE[1]) + 0x2) If $hWrite = -1 Then ConsoleWriteError('Failed to open the file for write.' & @CRLF) Exit 4 Else ; Write the new content to the output file. FileWrite($hWrite, $sNewContent & @CRLF) FileClose($hWrite) EndIfElse ; Just output the new content to console. ConsoleWrite($sNewContent & @CRLF)EndIfExitFunc _CleanIniFileContent($sContent) ; Remove empty lines and trim whitespace from the end of each line. $sContent = StringRegExpReplace($sContent, '(?m)^\h*(.+?)\h*$', '\1') ; Remove horizonal whitespace on lines that have no other content. $sContent = StringRegExpReplace($sContent, '(?m)^\h+$', '\1') ; Remove empty lines. $sContent = StringRegExpReplace($sContent, '(\r\n|\n){2,}', '\1') ; Fix the spacing between the key values and the data values. $sContent = StringRegExpReplace($sContent, '(?m)^([^;#[])(.*?)\h*=\h*(.*)$', '\1\2 = \3') ; Trim the spacing from the quoted data values. i.e. " string " to "string". $sContent = StringRegExpReplace($sContent, '(?m)^([^;#[])(.+?) = "\h*(.+?)\h*"$', '\1\2 = "\3"') ; Add empty lines before section names. $sContent = StringRegExpReplace($sContent, '(?m)^(\[.+\])$', @CRLF & '\1') ; Trim both ends of the content. $sContent = StringStripWS($sContent, 0x3) Return $sContentEndFuncHere is a cmd script used to test it and the output. Use the executable like any one of these commands: Syntax: reformatini.exe /? | -? | -h Syntax: reformatini.exe source.ini [destination.ini] Syntax: type source.ini | reformatini.exe | is alternate except in the last command. [ ] is optional. Let me know how it works for you. Edit: Updated about the | not being an alternate in the last command which may have been confusing otherwise.
  15. Welcome Vespian, Here is something that may help. It is just the part that you requested help with. @echo offsetlocal enabledelayedexpansionrem Ensure regData is undefined now so it can be tested later if it has been defined.set "regData="rem Token 2 is %%A, which is expected to be REG_SZ. Used only to get to token *, which is %%B, which is all of the data value.for /f "tokens=2*" %%A in ( 'reg query "HKLM\SOFTWARE\Network Associates\ePolicy Orchestrator\Agent" /v ePOServerList') do set "regData=%%~B"rem If regData is not defined, then seems no good continuing?if not defined regData goto :stoprem Show the value of regData. Use delayed expansion as you can expect pipe characters in the string.echo regData=!regData!rem If substitution fails, then equality is true.if "!regData:CMCSU-EPO-01.cict.local=!" == "!regData!" goto :stoprem You only want to install framepkg.exe once. Need a flag variable to decide this i.e. if not %installed% ..."framepkg.exe" /Install=Agent /Silent:stoppauseendlocalgoto :eofAs mentioned in a comment, you only want to install framepkg.exe once so create a variable to use as a flag. Once the script installs framepkg.exe, then set the flag variable to a value i.e. 1. The you can test the variable later for value of 1 and not install if true. Use an initial value i.e. 0.

  • Create New...