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 basic batch example using sc.exe, it checks if the services are running, if not starts them. @echo off &&setlocal set tocheck=servicename1 servicename2 servicename3 for %%a in (%tocheck%) do ( sc.exe query %%a | find /i "state" | find /i "4 running" >nul if not errorlevel 0 sc start %%a ) endlocal &&goto :eofJust replace the required 'Service Names', servicename1 servicename2 servicename3 with the ones you wish to check. It isn't ideal for your requirements but may help you out!
  2. Using the current, (critical), list on the first page for Windows XP Pro SP2, (with only WMP10 integrated), I am asked to update KB887472 - Security Update for Windows Messenger First of all, will adding MSN 7, as stated on the fist page, negate this update? Also is there any way to add the required software, (activex control), so that I don't need to download anything first, before using the Windows Update site.
  3. You could just move all shortcuts from one location to another from your cleanup.cmd.
  4. Thanks for that evilvoice
  5. If you click on the example link I gave in my first post, and possibly read back my message(s), you will see what I'm talking about, that needs fixing!Code inside the 'code' boxes is being altered, most noticeable with hex strings in reg file code, i.e. in that example & #58; & nbsp; and improper line wrap
  6. Any chance someone could upload these some place else. The way my ISP works, I have never been able to download anything from the rapidshare site!
  7. Sorry for the misunderstanding Alanoll, that's what I was trying to say, I cannot believe that after all this time, I had not noticed, the difference. Especially after the last change over as highlighted in my above post, when there was a pronounced colour difference in the header of the boxes. xper, does that mean it's in hand, or, 'we aint going to fix it', but don't worry!
  8. COPY C:\OLDdir\*.* C:\NEWdirIf you try to copy multiple files to a subdirectory that does not exist, using copy, the subdirectory will not be created, you would need to first 'make' the 'directory', (MD), therefore IF NOT EXIST C:\NEWdir MD C:\NEWdir COPY C:\OLDdir\*.* C:\NEWdirNow if C:\OLDdir cannot be found, you will get an error and will have created a directory for no reason, therefore IF EXIST C:\OLDdir ( IF NOT EXIST C:\NEWdir MD C:\NEWdir COPY C:\OLDdir\*.* C:\NEWdir )I hope this helps to show you how you 'build' a batch script using a series of small steps!
  9. Let me try to explain the idea, as I understand it, from the original questioner. You are creating an unattended install onto a PC, this PC previously has had the OS installed, but had redirected the location of My Documents, for at least one user to another drive /partition. When the new install is invoked, the registry of that install will not have the path of the existing Documents directory, only the default %userprofile%\My Documents. Now I know we could put the hard coded data into a redirection script at T12, but that would mean every PC we used the CD on would need to have My Documents in the same drive\path\name. What is requested is a script which will scan all drives, from cmdlines.txt and look for a common 'tagfile' which absolutely guarantees the location of the existing data. This location can then be applied to the user shell folders registry key. This would be easy if everyone used the %username% in their redirected documents folder name, and also set up the new install with the same user names, or if at the very least, the desktop.ini was unaltered by replacing folder icons etc. Using the %username% is a perfect solution when the folder is originally redirected, because all users will still have their own unique folder named <username> Documents. Then as I said in my original assessment, your script would just have to search drives for a folder named "%username% Documents", and add the match to the registry. The %username% idea would be my generic solution, which would cover all PCs I have to work on, but will not suit everyone because people have all customized their folder and /or location differently. I cannot think of a 'one size fits all' solution, other than prompting the user for the location in the script.
  10. you would probably need to use %username% in that scenario, since the profile directory will not have the redirected Documents directory.Also I still think that the desktop.ini wil be the most common denominator, reagardless of any user defined folder name. Although in my case I don't have any, hence the reason why I haven't wrote up a batch for testing yet.
  11. Now the headers are completely different colours, so how come I've never noticed all gunsmokingman's scripts in quote boxes...thanks
  12. You chould be able to create a batch file that will search drives, (as in the CDROM example) look for a folder name ending with Documents search in this folder for a file, (probably desktop.ini as this will have information unique to the folder) When a match is found add the information to the User Shell Folders registry key
  13. Saw you on the forum...so bump!
  14. Thats easy fixed, Being given 'Power User' or any other non 'user' account type is a privilege, anyone found to have stopped a service without express permission from myself will face misconduct charges, which may result in job loss!
  15. %0 is a variable automatically assigned to the running batch file, Cleanup.cmd. The additional parameters come from what is known as 'variable expansion and modification', where the tilde (~) expands the variable and the individual letters perform additional tasks. In this case d tells the variable to include the drive letter of the running batch, and p tells the variable to include the path of the running batch.Therefore if your running batch, Cleanup.cmd is located in F:\UWXPCD\$OEM$\Cleanup.cmd, and renuser.exe was also in that same location, %~dp0renuser.exe would mean F:\UWXPCD\$OEM$\renuser.exe.
  16. here is an example batch that should copy everything pertinent from 'all non-hidden users'\Start Menu\Programs to the All Users\Start Menu\Programs @echo off for /d %%a in ("%AllUsersProfile:\All Users=%\*") do ( if "%%~na" neq "All Users" ( if exist "%%~a\Start Menu\Programs" ( xcopy /s/c/i/q/y "%%~a\Start Menu\Programs\*" "%AllUsersProfile%\Start Menu\Programs">nul ) ) ) goto :eofIt may be a good idea to stick it in your cleanup.cmd after all your installs have finished
  17. Yes, you can just paste it in, as long as you are really renameing it to 'First Second', just to add also that the %~dp0 should not be necessary.
  18. Unfortunately some programs think that they aren't for 'all users', that is down to the programmer. My initial solution would be, in a batch file copy all the shortcuts to the 'All Users' Start Menu.
  19. @ MyDomain Since you are using a cmd file first, try adding the command to that instead :: Renaming Admin account %~dp0renuser.exe Administrator "First Second"
  20. @ Raynold You would need to add something like this to your inf, do a search as suggested previously for the relevant thread, in order to find out the rest of the information etc. setup.ini, progman.groups,, "group0=""%16409%\""" setup.ini, group0,,"""Foxit PDF"",""""""%16422%\FolderName\ExeName"""""",,,,""%16389%"""where %16409% is %ALLUSERSPROFILE%\Desktop, (the shortcut location) %16422% is %ProgramFiles%, (the usual location of your program folder) %16389% is %USERPROFILE%\My Documents, (the start in directory) FolderName is The name of the folder in containing your program executable ExeName is The name of program executable, (i.e. something.exe)
  21. This issue still has not been resolved, could you please give us an indication of your progress! <Edit> Also whilst I'm here, I have noticed that many members are able to use formatting within the code tags such as underline, bold, colors etc. whereas if I try the same all I get are the tags. Is this dependant upon Guided & Normal Mode?, or is it Browser Dependant?, or some other reason? TIA </Edit>
  22. Regardless of the fact that there are already tweaks sections for this kind of thing, this would have been better as an attachment, or at the very least, small text and code tags would have been appropriate!
  23. You're right, but I was replying to the original author of this thread : so I was giving the way (= modify the default path and if needed the drive), IMHO, he would be capable of finding himself any further customization. The most important thing was the registry key, that so far, nobody had indicated. Afterthat, using .reg or reg.exe or any other ways were just upto your choice. <{POST_SNAPBACK}> Editing your posts is sometimes not a good idea!You have now realized that you were not replying to the thread starters most recent message. However, please do not try to correct me with guessed information, the author has in no way stated that his %SystemDrive% is anything other than C:. From the information available, the most likely scenario is that the %SystemDrive% is C: and the ProfilesDir has been set to D:\Documents and Settings\ in their winnt.sif. This may in fact be incorrect, but it is more likely. You gave your reply, I gave mine, both work, mine is more usable to the majority of the thread readers, as are my further replies.
  24. "rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 128 .\BootISO.inf"
  25. I am hoping is an typo
×
×
  • Create New...