Jump to content


  • Posts

  • Joined

  • Last visited

  • Donations


About Valerie

Valerie's Achievements



  1. Win XP Home. Way back in the good old days some versions of XP did not permit access to Safe Mode without entering an Admin password even if a password had never been set. No password (including leaving the entry blank) would be accepted. The fix was a Reg Edit which stopped Safe Mode asking for any password at all. Unfortunately I cannot remember what the Reg Edit was. Anyone got better powers of recall than mine please? Thanks.
  2. Jaclaz & Wyzöwl. Thank you for continuing with the thread, much is to be learned when members of your standing choose to discuss a topic on open forum. My reason for opting for VBS is to make the script global rather than local, I'm not sure if the return from %time% is fixed globally or can be set locally in some other format. Anyways, the project will be a work-in-progress for some time, am now looking to use the VBS Timer function instead of the Time function. V.
  3. Thank you Yzowl. Here's the script I'm working on and which works as far as my query goes although the results have not yet been proved. @echo off setlocal enabledelayedexpansion cls :: Get the start time :: ------------------ call :GetTime StartHour StartMins StartSecs pause cls :: Get the finish time :: ------------------- call :GetTime StopHour StopMins StopSecs :: Calculate elapsed time :: ---------------------- call :Elapsed %StartHour% %StartMins% %StartSecs% %StopHour% %StopMins% ^ %StopSecs% Hours Minutes Seconds elsecs echo Hours=!hours! Minutes=!minutes! Seconds=!seconds! Elapsed secs=!elsecs! :: Add leading 0 to single digit values (for display purposes only) :: ---------------------------------------------------------------- set cnt=1 :loop set vars=StartHour StartMins StartSecs StopHour StopMins StopSecs for /f "tokens=%cnt%" %%1 in ("%vars%") do ( if !%%1! lss 10 set %%1=0!%%1! set /a cnt+=1 ) if %cnt% LSS 7 goto loop :: Display outcomes :: ---------------- echo.&echo.&echo.&echo.&echo. echo Start time=%StartHour%:%StartMins%:%StartSecs%. echo Stop time=%StopHour%:%StopMins%:%StopSecs%. echo. echo Elapsed seconds=%ElSecs% echo. echo Elapsed time=%Hours% hrs %Minutes% mins %Seconds% secs. exit /b :: Subs :: ---- :GetTime set vbs=%temp%\tmp.vbs ( echo ThisTime=Time echo WScript.Echo Hour(ThisTime^) ^&" "^& ^ Minute(ThisTime^) ^&" "^& ^ Second(ThisTime^) )>%vbs% for /f "tokens=1-3" %%a in ('cscript //nologo %vbs%') do ( set hh=%%a set mm=%%b set ss=%%c ) del %vbs% endlocal&set "%1=%hh%"&set "%2=%mm%"&set "%3=%ss%"&goto :EOF :Elapsed setlocal set /a ElapsedSecs=3600*%4+60*%5+%6-(3600*%1+60*%2+%3) if %ElapsedSecs% LSS 0 set /a ElapsedSecs=%ElapsedSecs%+(24*3600) set /a h=(%ElapsedSecs%/3600) set /a m=(%ElapsedSecs%/60)-60*%h% set /a s=%ElapsedSecs%-60*(%ElapsedSecs%/60) endlocal&set %7=%h%&set %8=%m%&set %9=%s%&set elsecs=%ElapsedSecs%&goto :EOF Note the final line of the :Elapsed sub. If that line is changed to: endlocal&set %7=%h%&set %8=%m%&set %9=%s%&Shift&set %9=%ElapsedSecs%&goto :EOF or endlocal&set %7=%h%&set %8=%m%&set %9=%s% Shift set %9=%ElapsedSecs%&goto :EOF it appears not to return the %ElapsedSecs% content to Elsecs.
  4. Win XP SP.3+ When a sub is Called and more than 9 command line parameters are passed to the sub is it possible to somehow Shift the command line parameters to allow the use of the 10th (and subsequent) parameters? e.g. something like this: Call :SubName %input1% %input2% %input3% %input4% %input5% output1 output2 output3 output4 output5 then as last line of the sub: Endlocal&set %6=%hh%&set %7=%mm%&set %8=%ss%&set %9=%tot%&SHIFT&set %9=%final%&goto :eof Obviously using Shift in that position doesn't work for me, is there another way to shift the parameters please?
  5. Cluberti - Yes, the script runs without error when Cmd /k is used. Thanks to all for your interest and responses. V.
  6. The following script works as expected but I'd like an explanation of why the command CMD /C is necessary for it to run if the drive list contains drive a. This works: @echo off cls setlocal for %%1 in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do ( cmd /c if exist %%1:\ ( fsutil fsinfo drivetype %%1: ) ) This hangs with a "no disk in drive" error message. @echo off cls setlocal for %%1 in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do ( if exist %%1:\ ( fsutil fsinfo drivetype %%1: ) )
  7. Win XP Home. SP3+ I have received a single .rtf file which consists of five concatenated .rtf files, the headers and tails having been deleted after concatenation. I would like to print the file in pages to suit individual files, can I edit the file to insert end-of-page markers then perhaps print using Wordpad? Thanks V.
  8. Windown XP Home SP.3 updated. Above is a quote from this site describing Resident vs Non-Resident data. I don't fully understand what is meant by file characteristics although I take it to mean such things as record length, fixed vs random record length etc. Can someone point me in the right direction please?
  9. Valerie


    Thank you, I had Googled but obviously not well enough and needed a wakeup call.. V..
  10. Valerie


    Windows XP Home SP.3+ After Ntldr has established from Boot.ini which install of Windows to boot does Ntldr load the OS using Registry entries or does Ntldr "hand over" control to another routine from Windows\System32 for that routine to load the OS? In other words when does Ntldr's contribution finish?
  11. Thank you. Successfully deleted the Windows installed in C: and installed XP using the install cd. Setup detected the Windows system on D: and created the correct Boot.ini.
  12. Situation: Vista installed on C: partition, Win XP on D: Is it possible to boot to D: and format C: then install a later version of XP on C: and retain multibooting capability by editing Boot.ini or by some other means? Unfortunately it's not known which OS, Vista or XP, was installed first.
  13. Home edition SP.3+ Is it possible to alter settings in an installed system by using a live cd or other method(s) to access the installed system? Example: If a system blue screens at startup when the "Automatically Restart" box is checked can that setting be altered (unchecked) using a live cd or perhaps slaving the system drive and accessing on another pc? Thanks.

  • Create New...