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. So are you trying to suggest now that the file you've just posted is what you are actually using? I would strongly suggest that is not the case
  2. As usual and as jaclaz alluded to you have not provided us with the genuine use for your script. There is no way at all that the file you have posted is what you are actually doing! You have decided that you know better than the people you are asking for help, and that is both incorrect and rude.
  3. Yes there is; don't enable delayed expansion! SETLOCAL DISABLEDELAYEDEXPANSIONFOR %%A IN (!) DO ( SET Line=%%A CALL SET Line=%%Line:!={#}%% CALL ECHO=%%Line%%)
  4. What happens if you change it like this: @echo offsetlocalecho=Now configuring the Remote Shell Serviceecho=Stopping the Servicesc stop RshSvcecho=Enter the Password for Admin account or ENTER to leave it as Adminset /p "adminpwd = "if not defined adminpwd (set adminpwd=Admin)sc config RshSvc obj= "Admin" password= "%adminpwd%"echo=Starting the servicesc start RshSvc
  5. Used the Purchase Paid Subscriptions link in the MSFN Need Your Help Announcement Topic. Hope that's okay!
  6. My biggest issue so far is with the mobile version (android), when you choose a Topic it lets you know how many pages there are, but I can find no way of getting to page seventeen without going from page one through every other page in order first!
  7. There is no definitive answer here it is often dependant upon the specific .exe, But generally, for installers from a batch file, there is no reason to prepend with cmd, even less reason to prepend with cmd and start and unless you have issues simply invoking the installer directly, no real reason to use start.
  8. If you ever have difficulty locating one of your posted in Topics again, click on the drop down arrow at the top left which says Signed in as blockie and select My Content. By default you should get a page listing all of the Topics you've participated in with the most recently posted to at the top.
  9. I was being as vague as your question because there is no answer for unspecified programs, only for specified ones. You didn't specify any therefore we cannot provide you a definitive answer. As a general rule for running GUI applications from a batch file neither start or cmd have much purpose for you.
  10. Topic moved/split, as a result of your acceptance of a non batch related solution. Incidentally there is already a way out for the user using the shutdown command!
  11. You're not starting unspecified programs, you're specifying them!
  12. @blockie Why can you not just use the shutdown command alone? At 22:30 /every:M,T,W,Th,F Cmd /c Shutdown -s -t 60shutdown the PC at 10:30 PM on each weekday with a 60 second countdown.
  13. Well done for trying different options, solving your problem and letting us know the outcome. I didn't include the case insensitive switch because I figured you would have created MyList.txt directly from your master directory which I expected would contain file names in the correct case. I fgured that Microsoft would of course maintain that case throughout their various language versions of each update. A better option would be to have a MyList.txt which contains only the seven digit Knowledge Base numbers, KBnnnnnnn.
  14. It's not often that I see a VBS question and deliberately ignore a VBS solution, but at this time I see no good reason to ignore a Windows Command Script. SCRIPT.CMD @IF %COMPUTERNAME:~,3%' EQU HAC' REGEDIT /S GENESIS.REG The two single quotes/apostrophes aren't necessary, they are included because they are harmless but improve the look of the code under the forum formatting scheme
  15. Yzöwl

    Bonjour

    Welcome to the MSFN. Please note that this is an English speaking Forum, please ensure that any further posts conform.
  16. allen2 has already pointed you with the obvious solution, FINDSTR /V. As long as you have a local file listing Your updates, lets call it MyList.txt, then the following should suffice: @FOR /F "TOKENS=*" %%# IN ('DIR/B *WINDOWSXP-KB*.EXE^|FINDSTR/VG:MYLIST.TXT') DO @ECHO/%%# IS NOT FROM MY LIST!
  17. Similar previous topic from 2005!
  18. I would suggest that you'd have been better advised to post the 'bat' file which isn't working instead of the code which is!
  19. I also stated that it was a clue, not the answer!
  20. Is that marvellous adviceonly if you intend to install updates from a batch script if you intend to run any batch script best practice for running Windows.
  21. Silly question.... Where do I find this version of cabarc? Thanks Please see the clue!
  22. So you want to set the 'working' directory to that of the input media file: PUSHD %~dp1 Then set your temporary playlist name: SET PLS="%RANDOM%.PLS" It appears you want your playlist but with the input file at the top: ECHO %~nx1 1>%PLS% Now it looks as if you want all files in that directory except for the one already chosen and any created playlist: DIR /B /A-D | FINDSTR /E /V /I /C:"%~nx1" /C:".PLS" 1>>%PLS% Play the playlist from MPlayer, already in %PATH% MPLAYER -PLAYLIST %PLS% Delete used playlist: DEL %PLS% As you say, there is no direct way of shuffling/randomising lines within a file, it can be done but is not a straight forward solution. The simplest solution would be to sort your DIR output using the /S switch which will order according to file size. (In most cases that should be sufficient to randomise the playlist): replacement line DIR /B /A-D /O-S | FINDSTR /E /V /I /C:"%~nx1" /C:".PLS" 1>>%PLS% I hope this helps you out a little.
  23. There is an alternative, find and download version 1.1, (when the files disallowed for redistribution were still included), or try the alternative mentioned here.
  24. Two sequential calls to GlobalMemoryStatus are not guaranteed to return the same information, it is recommended to use GlobalMemoryStatusEx instead. If you wanted to know the installed memory then perhaps using GetPhysicallyInstalledSystemMemory, (Win Vista+) will do what you want. For simple scripting the following should show you what's installed in your RAM slots: Command Prompt WMIC MEMORYCHIP GET capacity, devicelocator Powershell Prompt Get-WmiObject CIM_PhysicalMemory | select capacity,devicelocator | ft -AutoSize
×
×
  • Create New...