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. Well unfortunately, your particular example may not work with the template I gave due to the space in the key name, therefore try echo off&setlocal enableextensions set keyname=HKCU\Software\EasyBoot Systems\UltraISO\5.0 :: put the value name of the registry key after the equals symbol below set valuename= for /f "tokens=1,3* delims= " %%a in ('reg query "%keyname%"^|findstr/i "%valuename%"') do set mynewvar="%%~b" echo/Data Value %mynewvar% is now set to variable mynewvar endlocal&goto :eofi.e. add the quotation marks to the %keyname% in your reg query command
  2. You shouldn't need a key, just delete: %UserProfile%\SendTo\Mail Recipient.MAPIMail
  3. You could try Keyname: HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\<Your Email Client Name>\DefaultIcon Value Name: (default) Value: This is what needs changing
  4. @ MrChris Here is a template using reg.exe with an example added to help you understand echo off&setlocal enableextensions :: put the registry key you want to read after the equals symbol below set keyname=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run :: put the value name of the registry key after the equals symbol below set valuename=nwiz for /f "tokens=1,3* delims= " %%a in ('reg query %keyname%^|findstr/i "%valuename%"') do set mynewvar="%%~b" echo/you have set a new local variable named mynewvar as %mynewvar% endlocal&goto :eof Note The space after delims= is a Tab
  5. Windows Registry Editor Version 5.00 ; Use Windows classic folders [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer] "ShellState"=hex(3):24,00,00,00,33,88,01,00,00,00,00,00,00,00,00,00,00,00,00,00,\ 01,00,00,00,0D,00,00,00,00,00,00,00,03,00,00,00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] "WebView"=dword:00000000<Edit> Just replace the incorrectly formatted & #58; with a colon and ensure that ShellState is on two lines only, the first ending with a backslash </Edit>
  6. @ Wesmosis If you posted your entire cmd file, in an appropriate format, it may help, although my first guess is that you are lacking a 'set' statement for your CDROM variable.
  7. REN (or RENAME) <drive:>\<path>\filename1 filename2You cannot however, specify a new drive or path for filename2. Therefore in your case, I would suggest you use MOVE <drive:>\<path>\filename1 <drive:>\<path>\filename2as already stated by Achdine Note also that in most of our systems the prompting for confirmation in batch files is suppressed therefore negating the requirement to use the /Y switch on the move, copy and delete commands.
  8. All the registry keys are added at T13, but they are not run until logon. The runonceex keys can be run by commandline too: rundll32.exe iernonce.dll,RunOnceExProcess You could try this command if you wish to attempt to have the keys run at a different time.
  9. What Alanoll is saying is that your runonceex.cmd is using an executable, which doesn't exist as part of your OS. REG ADD this is reg.exe add or if not in %path%, drive:\path to\reg.exe add You will therefore need to add the REG.EXE to your CD, then either copy it to an appropriate location in %PATH%, (from your $OEM$), or reference its location on the CD as part of the commands in your runonceex.cmd file
  10. Have you looked in the 'Default User' profile folder? <Edit> All of the following lnks are found there: Remote Assistance Tour Windows XP Command Prompt Program Compatabiltiy Wizard Synchronize Windows Explorer </Edit> Here is an example of a way round not knowing for sure in which profile your file /folder is located @echo off&setlocal enableextensions for /f "delims=" %%a in ('dir /b/s/ad "%AllUsersProfile%\..\*"') do if exist "%%~a\Start Menu" call :gothere "%%~a\Start Menu" endlocal&goto :eof :gothere pushd %1 :: your profile dependent stuff [changed] here del /q/s "New Office Document.lnk" 2>nul del /q/s "Open Office Document.lnk" 2>nul del /q/s "Set Program Access and Defaults.lnk" 2>nul del /q/s "Windows Catalog.lnk" 2>nul del /q/s "Windows Update.lnk" 2>nul del /q/s "Remote Assistance.lnk" 2>nul del /q/s "Tour Windows XP.lnk" 2>nul del /q/s Synchronize.lnk 2>nul del /q/s "Program Compatability Wizard.lnk" 2>nul del /q/s "Command Prompt.lnk" 2>nul rd /s/q "Programs\Accessories\System Tools" 2>nul rd /s/q "Programs\Accessories\Communications" 2>nul popd&goto :eof
  11. You've just looked up the xcopy command and decided not to use that instead of MD and COPY echo d|xcopy "C:\Install\file.dat" "C:\1\2\3" /ihq >nulAll should be one line.
  12. @ Doc Symbiosis Another method @echo off&setlocal enableextensions for %%a in (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 ( fsutil fsinfo drivetype %%a:|find "No such Root Directory">nul 2>&1&&call :check %%a: ) :: put your commands below here %drvlet% is set :: example echo/%drvlet% endlocal&goto :eof :check if not defined drvlet set drvlet=%1&goto :eofI have started at C: since I'm fairly sure you aren't wanting A: or B: <Edit> Usual stuff about only for XP and newer </Edit>
  13. Interesting idea, probably because I am very anti-piracy and love to mess with batch files. Stick me on the list too
  14. Also, have you tried: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer] "NoStartMenuMFUprogramsList"=dword:00000001
  15. It sounds too easy, what's the catch Please explain, where you are wanting to perform the search, one drive, many locations, etc. Whether hidden and read only need including, not recommended; which OS is it to be compatible with and at what stage of setup you are wanting it to work.
  16. I think you main problem is that the variable %g is returning a filename with path and extension, whereas the queried subkey has no extension will be the filename only. You would therefore need to use %%~ng in your reg query command. Here is a modified version of what you gave us for /f "delims=" %%g in ('dir /b/a-d "%cddrive%\hotfixes\%osv%\%lang%\*.exe"') do ( reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Hotfix\%%~ng" /v Installed|find "0x1">nul||start "" /wait ..... )
  17. Did you make sure that you had a blank line at the end of your file? Also if you were to just replace the first line, which I suspect you did, that wouldn't necessarily mean the file you now have isn't unicode. I think you would need to copy the text into notepad and make sure that when saving the file you are using ANSI encoding.
  18. Yes, as stated, it will open the 'special folder', %userprofile%\My Recent Documents. My guess is that the clue is in the fact it is a 'special folder'. You can also simply type my documents without needing quotes to get %userprofile%\My Documents, or favorites to get %userprofile%\Favorites and temp to get %windir%\Temp for example.
  19. This batch file should get you the OS, as long as you are using the original system supplied command processor. WHATOS.BAT @ECHO OFF VER | FIND /I "95" >NUL IF NOT ERRORLEVEL 1 GOTO :IS95 VER | FIND /I "NT" >NUL IF NOT ERRORLEVEL 1 GOTO :ISNT VER | FIND /I "98" >NUL IF NOT ERRORLEVEL 1 GOTO :IS98 VER | FIND /I "2000" >NUL IF NOT ERRORLEVEL 1 GOTO :IS2K VER | FIND /I "MILLENNIUM" >NUL IF NOT ERRORLEVEL 1 GOTO :ISME VER | FIND /I "XP" >NUL IF NOT ERRORLEVEL 1 GOTO :ISXP GOTO :NOOS :IS95 REM PUT YOUR COMMANDS HERE FOR WINDOWS 95 GOTO :ENDOF :ISNT REM PUT YOUR COMMANDS HERE FOR WINDOWS NT GOTO :ENDOF :IS98 REM PUT YOUR COMMANDS HERE FOR WINDOWS 98 GOTO :ENDOF :IS2K REM PUT YOUR COMMANDS HERE FOR WINDOWS 2000 GOTO :ENDOF :ISME REM PUT YOUR COMMANDS HERE FOR WINDOWS ME GOTO :ENDOF :ISXP REM PUT YOUR COMMANDS HERE FOR WINDOWS XP GOTO :ENDOF :NOOS ECHO YOU ARE USING AN UNKNOWN OS PAUSE GOTO :ENDOF :ENDOF EXIT
  20. You should be able to del /f /a /q Something like this @echo off&setlocal enableextensions cmdow @ /hid set togo=scrnsave ss3dfo ssbezier ssflwbox ssmarque ssmypics ssmyst sspipes ssstars sstext3d net user aspnet /delete del /f/a/q "%systemroot%\*.bmp" for %%a in (%togo%) do call :noscr "%%a.scr" del /q "%allusersprofile%\start menu\windows update.lnk" del /q "%allusersprofile%\start menu\set program access and defaults.lnk" del /q "%allusersprofile%\start menu\windows catalog.lnk" rd /s/q %systemdrive%\drivers rd /s/q %systemdrive%\install endlocal&goto :eof :noscr pushd %systemroot%\system32 for /f %%b in ('dir /b/s/a-d %1^2^>nul') do del /f/a/q "%%b" popd&goto :eof
  21. If you are in the UK with its default date and time format, you could use this one liner if not exist "c:\logs\%username%\%date:~0,2%%date:~3,2%%date:~8,2%\%time:~0,2%%time:~3,2%" md "c:\logs\%username%\%date:~0,2%%date:~3,2%%date:~8,2%\%time:~0,2%%time:~3,2%"<Edit> If you want the format like this 06-07-2005\20-53, then use this one liner instead if not exist "c:\logs\%username%\%date:/=-%\%time:~0,2%-%time:~3,2%" md "c:\logs\%username%\%date:/=-%\%time:~0,2%-%time:~3,2%"</Edit>
  22. And just another thing IF EXIST %%i:\win51ip.SP2 aint going to work either!
  23. I'd prefer my signature to look like your example, not the one in your sig. I tried it and it looked like the one in your sig; where's the images?
  24. Most obvious one KeyboardLayout="United Kingdom"If you are using an $OEM$ structure and trying to add stuff from cmdline.txt etc., you will also require OemPreinstall=YesI think you may also have to use AutomaticUpdates=Yesand prevent the updates using a tweak later in your setup.
  25. Firstly, you haven't used either of the templates I posted! Secondly, some of the commands you are adding are incorrect. Thirdly, my own preference, lose all the comment lines, (i.e those starting with REM). <Edit> First of all let me apologize to readers of this thread for answering an off topic question here. Here is an idea of how I would use the template @echo off&setlocal enableextensions :: enter your CD label below e.g. set lab=UWXPCD (case insensitive) set lab= call :findrive :: put your commands below here (%CDROM% variable is set) pushd %CDROM%\Software\WPI\common cmdow.exe @ /hid start VideoChanger.exe 1024x768x32@85 -q start /wait fonts\fontinstaller.exe regedit /s wpi.reg cd.. start /wait WPI.hta popd del /s/q "%userprofile%\desktop\*.lnk" shutdown.exe -r -f -t 20 -c "Reboot in 20 sec..." :: do not add or replace anything below here endlocal&goto :eof :findrive set drv=c d e f g h i j k l m n o p q r s t u v w x y z for %%a in (%drv%) do ( fsutil fsinfo volumeinfo %%a:|find /i "%lab%">nul 2>&1&&set CDROM=%%a: ) goto :eof </Edit>
×
×
  • Create New...