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. Here is a batch file template, just insert the 'Service names' of the services you want set [example] :: Automatic set Aut=Dhcp lanmanworkstation SharedAccess Themes wuauserv :: Disabled set Dis=lanmanserver RemoteAccess seclogon srservice WZCSVC :: Manual set Man=COMSysApp EventSystem Netman RasAuto TermService @echo off&setlocal enableextensions set Aut= set Dis= set Man= for %%a in (%Aut%) do sc config %%a start= auto for %%d in (%Dis%) do sc config %%d start= disabled for %%m in (%Man%) do sc config %%m start= demand endlocal&goto :eof
  2. Is it not ImmuneEngine
  3. @ coucou All you need to do is use the template I've already posted! Example just put everything, (from your file), between echo Found CD-Rom as drive %CDROM% and exit in the appropriate place. <Edit> Alternatively, if you don't want to use the 'label' method, below is the template for 'CD loaded' method @echo off&setlocal enableextensions&call :findrive if '%CDROM%' equ '' echo/CD-ROM not found&ping -n 4 127.0.0.1>nul&goto endit :: put your commands below here (%CDROM% variable is set) :: do not add or replace anything below here goto :endit :findrive for /f "tokens=1,2 delims=\ " %%a in ('fsutil fsinfo drives^|find /v "Drives"') do call :findcd %%a goto :eof :findcd fsutil fsinfo volumeinfo %1|find "CDFS">nul 2>&1&&set CDROM=%1&goto :eof :endit endlocal&goto :eofRemember it's still only for XP and above </Edit>
  4. This works fine for me DetachedProgram = cmd.exe Arguments = "/C START A:\MyBatch.cmd"I surmise that since no path is given to cmd.exe that the detached program may need to be either in the %PATH% or a full path given to it. If this still doesn't work, you could try a similar idea to my working one DetachedProgram = cmd.exe Arguments = "/C START <switches> <Drive>:\<Path>\<somefile.exe>"
  5. @ DarkShadows It redirects standard output, STDOUT, (1>nul), and standard error, STDERR, (2>nul), to nul. STDOUT, channel 1, is the default therefore doesn't require the channel number stipulating, (>nul). You can use >nul 2>nul which will redirect each channel to its own nul Or you can use >nul 2>&1 which redirects STDERR to the same nul as the STDOUT channel. As for the (&), (&&) & separates multiple commands on one command line. && causes the command following this symbol to run if the command preceding the symbol is successful.
  6. Here is a basic template utilising my CD Label method (XP /2003) @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) :: 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 :eofHope this simplifies it for everyone!
  7. @ DarkShadows Here's a couple you may find more useful then: This one will only give the drive letter if there's a CD loaded @echo off&Mode 55,3&Color f2&Title Script By YzOwl 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 volumeinfo %%a:|find "CDFS">nul 2>&1&&echo Your CD-ROM drive^(s^) -^> %%a:\ ) ping -n 4 127.0.0.1>nul&goto :eof This one will only give the drive letter of a volume with a label of 'UWXPCD' @echo off&Mode 55,3&Color f2&Title Script By YzOwl 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 volumeinfo %%a:|find "UWXPCD">nul 2>&1&&echo Your specified drive is -^> %%a:\ ) ping -n 4 127.0.0.1>nul&goto :eof<Edit> Changed description of second example to avoid confusion. </Edit>
  8. If you had said you wanted Messenger on Automatic, it would also have been corrected in my reply. The above sounds to me as if you were trying to prevent it from being on Automatic still. From XP sp2 the messenger service is disabled by default, but as you didn't state your service pack level or setup, how were we supposed to help?
  9. The syntax is incorrect! HKLM,%Services%\Messenger,Start,0x10001,4
  10. Just another slight change gunsmokingman, because if you have more than one cd-drive the first one will disappear before you have time to see it! @echo off&Mode 55,3&Color f2&Title Script By Yzöwl for %%a 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 ( fsutil fsinfo drivetype %%a:|find "CD-ROM">nul 2>&1&&echo Your CD-ROM drive^(s^) -^> %%a:\ ) ping -n 4 127.0.0.1>nul&goto :eof
  11. This one is for Windows XP It will tell you your CD-Drive letter(s), without the needing any disk in it @echo off for %%a 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 ( fsutil fsinfo drivetype %%a:|find "CD-ROM">nul 2>&1&&echo/%%a: ) pause&goto :eof
  12. Basically, the way it worked for me is this If you do not integrate the V5 into your disk, when you go to WU it will offer you V6 If you integrate V5 into the disk, then WU uses that and doesn't offer you the V6 updateyet!
  13. With regards peoples attitudes, I couldn't agree more Thauzar, remember what happened when some 'fool' said that the earth wasn't flat! As far as the evaluations are concerned, I still asked first On the subject of whether or not it 'works', everyones system usage is different and they all require different things from their software. From my questions, although rhythmnsmoke was unable to understand our system, and due to the considerable outlay involved in the bespoke document management system we use, I have concluded that it will be some time before his innovative product will be suitable. That said for smaller networks and in an environment not built around coding, I would be only too pleased to try this system out. If it doesn't work as stated, underperforms or is just unsuitable, then so be it, but without proof we shouldn't be too quick to judge. My only major concern is the lack of a guide price for the home version. I understand that it may not 'ready' for public use as yet, but we all know that Photoshop is the greatest product of its type in the world, but at a price. Value will sell the product before features, quality and support.
  14. fixed VAD thanks, next time I'll read it in preview mode first!
  15. Even easier, you don't need to premake the folder, just use the correct switches in your command ECHO Moving ShortCuts... XCOPY "%USERPROFILE%\Start Menu\Programs\Winamp\Winamp.lnk" "%ALLUSERSPROFILE%\Start Menu\Programs\Audio Players" /Y /I /Q ECHO. ECHO Deleting Shortcuts... RD /S /Q "%USERPROFILE%\Start Menu\Programs\Winamp" ECHO. EXIT.
  16. Replacing characters in a variable, copy and paste the following into your text editor, save as xample.cmd and double click it @echo off&setlocal enableextensions set MyVar=Some String echo Your variable is %MyVar% set NewVar=%MyVar: =_% echo Your variable is now %NewVar% set OneMore=%NewVar:S=% echo Your variable this time is %OneMore% pause&endlocal&goto :eofNow look at the output on the screen So looking at the code you quoted, what I am doing is %AllUsersProfile%\* » C:\Documents and Settings\All Users\* therefore %AllUsersProfile:\All Users=%\* » C:\Documents and Settings\* I have replaced the string 'after the colon and before the equals' "\All Users" with the string 'after the equals' "", in effect removing \All Users from the variable.
  17. Also if you had looked in Windows Tips 'n' Tweaks, you would have seen this sticky
  18. Using the search facility brought up this for deluser.exe
  19. I have posted this one before, it may not be what you want, but this one run as cleanup.cmd will get rid of all the desktop shortcuts @echo off&setlocal enableextensions for /d %%a in ("%AllUsersProfile:\All Users=%\*") do if exist "%%~a\Desktop\*" del /q "%%~a\Desktop\*.lnk" endlocal&goto :eofIt should be on three lines only!
  20. For win2k just start the batch with @echo off setlocal enableextensions you should end it with endlocal goto :eof correct but not strictly necessary <Edit>I've added a couple of extras to this one, there are other combinations though @echo off setlocal enableextensions cls echo. echo I am file (not yet expanded): %0 echo My Expanded File Name: %~n0 echo My Expanded Extension: %~x0 echo My Expanded Name and Extension: %~nx0 echo My Expanded Drive: %~d0 echo The Expanded Root of My Drive: %~d0\ echo Some Other Expanded Path on My Drive: %~d0\SomeOtherPath echo My Expanded Path: %~p0 echo My Expanded Drive and Path: %~dp0 echo My Expanded full filename and path %~f0 echo My Expanded short filename path %~dps0 echo. pause endlocal goto :eof</Edit> <Edit2> Although not related to XPCDs, this one gives you a nice little example using the above @echo off&setlocal enableextensions md "%~dp0test" copy %0 "%~dp0test" del %0Put this one on your Desktop naming it test.cmd, double click it, and keep your eyes on it at the same time. </Edit2>
  21. Try one of the following: REGEDIT4 ;Do not allow Messenger to run on the PC [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Messenger\Client] "PreventRun"=dword:00000001 REGEDIT4 ;Do not allow Messenger to run for User [HKEY_CURRENT_USER\Software\Policies\Microsoft\Messenger\Client] "PreventRun"=dword:00000001
  22. Well that was my point, we'll need Administarator to move everything to a location for 300+ people non-stop all day in order for them to test then move back then recode again then back, debugging will take years!The Document Management System is the single most important and expensive thing we use, every user uses it as policy, and it cost us tens of thousands of pounds to have developed. All documents of every type are tracked, searched, revised, redlined and backed up etc. through it. As I stated, it appears that unless my company works with nothing other than basic low risk file types, it will be impractical to run. A problem is that my coders although far cleverer than I at those things are incapable of maintaining an IT infrastructure, and are possibly more dangerous to my system than the snotty 17 year old school leavers with no prior PC experience. They will for that reason never be allowed full administrative privileges, but obviously due to the nature of their work need some. Your product would basically give them all or none and increase the IT departments workload thousandfold. <Edit> My company is a multi million dollar international organisation. However, when it come to selling something to us you sell it to the Managers, in this case IT Manager, they decide it's suitability, cost it, create a plan for possible implementation and then sell it to the Executives, that's what they're get paid for. You will never come into contact with them, if you did the Managers would be sacked, that is how it works!</Edit>
  23. Files are 'checked out' of the 'Document Management' system, and worked on locally until 'checked back in'. All files code will be tested several times every day during its creation /modification, by users not administrators. Regardless of where the files are stored during the day, code will be in and out of memory, whilst testing, either debugging in the IDE or real world testing on smaller portions of a file before appendaing to the master file. If your program does as you say, I will have to only have the shield up on the clerks PCs, or effectively open it up so far as it becomes ineffective.
  24. Iffor %%i 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 if exist %%i:\cd.txt set CDROM=%%i: :Install_drive cls ECHO Your CD-rom drive is: %CDROM%then if exist %CDROM%WINNT.SIF DEL %CDROM%WINNT.SIF ping -n 1 127.0.0.1>nul rem --------------------------------------------- rem WRITE NEW ANSWER FILE rem --------------------------------------------- ECHO;SetupMgrTag >>%CDROM%WINNT.SIF <snip>You are deleting from and echoing to the optical drive, therefore how did you test it?
  25. So far so good, but if my 90% of my network users spend almost all their login time creating code Scripts MS Office Macros & Templates Programming Web design /solutions Tthe shield will only be able to go up when we go home and we will need a 'standard' product during the day!
×
×
  • Create New...