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. Could you please try to rephrase your question; in its current form it isn't understandable. We use back-slashes for file paths, and forward-slashes are not allowed in file names. If your forward-slashes are simply mistakes for back-slashes then you appear from your information not to be talking about renaming but moving!
  2. Based on the above, I'd try something like this! "C:\Program Files\7-Zip\7z.exe" a -tzip -mm=Deflate -mx9 -md=32k -mfb=128 -mpass=10 -v94371840 C:\temp\test.zip C:\temp\files
  3. You could try something along these lines: @for /f "delims=" %%i in ('dir/b/s/a-d install.cmd') do @call "%%~i"Incidentally in the example you gave, because you can only have one file named install.cmd in a single directory, this would have done: @call install.cmd
  4. Or mine here! which with modification for install media would be something like this! @Echo off&Setlocal Set "Root=E:" Call :G_ If %Pid% Equ 000 Echo: Other ^(includes some retail, upgrade and evaluation ^ versions^) If %Pid% Equ 007 Echo: Retail If %Pid% Equ 009 Echo: Not for resale - bundle If %Pid% Equ 011 Echo: Upgrade ^(XP Home?^) If %Pid% Equ 083 Echo: Windows Genuine Advantage If %Pid% Equ OEM Echo: OEM If %Pid% Equ 270 Echo: Volume License If %Pid% Equ 296 Echo: MSDN If %Pid% Equ 308 Echo: Microsoft Action Pack subscription If %Pid% Equ 347 Echo: Microsoft Action Pack subscription If %Pid% Equ 335 Echo: Retail If %Pid% Geq 640 (If %Pid% Leq 652 Echo: Volume License) If %Pid% Equ 699 Echo: Volume Windows XP Tablet Edition If %Pid% Equ 071 Echo: Unknown Ping -n 6 127.0.0.1>Nul&Goto :Eof :G_ For /f "delims=" %%# In ('Find "Pid="^<%Root%\I386\SETUPP.INI') Do Set "%%#" Set "Pid=%Pid:~-3%"You would just need to alter the content of variable %Root% defined on line 2!
  5. Just a small update to my previous post. The file will programmatically retrieve the current optical drive(s) and create shortcut(s) on the 'All Users' Desktop to all found. The Shortcut(s) will obviously carry the drive letter as their distinguishing feature: Optical Drive [X] Where X is the assigned drive letter In order to prevent the possibility of failure before a certain stage of the unattended setup procedure, I have deliberately not used WMI as I've heard reports that it isn't always available during the installation timeline. The executable works on both XP and Vista x86 but has not been tested on x64 systems. To prevent a shortcut installation failure the exe will need to be Run as administrator on a live Vista machine.
  6. I've created this packaged script as an executable file which may help you out! Just run it, it doesn't require parameters so it should work equally well unattendedly as on a live system. Run as administator may be necessary in Windows Vista etc. CDdList.zip
  7. Please bear in mind that the EULA for nLite prohibits using it for commercial purposes!
  8. What you need is a general If Then Else Statement. strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItems = objWMIService.ExecQuery( _ "SELECT * FROM Win32_BaseBoard",,48) For Each objItem in colItems If objitem.Product = "<SearchString>" Then <Do Something> Else <Do Something different> End If Next
  9. That of course is VBScripting as opposed to the Batch file example requested in your Topic Title. Regardless of that fact and the fact that neither language are particularly good at regular expressions, if you could post an example explaining what it is you want we may be able to provide a better/alternative for you.
  10. Press 'Winkey + R' and in the dialog box enter: %comspec% /c For /?>%userprofile%\Desktop\ForDetails.txtThen you can read the text file now located on your desktop!
  11. From what you've said there is no need to have a visible window showing since there is no user interaction required. Therefore you can simply prevent the window from showing! There are many ways of doing that, third party 'hide' utilities or vbscripting being the most common methods.
  12. Thanks, although I'm sure you misunderstood me. I know exactly what it does, I simply have no wish now or ever to use such a thing. I find it completely unnecessary to prevent a window flashing on the screen during an unattended installation. First of all the idea of unattended is that you don't have to sit there during the installation, so you wont see anything happen. Secondly for those who do sit there, flashing windows may help prove that something is actually happening! What I actually meant was that because I didn't have a working knowledge of Hide.exe, I wasn't sure if for instance all of its parameters needed double quoting.
  13. I'm going to move this post to nLite for now, (at least until you tell us what you mean by WinLite). How about giving us a little bit more information! What new customized windows? What have you tried so far? What has been the results?
  14. @twig123 I'm sorry for not having responded sooner to your request. Here is an altered version which hopefully creates a SoftList.log file along side the executable. Note This file may take some time to complete on a machine with plenty of installed software, so please be patient! OnMyPC.zip
  15. I'm not being deliberately rude but there is no answer to such a generic question, some of us have been doing this for years and still couldn't tell you. You need to read the Unattended Guide, then work through it, then change things bit by bit etc. It will take you a considerable amount of time to have something with which you are reasonably satisfied.
  16. Well the clear screen isn't required at the beginning since the batch would open a new console, you dont need to exit at the end if the file's already gone and the last line could then just say Del %0But I'm sure someone may benefit from the information, after all most of us want to learn something whilst here!
  17. This is what ends up in my registry: @Echo off Title Finishing Custom Windows Install Set "R_=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx" Set "D_=HKLM\SOFTWARE\Classes\Folder\shell\Pist Contents" Set "W_=%%SystemRoot%%\system32" Set "S_=%%SystemDrive%%\install" Reg add %R_% /v Title /d "Finishing Custom Windows Install" /f Reg add %R_%\030 /ve /d "Installing Applications" /f Reg add %R_%\030 /v 1 /d "%W_%\hide.exe /w \"%S_%\finish\appz.cmd\"" /f Reg add %R_%\035 /ve /d "Removing Unused Folders" /f Reg add %R_%\035 /v 1 /d "%W_%\hide.exe /w \"%S_%\finish\unused.cmd\"" /f Reg add %R_%\040 /ve /d "Applying Registry Settings" /f Reg add %R_%\040 /v 1 /d "%W_%\hide.exe /w \"%S_%\finish\registry.cmd\"" /f Reg add %R_%\045 /ve /d "Rebooting To Finish Install" /f Reg add %R_%\045 /v 1 /d "%W_%\hide.exe /w \"%S_%\finish\cleanup.cmd\"" /f Reg add %R_%\050 /ve /d "Deleting Install Directory" /f Reg add %R_%\050 /v 1 /d "%W_%\hide.exe /w \"%S_%\finish\done.cmd\"" /f Reg add "%D_%\command" /ve /d ^ "Hide.exe %%ComSpec%% /c Dir/b/o/s %%1>\"%%~1\_CONTENTS LIST.TXT\"" /f
  18. That's amazing, because your syntax is wrong!I don't know the hide.exe program your using but I'd guess from what you've got that you should need something like this: Reg add "HKCR\Folder\shell\List Contents\command" /ve /d "Hide.exe %%ComSpec%% /c Dir/b/o/s \"%%~1\">\"%%~1\_CONTENTS LIST.TXT\"" /f...all on one line! You may also find this old topic useful
  19. Because you're running a batch file, the file is read before it is run and it's during this read that one or more errors are encountered. Are you sure that you're happy with the list contents portion of the script?
  20. Thank you very much for removing the content of your post, it really does help to make this forum more user unfriendly! To my knowledge Scripting Guy tends to concentrate on VBScripting therefore your question was unlikely answered by him and due to your untimely self-editing by us neither. Please do not hesitate to keep us uninformed in future!
  21. Well that rules out a problem with the ISO creation software, so it's a problem with your hardware or its associated implementation.
  22. I would suggest that you do not delete either account! You can however disable them easily enough from the commandline: @For /f %# In (Administrator Guest) Do @Net user %# /active:no
  23. You shouldn't be trying to alter the output command, you should be fixing the file! Something like this should fix the file. @Echo off&Pushd %SystemRoot%\System32\drivers\etc More HOSTS>HOSTS.bak&&(Del HOSTS&&Ren HOSTS.bak HOSTS)
  24. Quick reply on passing... Changing the `robocopy script` to look something like this would probably do it! @Echo off&Setlocal Set "_=0" For /f "delims=" %%# In (users.txt) Do ( Set/a "_+=1"&Call :N_ %%_%% "%%#") Set "_="&Goto :Eof :N_ Set "$=0" For /f "delims=" %%# In (groups.txt) Do ( Set/a "$+=1"&Call :O_ %%$%% "%%#" %1 %2) Set "$="&Goto :Eof :O_ If %3 Neq %1 Goto :Eof Set "£=%~4" Set "£=/B %£: = /B %" RLGRPCRT.exe ".%~2.APPS.GROUPS.CARE" %£%It may also be necessary depending upon the commandline utility you're using to use Start "" /wait in order to ensure completion of each command line prior to the next one starting.
  25. You could use this to rule out silly mistakes!
×
×
  • Create New...