Jump to content

Yzöwl

Patron
  • Posts

    4,113
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United Kingdom

Everything posted by Yzöwl

  1. replacing the above with: SET "_OSV="FOR /F "TOKENS=1* DELIMS=[" %%A IN ('VER') DO (SET "_OSV=%%B" CALL SET "_OSV=%%_OSV:* =%%" & CALL SET "_OSV=%%_OSV:~,3%%")IF %_OSV% LSS 5.1 GOTO :EOFIF %_OSV% LSS 6.0 (ECHO= Installing Internet Explorer 8 IE8-WindowsXP-x86-ENU.exe /passive /update-no /no-default /norestart) ELSE ( ECHO= Internet Explorer 8 Not Required & ECHO= Disabling Hibernation POWERCFG -h off)
  2. What happens in Windows XP if you type the following at a console window prompt: If Not Exist %SystemDrive%\Users MD %SystemDrive%\UsersDoes it magically become a new version of Windows? When you fix a mistake in a script it helps if you post the updated version in order that those who wish to help are furnished with the same information as yourself. So when you say that you were installing and updating new programs, did you mean that you were setting up new PC's from a network! So in answer to my question the script itself is named Install V1.1.bat, and you were hoping for a self delete function! Which suggests to me that the script is being run locally on each PC and not part of the network set up you mentioned I would suggest that OS changes / customisation are performed from a different script than program / application updates and installations. When are you setting the PC's to sleep after 30 minutes? Would that not be done at the same time as the disabling of hibernation?
  3. Initial comment, whilst it may be okay in your ten workstation environment, searching for a static path C:\Users is most certainly not a good idea for determining Operating System. Are you aware that your AVG executables contain file-name spaces? Is one of the installations enabling hibernation? if not why are you disabling it as part of a software installation script? What is Install V1.1.bat? how is it relevant? and are you expecting to delete it from this script?
  4. I do hope that both parties are sure of their facts... ...I'm staying out of this, but I know which one is correct!
  5. Nobody has yet answered my basic question! What is the point of the flow of this Topic? A Windows XP key changing script on Windows 7
  6. Can somebody please tell me why UAC is an issue for a script intended for Windows XP?
  7. So it looks like this! Will I ever need to visit this page again!
  8. If the problem is that the URL exceeds the 126 character limit, have you considered using a URL shortening service?
  9. My recollection is that the OS has a 256 character limit whilst command.com has a 126 character limit.
  10. Initial comment: You have provided us with a non relevant working script and no information whatsoever regarding your problem program! Side Note: That is not the best way to determine Operating System Architecture. (not that it matters since you don't appear to be using the variable created anyhow)!
  11. Untested example based upon the last solution I gave: @ECHO OFFSETLOCAL ENABLEEXTENSIONSPUSHD X:\MYDIR\SUBDIRFOR /F "TOKENS=*" %%# IN ('DIR/B/A-D TSP1PayStatus*.*') DO (IF %%~z# NEQ 0 CALL :RF %%#)POPDENDLOCALGOTO :EOF:RFSET "_FN=%*"REN %_FN% TSP%_FN:*1=%.ediDoes the same thing as the original except that it appends the .edi extension and ignores all files of zero bytes.
  12. I must admit that for an administrator of a company with a $115 billion turnover it does strike me as a little odd that your knowledge relating to this subject is so lacking.
  13. There is no problem, I did not design the executable to install anything! I used my working script from post #17 and added a few ECHO's then wrapped it as an executable to show that the problems you are having are your own fault and not mine! My script from #17 with additional ECHO's has been added to this post in order to prevent you from having problems with copy/paste operations, please run it without wrapping it as an executable. BEWARE It will install the Software on your machine! If it works then try to 'compile it' withyour software and try it again, then post back your results. <EDIT /> Download removed - no longer required.
  14. First let me start by saying that you have once again ignored the advice you are being given! The code you have just asked me to edit in post #25 is code that was superseeded in post #17. I will not be providing any more changes to my code until you make an effrot to be a responsible Member of this Community. I am going to provide you with simple step by step instructions, if you want help you will need to follow them exactly as asked! (If anyone else provides instructions before you have satisfied my requirements they will be removed) This is your last chance! Post either a screenshot or full output from the wrapped executable I posted when run
  15. I've attached the script I posted earlier which you ignored, I have wrapped it as an .exe and have also tested it on a Windows OS with success. The script will not actually install anything, it will only tell you what it would do if I hadn't prevented it. <EDIT /> Removed download - no longer required
  16. If you continue to ignore my posts you will receive no further help and I will ask that you no longer use any of the code I have provided.
  17. Since I do not currently run a Windows OS, my scripts are not tested! Try this slightly altered version: @ECHO OFFSETLOCALSET "M=Oasdsd.exe"SET "S=Microsoft .NET Framework 4.0\Setup.exe"SET "F="SET "N=HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\"SET "_="FOR /F %%A IN ('MOUNTVOL^|FINDSTR [C-Z]:\\') DO (IF EXIST "%%A%M%" SET "_=%%A")IF NOT DEFINED _ GOTO :EOFIF NOT EXIST "%_%%S%" GOTO :EOFFOR %%A IN (Client Full) DO ( REG QUERY "%N%%%A" /V INSTALL >NUL 2>&1 && SET "F=Yes")IF NOT DEFINED F CALL :PRE:MAINIF DEFINED F ("%_%%M%")GOTO :EOF:PRESTART "" /WAIT "%_%%S%" /q /norestart && (SET F=Yes)<EDIT /> If you intend to wrap my script into an executable, I ask that you credit me in the file properties of that executable.
  18. Your original requirement told us you were using .NET for x86 and x64, because you appeared to be using a file named setup.exe, my assumption is that you have extracted the files from the official installer. No longer using the official installer means that you would need to be able to provide a switch to the setup routine depending upon the architecture of the host OS, I've done that for you.. If you do not need to check for architecture, learn to provide better information in your requests in future then change the bottom four lines to read: :PREIF EXIST "%_%%S%" (START "" /WAIT "%_%%S%" /q /norestart && (SET F=Yes))Also if you are having difficulty with something, please make a better attempt at explaining the specifics. perhaps remove the echo from the script, capture the output and post it here!
  19. I'm not sure of your intention but it appears to me that you are trying to map COM2, (which doesn't exist in your query), to COM1 (which already exists). I thought that the idea of this command was to be able to utilise ports other than COM1, COM2, COM3 and COM4 because they were the only ones supported by MS-DOS programs. CHGPORT COM6=COM1 maps COM6 to COM1 such that COM6 can be utilised by the DOS program as COM1.
  20. It's inconsistent even with the line directly before it! That said, the RegWrite method in vbscript does not support writing binary data greater than four bytes so perhaps AuitoIt has a similar restriction. You may also be better advised to use the APPDATA environment variable as opposed to USERPROFILE with \Local Settings\Application Data
  21. I've already posted a similar reply here, and read it, but for some reason it doesn't exist anymore! The message posted by ricktendo64 in that other place is most certainly not a solution. It doesn't use the OP's file, installs a different executable and version of .NET framework and doesn't make any attempt to check for the 'prerequisite' existence first.
  22. Which pre-requistite are you checking for, the client profile: Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client Value: Install, Type: REG_DWORD, Data: 1 or the full version: Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full Value: Install, Type: REG_DWORD, Data: 1 Regardless of that fact, AhrimanSefid, and the fact you haven't acknowledged my last post, your script really needs a rewrite. ...try changing the name of your .NET installer directory From: "Microsoft .NET Framework 4.0 32 & 64bit" to: "Microsoft .NET Framework 4.0 x86_64" Then try this: @ECHO OFFSETLOCALSET "M=Oasdsd.exe"SET "S=Microsoft .NET Framework 4.0 x86_64\Setup.exe"SET "F="SET "N=HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\"SET "_="FOR /F %%A IN ('MOUNTVOL^|FINDSTR [C-Z]:\\') DO (IF EXIST "%%A%M%" SET "_=%%A")IF NOT DEFINED _ GOTO :EOFFOR %%A IN (Client Full) Do ( REG QUERY "%N%%%A" /V Install >NUL 2>&1 && SET F=Yes)IF NOT DEFINED F CALL :PRE:MAINIF DEFINED F ("%_%%M%")GOTO :EOF:PREIF EXIST "%_%%S%" (SET B=x%PROCESSOR_ARCHITECTURE:~-2% IF %B% EQU x86 (IF DEFINED PROCESSOR_ARCHITEW6432 SET B=x64) START "" /WAIT "%_%%S%" /%B% /q /norestart && (SET F=Yes))You'll have to decide for yourself if you require the START "" /WAIT in the bottom line!
  23. This should work: Set objShell = CreateObject("Wscript.Shell")strHome = InputBox("Provide your chosen Homepage:", "Homepage", "http://www.google.com/")If strHome = "" Then WScript.QuitEnd IfstrCommand = "%COMSPEC% /c homepage.bat " & chr(34) & strHome & chr(34)objShell.Run strCommandstrHome will be the input parameter %1 in homepage.bat Example homepage.bat​ @echo off & setlocalif %1' EQU ' (echo= Syntax: %~n0 [Chosen Homepage] ) else (call :SUB %1)ping -n 8 127.0.0.1 1>nulgoto :eof:SUB(set _=%~1)echo( Your chosen homepage wasecho( %_%
×
×
  • Create New...