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. setup.ini, progman.groups,, "group2=""%16400%\""" setup.ini, group2,,"""%DESCNAME%"",""""""%16422%\%DESCNAME%\%EXENAME%"""""""
  2. This is my attempt at a rewrite of the foobar inf file. I noticed some errors in it whilst looking into Kapo's problem. The file is intended to basically replicate the original, therefore Kapo will have to alter at least the [AddLink] and [DelLink] sections and obviously any changes they needed from the first example. When I say replicate I mean that if any of the heaps of files included for installation require registering they are not going to be, as they weren't in the original. Hope it helps! foobar2000.zip
  3. Firstly your install command is wrong. It should be Title [string] not Title= and also .\ not ./ Then there are errors in your inf including but not limited to The name of the Executable is RegCleanr.exe not RegCleaner.exe Here are some, hopefully corrected, examples for you. regcleaner.cmd [Version] Signature = $Windows NT$ [SourceDisksNames] 55 = %SETUPNAME% [SourceDisksFiles] %THISFILE%.inf = 55 [DestinationDirs] Core.Copy =16422,%DESCNAME% Lang.Copy =16422,%DESCNAME%\Languages Inf.Copy = 17 File.Del = 17 [DefaultInstall] AddReg = Reg.Uninstall CopyFiles = Core.Copy, Lang.Copy, Inf.Copy UpdateInis = AddLink [DefaultUninstall] AddReg = Do.Remove DelReg = Reg.Uninstall DelFiles = Core.Copy, Lang.Copy, Inf.Copy, File.Del UpdateInis = DelLink [Reg.Uninstall] HKLM,"%UNINSTAL%\%DESCNAME%" HKLM,"%UNINSTAL%\%DESCNAME%",DisplayName,,"%DESCNAME%" HKLM,"%UNINSTAL%\%DESCNAME%",UninstallString,,"%REMOVCMD% %THISFILE%.inf" [Core.Copy] DefaultColors.dat DefaultColumns.dat DefaultOptions.dat ignorelist.dat %EXENAME% [Lang.Copy] English.rlg Italian.rlg [Inf.Copy] %THISFILE%.inf [AddLink] setup.ini, progman.groups,, "group0=""%16386%\%DESCNAME%\""" setup.ini, group0,,"""%DESCNAME%"",""""""%16422%\%DESCNAME%\%EXENAME%""""""" setup.ini, progman.groups,, "group1=""%16410%\%QLAUNCH%\""" setup.ini, group1,,"""%DESCNAME%"",""""""%16422%\%DESCNAME%\%EXENAME%""""""" setup.ini, progman.groups,, "group2=""%16400%\""" setup.ini, group2,,"""%DESCNAME%"",""""""%16422%\%DESCNAME%\%EXENAME%""""""" [Do.Remove] HKLM,"%RUNONEX%\%DESCNAME%",,,"Finalizing Uninstall of %DESCNAME%" HKLM,"%RUNONEX%\%DESCNAME%",1,,"%11%\CMD.EXE /C RD /S/Q ""%16422%\%DESCNAME%"">NUL 2>&1" [DelLink] setup.ini, progman.groups,, "group0=""%16386%\%DESCNAME%\""" setup.ini, group0,,"""%DESCNAME%""" setup.ini, progman.groups,, "group1=""%16410%\%QLAUNCH%\""" setup.ini, group1,,"""%DESCNAME%""" setup.ini, progman.groups,, "group2=""%16400%\""" setup.ini, group2,,"""%DESCNAME%""" [File.Del] %THISFILE%.PNF [Strings] ; Non-localizable SETUPNAME = "Setup Files" UNINSTAL = "Software\Microsoft\Windows\CurrentVersion\Uninstall" REMOVCMD = "rundll32.exe setupapi.dll,InstallHinfSection DefaultUninstall 132" QLAUNCH = "Microsoft\Internet Explorer\Quick Launch" RUNONEX = "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx" ; Localizable THISFILE = "RegCleaner" DESCNAME = "RegCleaner v4.3" EXENAME = "RegCleanr.exe"
  4. Noone said that your code didn't work, also look at the original message I quoted and tell me where it mentions a reg file. I simply answered a question which was pertinent to your latest file. If you open your registry editor and go to the 'open' key, you will see an entry with a drive letter. The method I showed you has an entry 'not depending of the letter', i.e. %systemdrive%. Incidentally, it may have been a good idea to highlight the fact that your file is for an install into a non-standard location. Most people will be using %ProgramFiles% not %SystemDrive%\Programs.
  5. You can just use the exclude option in robocopy, for example: @echo off set src=C:\Documents and Settings\Administrator\Desktop set dest=C:\Documents and Settings\Administrator\My Documents\Desktop robocopy "%src%" "%dest%" /copyall /mov /xf *.lnk /r:30 /w:10>nul goto :eof<Edit> Replaced my test dirs with your %src% and %dest% </Edit>
  6. @ cumminbk - Try using this one, it works on my current machine by just double clicking. fixshell.zip
  7. @ cumminbk - Here you are fixshell.cmd @echo off set key=HKLM\SOFTWARE\Classes\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell reg add %key% /ve /d "none" /f>nul reg add %key%\find /ve /t reg_expand_sz /d "@%%SystemRoot%%\system32\SHELL32.dll,-8503" /f>nul reg add %key%\find /v SuppressionPolicy /t reg_dword /d 128 /f>nul reg add %key%\find\command /ve /t reg_expand_sz /d "%%SystemRoot%%\Explorer.exe">nul reg add %key%\find\ddeexec /ve /d "[FindFolder(\"%%l\", %%I)]" /f>nul reg add %key%\find\ddeexec\application /ve /d "Folders" /f>nul reg add %key%\find\ddeexec\topic /ve /d "AppProperties" /f>nul reg add %key%\Manage /ve /t reg_expand_sz /d "@%%windir%%\system32\mycomput.dll,-400" /f>nul reg add %key%\Manage /v SuppressionPolicy /t reg_dword /d 1073741884 /f>nul reg add %key%\Manage\command /ve /t reg_expand_sz /d "%%windir%%\system32\mmc.exe /s %%windir%%\system32\compmgmt.msc" /f>nul goto :eofI thought you'd prefer this format since hex .reg strings don't format correctly on the board!
  8. The first page is for Windows 2000 sp5, I'm using it for XP I have read http://www.vorck.com/hfslip.html though! Those secret folders and including msi files are not explained. HFSVPK does, when you run the slipstream, the contents of that folder are looked at and relevant entries are written to svcpack.inf, compressed to svcpack.in_ and added to I386. <Edit> From HFSLIP_50928.cmd: FOR /F "USEBACKQ DELIMS==" %%I IN (`DIR /A-D /OGN /B HFSVPK\*.exe`) DO ( IF EXIST HFSVPK\%%I ECHO %%I>> SVCPACK.INF ) FOR /F "USEBACKQ DELIMS==" %%I IN (`DIR /A-D /OGN /B HFSVPK\*.cmd`) DO ( IF EXIST HFSVPK\%%I ECHO %%I>> SVCPACK.INF )It is therefore only looking for exe and cmd files in that folder, so where do I put my inf reg vbs and msi files? </Edit>
  9. Here's an example using your latest replyreg add HKLM\SOFTWARE\Classes\.diz /ve /d ".nfo.diz.file" /f reg add HKLM\SOFTWARE\Classes\.nfo /ve /d ".nfo.diz.file" /f reg add HKLM\SOFTWARE\Classes\.nfo.diz.file /ve /d ".nfo.diz.file" /f reg add HKLM\SOFTWARE\Classes\.nfo.diz.file\DefaultIcon /ve /t REG_EXPAND_SZ /d "%%SystemDrive%%\Programs\Util\Jane\jane.exe,0" /f reg add HKLM\SOFTWARE\Classes\.nfo.diz.file\Shell\Open /ve /d "&Open" /f reg add HKLM\SOFTWARE\Classes\.nfo.diz.file\Shell\Open\Command /ve /t REG_EXPAND_SZ /d "\"%%SystemDrive%%\Programs\Util\Jane\jane.exe\" \"%%1\"" /f
  10. I thought I would try out this app, just to see how well it works etc. but I'm a little lost. People on this board are talking about directories which don't exist by default. Where is the documentation on those? I have an MSI which I would like to add, but where do I put it? I tried the HFSVPK directory, and it was added to the service pack folder, but it wasn't added to the svcpack.inf file. It therefore will not run! The msi contains only a few files which I think will be installed to a certain location, and registered probably with registry settings added too. The msi suggests it was made with wise 3.51 installer if that helps any. Is there a particular order in which the svcpack.inf entries are added? I want an exe to be installed prior to the cmd file containing its tweaks etc.
  11. Try replacing that line with for %%a in (.) do set basepath=%%~fadoes it help? <Edit> I don't know if it'll make any difference to you but I will make that change in both codes in my previous response too! </Edit>
  12. Delayed Expansion is not necessary, just changing it slightly to this should do it @echo off&setlocal enableextensions set olddir=%userprofile%\desktop\old folder set newdir=%userprofile%\desktop\new folder pushd %newdir% for %%a in (.) do set basepath=%%~fa for /f "tokens=*" %%b in ('dir/b/s/a ^2^>nul') do ( if %errorlevel% equ 0 ( set fullpath=%%b call:chkit "%%fullpath:%basepath%=%%" ) ) popd&endlocal&goto :eof :chkit pushd %olddir% if not exist ".%~1" del /f/a/q "%newdir%%~1" 2>nul popd&goto :eofIf your new directory is liable to have sub-directories in it which are also not in the old directory and need removing too, then this may be better @echo off&setlocal enableextensions set olddir=%userprofile%\desktop\old folder set newdir=%userprofile%\desktop\new folder pushd %newdir% for %%a in (.) do set basepath=%%~fa for /f "tokens=*" %%b in ('dir/b/s/a ^2^>nul') do ( if %errorlevel% equ 0 ( set fullpath=%%b call:chkit "%%fullpath:%basepath%=%%" ) ) popd&endlocal&goto :eof :chkit set relpath=%~1 if not exist "%olddir%%relpath%" ( pushd %newdir%%relpath% 2>nul&&( popd rd /s/q "%newdir%%relpath%" 2>nul )||( del /f/a/q "%newdir%%relpath%" 2>nul ) ) goto :eof<Edit> Codes changed according to the below two responses! </Edit> <Edit 2> Added a couple of 2>nul to hide some standard error echoing </Edit 2>
  13. In vbs you will probably want something like this WScript.CreateObject("Scripting.FileSystemObject").DeleteFile("C:\Program Files\foobar2000\playlists\000000000 - Default.fpl")
  14. Okay, I understand now… This is the best I can come up with atm @echo off&setlocal enableextensions set olddir=%userprofile%\desktop\old folder set newdir=%userprofile%\desktop\new folder pushd %newdir% for /f "tokens=*" %%c in ('cd') do set basepath=%%c for /f "tokens=*" %%d in ('dir/b/s/a') do ( set fullpath=%%d call:chkit "%%fullpath:%basepath%=%%" ) popd&endlocal&goto :eof :chkit pushd %olddir% if not exist ".%~1" del /f/a/q "%newdir%%~1" popd&goto :eofJust change the locations of olddir and newdir to suit.
  15. You could always use robocopy robocopy "D:\Old" "D:\New" /mir>nul
  16. @ asbsamsf A ProfileItems section would have been fine, had the requirement of quick launch and desktop shortcuts not also been required.
  17. Try this slightly tidier version, you only have to verify that %_MYLOCN% is correct @ECHO OFF SETLOCAL ENABLEEXTENSIONS SET _MYLOCN=\\srv-dcex02\Tech\ PUSHD %_MYLOCN% IF NOT EXIST _PCNAMES.TXT ( FOR /F %%a in ('NET VIEW ^|FIND "\\"') DO ECHO/%%a>>_PCNAMES.TXT ) IF EXIST _OUTPUT.TXT DEL /Q _OUTPUT.TXT FOR /F "TOKENS=*" %%b IN (_PCNAMES.TXT) DO CALL :NEXT "%%b" POPD ENDLOCAL GOTO :EOF :NEXT SET _NAME=%~1 FOR /F "TOKENS=3 DELIMS= " %%c IN ('REG QUERY "%_NAME%\HKLM\SOFTWARE\InterNetworX Systems\ICS\Configuration" /v "Workstation ID" ^2^>nul') DO IF ERRORLEVEL 0 (ECHO/%_NAME%=%%c>>_OUTPUT.TXT) GOTO :EOFHopefully will just be a case of checking the results to verify that the correct tokens were used for the specific registry key you are looking at. <Edit> Slight changes made according to message below. If the _output.txt isn't being created now, there is an error with the query </Edit>
  18. missed out 'IN' on next to last line FOR /F "TOKENS=3 DELIMS= " %%c IN ('REG @ECHO OFF SETLOCAL ENABLEEXTENSIONS SET _MACLIST="\\servername\sharename\_PCNAMES.TXT" SET _RESULTS="\\servername\sharename\_OUTPUT.TXT" IF NOT EXIST %_MACLIST% ( TYPE NUL>%_MACLIST% FOR /F %%a in ('NET VIEW ^|FIND "\\"') DO ECHO/%%a>>%_MACLIST% ) IF EXIST %_RESULTS% DEL /Q %_RESULTS% FOR /F %%b IN (%_MACLIST%) DO CALL :NEXT "%%b" ENDLOCAL GOTO :EOF :NEXT SET _NAME=%~1 FOR /F "TOKENS=3 DELIMS= " %%c IN ('REG QUERY "\\%_NAME%\HKLM\SOFTWARE\InterNetworX Systems\ICS\Configuration" /v "Workstation ID"') DO ECHO/%_NAME%=%%c>>%_RESULTS% GOTO :EOF<Edit> Another error fixed, however please see shorter version in my next reply </Edit>
  19. Not wishing to sound like a bad sport here, but I'll give MioKawaii an opportunity to reply, further, as I don't wish to take over their thread and /or additionally re-write their inf.
  20. Try something like this @ECHO OFF SETLOCAL ENABLEEXTENSIONS SET _MACLIST="\\servername\sharename\\_PCNAMES.TXT" SET _RESULTS="\\servername\sharename\\_OUTPUT.TXT" IF NOT EXIST %_MACLIST% ( TYPE NUL>%_MACLIST% FOR /F %%a in ('NET VIEW ^|FIND "\\"') DO ECHO/%%a>>%_MACLIST% ) IF EXIST %_RESULTS% DEL /Q %_RESULTS% FOR /F %%b IN (%_MACLIST%) DO CALL :NEXT "%%b" ENDLOCAL GOTO :EOF :NEXT SET _NAME=%~1 FOR /F "TOKENS=3 DELIMS= " %%c ('REG QUERY "\\%_NAME%\HKLM\SOFTWARE\InterNetworX Systems\ICS\Configuration" /v "Workstation ID"') DO ECHO/%_NAME%=%%c>>%_RESULTS% GOTO :EOFJust change the locations for _MACLIST and _RESULTS to suit. <Edit> Note - DELIMS=<tab>" </Edit>
  21. It may for sysprep.inf, I'll not argue with you there, however to the best of my knowledge it has always worked correctly on my installs in winnt.sif. I thought I would just re-iterate the point for those mistaking the sysprep and winnt methods.
  22. nakira, that is just a GUI for the key I've already given. It is done like this start with 128 then add on the number relative to whichever of the below you wish to restrict from autorunning. UNKNOWN » 1 NO_ROOT_DIR » 2 REMOVABLE (floppy disks and removable cartridges) » 4 FIXED (hard disks) » 8 REMOTE (network drives) » 16 CDROM » 32 RAMDISK » 64 To disable autorun on all drives for instance (128 + 1 + 2 + 4 + 8 + 16 + 32 + 64 = 255) REG ADD HKCU/Software/Microsoft/Windows/CurrentVersion/Policies/Explorer /v NoDriveTypeAutoRun /t REG_DWORD /d 255 /f All drives except CD-ROM (128 + 1 + 2 + 4 + 8 + 16 + 64 = 223) REG ADD HKCU/Software/Microsoft/Windows/CurrentVersion/Policies/Explorer /v NoDriveTypeAutoRun /t REG_DWORD /d 223 /fetc.
  23. I don't really see how those two should be connected since the LMHOSTS file is different from the HOSTS file. The HOSTS file contains IP name-to IP address mappings, whereas the LMHOSTS file maps NetBIOS names to IP addresses. HOSTS name resolution is equivalent to what the DNS server does, LMHOSTS name resolution is equivalent to what the WINS server does. One thing I would check is that the order is such that the Hosts file is actually checked before the DNS. Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\ServiceProvider] "DnsPriority"=dword:000007d0 "HostsPriority"=dword:000001f4 "LocalPriority"=dword:000001f3 "NetbtPriority"=dword:000007d1The above are the default settings!
  24. As an addition to the MS article you have linked, for a winnt.sif file, use [Networking] InstallDefaultComponents = No
  25. Start » Run » (type) REG ADD HKCU/Software/Microsoft/Windows/CurrentVersion/Policies/Explorer /v NoDriveTypeAutoRun /t REG_DWORD /d 149 /f » (Click) OK
×
×
  • Create New...