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 new version of MakeISO fixing the problem(s) highlighted by Dumpy Dooby above. Hope it helps anyone else experiencing the same problem(s). MakeISO.zip
  2. I have taken a look at your attachment and will look at producing a 'fix'. However, as I think I may have stated many moons ago the files were not produced as do everything workhorses. There will be some people who have non usual configurations etc. requiring different tools etc. And believe me filenames containing 32 or more characters should be considered as non usual! Using a second parameter does however appeal far more and if I do create a 'fix', I will implement this idea and duly note your input.
  3. [DefaultInstall] AddReg = Add2RegItems Needs = SectionNameInOther, SectionNameInExtra Include = Other.inf, Extra.inf [Add2RegItems] HKLM,"Key Name",ValueName,,"Some Data"
  4. @ Dumpy Dooby - Is there a problem which concerns you...? If so please describe the problem, and with which file you have it. This will give me and possibly others a chance to comment or fix it!
  5. You may be able to achieve your goal by judicious use of Needs= and Include=. The Include item enables you to specify INF files that setup must also load into memory when it loads your INF file. The Needs item specifies the names of the sections you intend to run in the included INF file(s).
  6. HFSLIP a directory containing all codec files etc. into %WinDir% i.e. %SystemRoot%\Codecs and register unregister them as necessary. I hate having loads of non OS related files lying around in \system32. You could also add that folder to %PATH%.
  7. I find the Shell Folders key more successful, however in an unattended install, I am unsure as to when the USF key maps to it: FOR /F "TOKENS=3* DELIMS= " %%? IN ('REG QUERY "HKCU\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\EXPLORER\SHELL FOLDERS" /V PERSONAL^|FIND ":\"') DO (SET MYDOCS=%%?)Where DELIMS=<tab>"
  8. This single line should do what you intended: >>%SystemDrive%\Install\RunOnceEx.cmd ECHO/FOR %%%%? IN (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 %%%%?:\EXPERTTOOLZ.IMA (SET CDROM=%%%%?:)
  9. A better explanation of your requirements with existinfg code etc. would prove beneficial for responders. In the mean time, since percent is a special character, it will require escaping, with either additional percent characters or carets.
  10. In AutoIT, I believe that something along these lines will do it. FileDelete(@DesktopCommonDir & "\shortcut.lnk")and /or FileDelete(@DesktopDir & "\shortcut.lnk")In batch type language you would require something like this DEL "%AllUsersProfile%\Desktop\shortcut.lnk">NULand /or DEL "%UserProfile%\Desktop\shortcut.lnk">NUL
  11. Thanks for the wake up call...however, reading the requirements, all that is needed is to not perform two operations if a folder exists.This can easily be achieved in a single line, with the if not exist statement I previously gave. There is no need in this case for an else statement: IF NOT EXIST "%ALLUSERSPROFILE%\START MENU\IT LINKS" (XCOPY "\\bamdc001\SYSVOL\BAGLOBAL.NET\IT LINKS" "%ALLUSERSPROFILE%\START MENU\IT Links" /SIQHK >NUL)
  12. Will this do set oShell = CreateObject("WScript.Shell") oShell.run"regedit /s 1.reg"
  13. Just change the line to: IF NOT EXIST "%AllUsersProfile%\Start Menu\IT Links" EXIT
  14. Going back to my original reply, and sticking with a literal pause, where you need to press a key to close the application, the following should work as expected @ECHO OFF ECHO/ ECHO/ Running notepad.exe minimized with a pause START "" /MIN NOTEPAD.EXE &&( ECHO/ ECHO/ The application started you may now close it ECHO/ ECHO/ Press any key to close the application PAUSE>NUL &&( TASKKILL /F /IM NOTEPAD.EXE >NUL ) )
  15. The following example works fine for me using the just the ping command without any 3rd party tools @ECHO OFF ECHO/ ECHO/ Running notepad.exe minimized for five seconds START "" /MIN NOTEPAD.EXE &&( ECHO/ YES the application started so i'll close it PING -n 6 127.0.0.1>NUL &&( TASKKILL /F /IM NOTEPAD.EXE >NUL ) )
  16. Of course, the fun thing is that at the moment, there are still thirty eight people who have downloaded the incorrect, original batch file, since I posted about the incorrect entries; thirty five since I added my version of the corrected batch!
  17. @ gunsmokingmanThe files didn't want removing, they wanted correcting as in my posted batch file. access.cp_ moricons.dl_ regedt32.ex_ sndvol32.ex_ taskmgr.ex_ winntbbu.dll zipfldr.dl_
  18. The following entries are all incorrect, since they do not exist acces.cp_ moriconx.dl_ regedit.ex_ sndvol.ex_ taskmsgr.ex_ winntbbu.dl_ zipfldr.cp_ The following may prove a little more successful: @ECHO OFF &SETLOCAL ENABLEEXTENSIONS TITLE .:FiLe CoPiEr - ThEuTlAsS:. COLOR FC ECHO/%0 |FINDSTR/I "\\I386\\%~nx0" >NUL 2>&1 ||(ECHO/ Place this file in the I386 folder of your unattended xpcd &&GOTO END) :YorN ECHO/ ECHO/ Do you wish to copy the files! ECHO/ SET "Choice=" SET /P "Choice= Please enter your choice [Y/N] " IF '%Choice%' EQU '' (ECHO/ &ECHO/ Please make a selection &&GOTO YorN) IF /I '%Choice:~0,1%' NEQ 'Y' (ECHO/ &ECHO/ Closing script... &&GOTO END) :STARTCOPY SET "TMPRY=%SYSTEMDRIVE%\tempforicon" IF NOT EXIST %TMPRY% MD %TMPRY% ECHO/ ECHO/ Copying files to %TMPRY% ECHO/ Please wait... FOR %%? IN (access appwiz desk hdwwiz inetcpl intl joy main mmsys ncpa nusrmgr powercfg sysdm telephon timedate) DO (COPY %%?.CP_ %TMPRY%) FOR %%? IN (browseui cabview cmdial32 console credui fontext inetcplc keymgr moricons msgina mshtml msoeres mstask mstscax mydocs netid netshell newdev ntshrui occache printui rasdlg shdoclc shdocvw shell32 shimgvw shlwapi stobject syssetup themeui url urlmon webcheck wininet winsrv wmploc xpsp2res zipfldr) DO (COPY %%?.DL_ %TMPRY%) FOR %%? IN (calc cleanmgr cmd explorer iexplore msimn mspaint notepad regedt32 sndrec32 sndvol32 sysocmgr taskmgr wiaacmgr wmplayer wupdmgr) DO (COPY %%?.EX_ %TMPRY%) FOR %%? IN (logon.sc_ winntbbu.dll) DO COPY %%? %TMPRY% ECHO/ ECHO/ Finished :END PING -n 6 127.0.0.1 >NUL ENDLOCAL &EXIT
  19. So what I think you're saying is that you need a method which knows that in a multiboot environment, the currently running OS is the one on partition 2 or partition 1 etc. I did produce one for such an eventuality, which I will try to dig out, edit and post in the next day or two... [Edit] I had cause to revisit this thread and noticed that I hadn't posted my 'dug out' one! I've checked it and recompiled it, just to check the code and ensure it still functions. If you see this Mr Moonlight, give it a shot and post back. SafeBoot.zip
  20. GSM, please explain what the error is... I have seen your picture within your app, but that means nothing to me! The file runs fine on my XP machines, it will only open a cd drawer with loaded media, meaning if you have two or more, only the one with a CD in it will be ejected. If you click on the pop-up it will close the drawer again, otherwise after a 20 second timeout it will auto-shut.
  21. I don't really see the need to kill all those processes anyhow, you are after all shutting down. I have had many instances however where several wscript.exe processes can remain open and can prevent shutdown. Here is my version of a CD eject script, which closes the wscript process too. strComputer = "." Set WshShell = CreateObject("WScript.Shell") Set oWMP = CreateObject("WMPlayer.OCX.7") Set colCDROMs = oWMP.cdromCollection Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_CDROMDrive") For Each objItem in colItems If ObjItem.MediaLoaded Then Set CD = colCDROMs.getByDriveSpecifier(objItem.Drive) CD.Eject Answer = WshShell.Popup("Please remove your CD within 20 seconds.", 20, "CD Removal Message", 0 + 32) If Answer = 1 Then CD.Eject Else CD.Eject End If End If Next Set colProcess = objWMIService.ExecQuery("Select * from Win32_Process Where Name = " & "'wscript.exe'") For Each objProcess in colProcess objProcess.Terminate() NextYou may wish to alter that to suit your needs, by adding appropriate sleep /timeouts and shutdown. Hope it helps!
  22. I'm not sure I understand your problem, until I can find out more, you could try this version! SafeBoot.zip
  23. Without the help of Google cache
  24. oneless, yes it is, i have no problem with your input into this thread. I only posted because I found by search , with some difficulty, a thread which I knew existed. Since the thread starter hadn't managed that, I decided to respond accordingly. What i didn't expect was the feeling of no appreciation for my find, and a possibility that SolidasRock hadn't realized that my response wasn't a jibe but an actual link. Just because the thread starter gets a reponse which suits them, does not mean that the thread should end. It is not their thread it belongs to the community. Once the question has been answered then it can help the community, that is what the forum is about. I answered the question, not as further help for someone who had already stated they didn't want it, but for others, in the hope that one day the search facillty will produce meaningful results more often.
  25. This may work for you better then!@ECHO OFF &SETLOCAL ENABLEEXTENSIONS SET "wpidir=%~dp0" &SET "wpipathpart=" IF "%~d0" EQU "\\" ( FOR /F "DELIMS=" %%? IN ("%wpidir%") DO SET "wpipathpart=%%~nx?") IF "%wpipathpart%" NEQ "" CALL :GETDRV "%%wpidir:\%wpipathpart%=%%" "%wpipathpart%" ECHO %wpidir% &&PAUSE GOTO :EOF :GETDRV FOR /F "TOKENS=2" %%? IN ('NET USE * %1 /PERSISTENT:NO ^|FIND "Drive"') DO ( ENDLOCAL SET "wpidir=%%?\%~2") GOTO :EOF
×
×
  • Create New...