Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


silent001

Member
  • Content Count

    31
  • Donations

    $0.00 
  • Joined

  • Last visited

Community Reputation

3 Neutral

About silent001

Profile Information

  • OS
    none specified
  1. Hello All. I am looking for a script that can get the SSID of the wifi network the pc is connected to. I want to write a script that checks if the pc is connected to a specific network and if it is then do something. I found many scripts but they all return blank for SSID on error resume nextPrivate Sub GetWMI(WMIArray, WMIQuery)On error resume Next Set WMIClass = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\wmi") If not(WMIClass is nothing) Then Set WMIArray = WMIClass.ExecQuery(WMIQuery)End SubFunction SSID()On error resume Next Call GetWMI(objMSNdis_80211_ServiceSetIdentifierSet, "Select * from MSNdis_80211_ServiceSetIdentifier Where active=true") For Each objMSNdis_80211_ServiceSetIdentifier in objMSNdis_80211_ServiceSetIdentifierSet ID = "" For i = 0 to objMSNdis_80211_ServiceSetIdentifier.Ndis80211SsId(0) ID = ID & chr(objMSNdis_80211_ServiceSetIdentifier.Ndis80211SsId(i + 4)) Next SSID = ID NextEnd Functionwscript.echo SSID()I dont know why it blank please help me
  2. Make: Fujitsu Product: LIFEBOOK AH532/G52 Serial Number: YLLA026070 Mainboard: FJNBB2B Firmware: Phoenix SecureCore Tiano BIOS Version: 2.09 (02/09/2013) Secure Bios
  3. Have tried removing the HDD. If I understand the firmware bios correctly it uses windows BCD and stores the entries in the NVRAM or something lke that so that you can boot to the right partition and right OS (if multiple OS installed) without having to load the bootloader for each OS or something like that. I sent it in and they tell me they have to replace the board which is almost the same price as what I paid for the laptop new. If I only knew how to repair it because the Pheonix Bios setup seams to have some sort of recovery utility but I need to know how to access this so I can just try boot the OEM install disk and do a clean install but no matter what I try I am still unable to get anything to boot
  4. New problem. My laptop will not boot at all. I imported a backup of a bcd store and now all boot entries in my firmware bios is missing. Please help. They say the board needs to be replaced. The laptop has a phoenix securecore tiano bios. If i get into the BIOS Setup by removing the CMOS battery(only way to get in as F2 only beeps but does nothing) under boot Priorities all that is listed is Recovery & Utility. Please help I dont know how to get it fixed. It wont boot a windows CD or a usb or the internal HDD
  5. Hello. Yesterday I Pressed F12 on my laptop and noticed I had 3 Boot Manager Entries on it. So I Ran CMD as admin and Typed BCDEDIT /ENUM FIRMWAREand saw that the three entries was there so I tried to delete it but noticed I accidently removed the BIOS Setup entry. I tried a reinstall but it didnt come back. Here is the output of my current BCD store Current BCD Store Entries Taken From CMD Command BCDEDIT /ENUM FIRMWAREFirmware Boot Manager---------------------identifier {fwbootmgr}displayorder {bootmgr} {d9661fbe-9910-11e5-9f6c-f953604e8c46} {feefa12c-9911-11e5-b518-806e6f6e6963} {feefa129-9911-11e5-b518-806e6f6e6963} {feefa12a-9911-11e5-b518-806e6f6e6963} {feefa12b-9911-11e5-b518-806e6f6e6963} {feefa12d-9911-11e5-b518-806e6f6e6963} {feefa116-9911-11e5-b518-806e6f6e6963} {feefa115-9911-11e5-b518-806e6f6e6963}timeout 2Windows Boot Manager--------------------identifier {bootmgr}device partition=\Device\HarddiskVolume2path \EFI\Microsoft\Boot\bootmgfw.efidescription Windows Boot Managerlocale en-USinherit {globalsettings}default {current}resumeobject {d9661fc0-9910-11e5-9f6c-f953604e8c46}displayorder {current}toolsdisplayorder {memdiag}timeout 30Firmware Application (101fffff)-------------------------------identifier {d9661fbe-9910-11e5-9f6c-f953604e8c46}path \EFI\Microsoft\Boot\bootmgfw.efidescription Windows Boot ManagerFirmware Application (101fffff)-------------------------------identifier {d9661fbf-9910-11e5-9f6c-f953604e8c46}description Boot MenuFirmware Application (101fffff)-------------------------------identifier {feefa10c-9911-11e5-b518-806e6f6e6963}description Diagnostic ScreenFirmware Application (101fffff)-------------------------------identifier {feefa10d-9911-11e5-b518-806e6f6e6963}description Recovery and UtilityFirmware Application (101fffff)-------------------------------identifier {feefa10e-9911-11e5-b518-806e6f6e6963}description Diagnostic ProgramFirmware Application (101fffff)-------------------------------identifier {feefa10f-9911-11e5-b518-806e6f6e6963}description Diagnostic Progrogram ROMFirmware Application (101fffff)-------------------------------identifier {feefa110-9911-11e5-b518-806e6f6e6963}description Erase DiskFirmware Application (101fffff)-------------------------------identifier {feefa111-9911-11e5-b518-806e6f6e6963}description Diagnostic ScreenFirmware Application (101fffff)-------------------------------identifier {feefa112-9911-11e5-b518-806e6f6e6963}description Recovery and UtilityFirmware Application (101fffff)-------------------------------identifier {feefa113-9911-11e5-b518-806e6f6e6963}description Diagnostic ProgramFirmware Application (101fffff)-------------------------------identifier {feefa114-9911-11e5-b518-806e6f6e6963}description Diagnostic Progrogram ROMFirmware Application (101fffff)-------------------------------identifier {feefa115-9911-11e5-b518-806e6f6e6963}description Floppy Disk Drive:Firmware Application (101fffff)-------------------------------identifier {feefa116-9911-11e5-b518-806e6f6e6963}description USB HDD:Firmware Application (101fffff)-------------------------------identifier {feefa117-9911-11e5-b518-806e6f6e6963}description Erase DiskFirmware Application (101fffff)-------------------------------identifier {feefa118-9911-11e5-b518-806e6f6e6963}description Boot MenuFirmware Application (101fffff)-------------------------------identifier {feefa119-9911-11e5-b518-806e6f6e6963}description Boot MenuFirmware Application (101fffff)-------------------------------identifier {feefa11a-9911-11e5-b518-806e6f6e6963}description Diagnostic ScreenFirmware Application (101fffff)-------------------------------identifier {feefa11b-9911-11e5-b518-806e6f6e6963}description Recovery and UtilityFirmware Application (101fffff)-------------------------------identifier {feefa11c-9911-11e5-b518-806e6f6e6963}description Diagnostic ProgramFirmware Application (101fffff)-------------------------------identifier {feefa11d-9911-11e5-b518-806e6f6e6963}description Diagnostic Progrogram ROMFirmware Application (101fffff)-------------------------------identifier {feefa11e-9911-11e5-b518-806e6f6e6963}description Erase DiskFirmware Application (101fffff)-------------------------------identifier {feefa11f-9911-11e5-b518-806e6f6e6963}description Diagnostic ScreenFirmware Application (101fffff)-------------------------------identifier {feefa120-9911-11e5-b518-806e6f6e6963}description Recovery and UtilityFirmware Application (101fffff)-------------------------------identifier {feefa121-9911-11e5-b518-806e6f6e6963}description Diagnostic ProgramFirmware Application (101fffff)-------------------------------identifier {feefa122-9911-11e5-b518-806e6f6e6963}description Diagnostic Progrogram ROMFirmware Application (101fffff)-------------------------------identifier {feefa123-9911-11e5-b518-806e6f6e6963}description Erase DiskFirmware Application (101fffff)-------------------------------identifier {feefa124-9911-11e5-b518-806e6f6e6963}description Boot MenuFirmware Application (101fffff)-------------------------------identifier {feefa125-9911-11e5-b518-806e6f6e6963}description Diagnostic ScreenFirmware Application (101fffff)-------------------------------identifier {feefa126-9911-11e5-b518-806e6f6e6963}description Recovery and UtilityFirmware Application (101fffff)-------------------------------identifier {feefa127-9911-11e5-b518-806e6f6e6963}description Diagnostic ProgramFirmware Application (101fffff)-------------------------------identifier {feefa128-9911-11e5-b518-806e6f6e6963}description Diagnostic Progrogram ROMFirmware Application (101fffff)-------------------------------identifier {feefa129-9911-11e5-b518-806e6f6e6963}description Drive0 HDD:Firmware Application (101fffff)-------------------------------identifier {feefa12a-9911-11e5-b518-806e6f6e6963}description CD/DVD Drive:Firmware Application (101fffff)-------------------------------identifier {feefa12b-9911-11e5-b518-806e6f6e6963}description NETWORK:Firmware Application (101fffff)-------------------------------identifier {feefa12c-9911-11e5-b518-806e6f6e6963}description USB HDD:Firmware Application (101fffff)-------------------------------identifier {feefa12d-9911-11e5-b518-806e6f6e6963}description USB CD/DVD:Firmware Application (101fffff)-------------------------------identifier {feefa12e-9911-11e5-b518-806e6f6e6963}description Erase DiskFirmware Application (101fffff)-------------------------------identifier {feefa12f-9911-11e5-b518-806e6f6e6963}description Boot MenuNotice all the duplicates again Here is my BCD store before windows 10 upgarde and me tring to fix the entries BCD Store Entries Taken From CMD Command BCDEDIT /ENUM FIRMWARE of a old BCD Store before Upgrade to Windows 10Firmware Boot Manager---------------------identifier {fwbootmgr}displayorder {bootmgr} {c0e7b021-6905-11e4-a376-c80fdd2b11d9} {c0e7b022-6905-11e4-a376-c80fdd2b11d9} {c0e7b023-6905-11e4-a376-c80fdd2b11d9} {c0e7b024-6905-11e4-a376-c80fdd2b11d9} {c0e7b025-6905-11e4-a376-c80fdd2b11d9} {c0e7b026-6905-11e4-a376-c80fdd2b11d9}timeout 2Windows Boot Manager--------------------identifier {bootmgr}device unknownpath \EFI\Microsoft\Boot\bootmgfw.efidescription Windows Boot Managerlocale en-USinherit {globalsettings}default {default}resumeobject {c0e7b02d-6905-11e4-a376-c80fdd2b11d9}displayorder {default}toolsdisplayorder {memdiag}timeout 30displaybootmenu NoFirmware Application (101fffff)-------------------------------identifier {c0e7b01b-6905-11e4-a376-c80fdd2b11d9}description BIOS Setup Firmware Application (101fffff)-------------------------------identifier {c0e7b01c-6905-11e4-a376-c80fdd2b11d9}description Boot MenuFirmware Application (101fffff)-------------------------------identifier {c0e7b01d-6905-11e4-a376-c80fdd2b11d9}description Diagnostic ScreenFirmware Application (101fffff)-------------------------------identifier {c0e7b01e-6905-11e4-a376-c80fdd2b11d9}description Recovery and UtilityFirmware Application (101fffff)-------------------------------identifier {c0e7b01f-6905-11e4-a376-c80fdd2b11d9}description Diagnostic ProgramFirmware Application (101fffff)-------------------------------identifier {c0e7b020-6905-11e4-a376-c80fdd2b11d9}description Diagnostic Progrogram ROMFirmware Application (101fffff)-------------------------------identifier {c0e7b021-6905-11e4-a376-c80fdd2b11d9}description Floppy Disk Drive:Firmware Application (101fffff)-------------------------------identifier {c0e7b022-6905-11e4-a376-c80fdd2b11d9}description Drive0 HDD:Firmware Application (101fffff)-------------------------------identifier {c0e7b023-6905-11e4-a376-c80fdd2b11d9}description CD/DVD Drive:Firmware Application (101fffff)-------------------------------identifier {c0e7b024-6905-11e4-a376-c80fdd2b11d9}description NETWORK:Firmware Application (101fffff)-------------------------------identifier {c0e7b025-6905-11e4-a376-c80fdd2b11d9}description USB HDD:Firmware Application (101fffff)-------------------------------identifier {c0e7b026-6905-11e4-a376-c80fdd2b11d9}description USB CD/DVD:Firmware Application (101fffff)-------------------------------identifier {c0e7b027-6905-11e4-a376-c80fdd2b11d9}description Erase DiskThat is how it is suppose to look please help me
  6. Here is what I have so far Dim objFSO,objFile,strCD,strScript,outFileRunAsAdmin()strComputer = "."Set objFSO=CreateObject("Scripting.FileSystemObject")strScript = WScript.ScriptFullNamestrCD = objFSO.GetParentFolderName(strScript)outFile = strCD & "\temp.txt"Set objFile = objFSO.CreateTextFile(outFile,True)Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")Set colDiskPartitions = objWMIService.ExecQuery _ ("Select * from Win32_DiskPartition")For each objPartition in colDiskPartitionsif objPartition.DiskIndex = 2 then Wscript.Echo "Device ID: " & objPartition.DeviceID strBlockSize = objPartition.BlockSize strNumberBlocks = objPartition.StartingOffset strStartLBA = strNumberBlocks/strBlockSize'Wscript.Echo "partnew (hd" & objPartition.DiskIndex & "," & objPartition.Index & ")" & " 0x0B " & strStartLBA & " " & objPartition.NumberOfBlocksobjFile.Write "partnew (hd" & objPartition.DiskIndex & "," & objPartition.Index & ")" & " 0x0B " & strStartLBA & " " & objPartition.NumberOfBlocks & vbCrLf & vbCrLfEnd ifNextobjFile.Close'Fixed it sorry used wrong stuff''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''Function RunAsAdmin()Dim objAPPIf WScript.Arguments.length = 0 ThenSet objAPP = CreateObject("Shell.Application")objAPP.ShellExecute "wscript.exe", """" & _WScript.ScriptFullName & """" & " RunAsAdministrator",,"runas", 1WScript.QuitEnd IfEnd functionDoes this seam right?
  7. I am trying to get the start LBA and number of blocks and ID so I can write it to my menu.lst for grub4dos so that it writes in the following format root (hd0,0)partnew (hd0,0) 0x0B 95674368 29358080 #ID #STARTLBA #NumberOfBlockschainloader (hd0)+1bootI want it to dedect each partitions info as it does, set it as a veriable so I can write it the menu.lst for my grub4dos
  8. No it doesn't it has to do with this post http://www.msfn.org/board/topic/174281-grub4dos-backup-and-restore-partion-table-with-a-script/?p=1106522 I see why the start LBA I was getting froom bootice and the starting offset I got from the vbs do not match. I have do something like this: strComputer = "."Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")Set colDiskPartitions = objWMIService.ExecQuery _ ("Select * from Win32_DiskPartition")For each objPartition in colDiskPartitionsif objPartition.DiskIndex = 2 then Wscript.Echo "Device ID: " & objPartition.DeviceID strBlockSize = objPartition.BlockSize strNumberBlocks = objPartition.StartingOffset strStartLBA = strNumberBlocks/strBlockSizeWscript.Echo "partnew (hd" & objPartition.DiskIndex & "," & objPartition.Index & ")" & " 0x0B " & strStartLBA & " " & objPartition.NumberOfBlocksEnd ifNext'Fixed it sorry used wrong stuffBut how do I do it for each partition?
  9. Good day. I am looking for a way to get the drives start lba and sectors and also partition type Here is what I found but I still need the partition type and start lba strComputer = "."Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")Set colDiskPartitions = objWMIService.ExecQuery _ ("Select * from Win32_DiskPartition")For each objPartition in colDiskPartitionsif objPartition.DiskIndex = 3 then Wscript.Echo "Disk Index: " & objPartition.DiskIndex Wscript.Echo "Device ID: " & objPartition.DeviceID Wscript.Echo "Block Size: " & objPartition.BlockSize Wscript.Echo "Bootable: " & objPartition.Bootable Wscript.Echo "Boot Partition: " & objPartition.BootPartition Wscript.Echo "Description: " & objPartition.Description Wscript.Echo "Index: " & objPartition.Index Wscript.Echo "Name: " & objPartition.Name Wscript.Echo "Number Of Blocks: " & _ objPartition.NumberOfBlocks Wscript.Echo "Primary Partition: " & _ objPartition.PrimaryPartition Wscript.Echo "Size: " & objPartition.Size Wscript.Echo "Starting Offset: " & _ objPartition.StartingOffset Wscript.Echo "Type: " & objPartition.Type End if NextPlease help me because the info is needed so that it can be writen to a file
  10. This is my final script and working ComputerName = "."dim strDriveNumset objFSO = CreateObject("Scripting.FileSystemObject")Set objShell = CreateObject("Wscript.Shell")Dim oDicSet oDic = CreateObject("scripting.dictionary")Set wmiServices = GetObject ( _ "winmgmts:{impersonationLevel=Impersonate}!//" & ComputerName)' Get physical disk driveSet wmiDiskDrives = wmiServices.ExecQuery ( "SELECT Caption, DeviceID FROM Win32_DiskDrive")strPath = objShell.CurrentDirectorystrDrive = objFSO.GetDriveName(strPath)For Each wmiDiskDrive In wmiDiskDrives 'Use the disk drive device id to ' find associated partition query = "ASSOCIATORS OF {Win32_DiskDrive.DeviceID='" _ & wmiDiskDrive.DeviceID & "'} WHERE AssocClass = Win32_DiskDriveToDiskPartition" Set wmiDiskPartitions = wmiServices.ExecQuery(query) For Each wmiDiskPartition In wmiDiskPartitions 'Use partition device id to find logical disk Set wmiLogicalDisks = wmiServices.ExecQuery _ ("ASSOCIATORS OF {Win32_DiskPartition.DeviceID='" _ & wmiDiskPartition.DeviceID & "'} WHERE AssocClass = Win32_LogicalDiskToPartition") For Each wmiLogicalDisk In wmiLogicalDisks if wmiLogicalDisk.DeviceID = strDrive then strDriveNum = wmiDiskDrive.DeviceID end if Next NextNextdrv0 = "\\.\PHYSICALDRIVE0"drv1 = "\\.\PHYSICALDRIVE1"drv2 = "\\.\PHYSICALDRIVE2"drv3 = "\\.\PHYSICALDRIVE3"drv4 = "\\.\PHYSICALDRIVE4"drv5 = "\\.\PHYSICALDRIVE5"drv6 = "\\.\PHYSICALDRIVE6"drv7 = "\\.\PHYSICALDRIVE7"drv8 = "\\.\PHYSICALDRIVE8"drv9 = "\\.\PHYSICALDRIVE9"if strDriveNum = drv0 thenstrDrv = "(hd0)"end ifif strDriveNum = drv1 thenstrDrv = "(hd1)"end ifif strDriveNum = drv2 thenstrDrv = "(hd2)"end ifif strDriveNum = drv3 thenstrDrv = "(hd3)"end ifif strDriveNum = drv4 thenstrDrv = "(hd4)"end ifif strDriveNum = drv5 thenstrDrv = "(hd5)"end ifif strDriveNum = drv6 thenstrDrv = "(hd6)"end ifif strDriveNum = drv7 thenstrDrv = "(hd7)"end ifif strDriveNum = drv8 thenstrDrv = "(hd8)"end ifif strDriveNum = drv9 thenstrDrv = "(hd9)"end ifstrRunPath = "grubinst"strRun = "grubinst.exe --verbose -t=0 --silent-boot --skip-mbr-test " & strDrvstrCommand = "cmd /K @echo off & CD " & strDrive & " & cd " & strRunPath & " & " & strRun & " & pause & exit"wscript.echo strCommandobjShell.run strCommand'Set oShell = Nothing Glenn9999 your batch files don't work it says disknumber is not a valid command
  11. Okay here is what I have its almost done ComputerName = "."dim strDriveNumset objFSO = CreateObject("Scripting.FileSystemObject")Set objShell = CreateObject("Wscript.Shell")Dim oDicSet oDic = CreateObject("scripting.dictionary")Set wmiServices = GetObject ( _ "winmgmts:{impersonationLevel=Impersonate}!//" & ComputerName)' Get physical disk driveSet wmiDiskDrives = wmiServices.ExecQuery ( "SELECT Caption, DeviceID FROM Win32_DiskDrive")strPath = objShell.CurrentDirectorystrDrive = objFSO.GetDriveName(strPath)For Each wmiDiskDrive In wmiDiskDrives 'Use the disk drive device id to ' find associated partition query = "ASSOCIATORS OF {Win32_DiskDrive.DeviceID='" _ & wmiDiskDrive.DeviceID & "'} WHERE AssocClass = Win32_DiskDriveToDiskPartition" Set wmiDiskPartitions = wmiServices.ExecQuery(query) For Each wmiDiskPartition In wmiDiskPartitions 'Use partition device id to find logical disk Set wmiLogicalDisks = wmiServices.ExecQuery _ ("ASSOCIATORS OF {Win32_DiskPartition.DeviceID='" _ & wmiDiskPartition.DeviceID & "'} WHERE AssocClass = Win32_LogicalDiskToPartition") For Each wmiLogicalDisk In wmiLogicalDisks if wmiLogicalDisk.DeviceID = strDrive then strDriveNum = wmiDiskDrive.DeviceID end if Next NextNextdrv0 = "\\.\PHYSICALDRIVE0"drv1 = "\\.\PHYSICALDRIVE1"drv2 = "\\.\PHYSICALDRIVE2"drv3 = "\\.\PHYSICALDRIVE3"drv4 = "\\.\PHYSICALDRIVE4"drv5 = "\\.\PHYSICALDRIVE5"drv6 = "\\.\PHYSICALDRIVE6"drv7 = "\\.\PHYSICALDRIVE7"drv8 = "\\.\PHYSICALDRIVE8"drv9 = "\\.\PHYSICALDRIVE9"if strDriveNum = drv0 thenstrDrv = "(hd0)"end ifif strDriveNum = drv1 thenstrDrv = "(hd1)"end ifif strDriveNum = drv2 thenstrDrv = "(hd2)"end ifif strDriveNum = drv3 thenstrDrv = "(hd3)"end ifif strDriveNum = drv4 thenstrDrv = "(hd4)"end ifif strDriveNum = drv5 thenstrDrv = "(hd5)"end ifif strDriveNum = drv6 thenstrDrv = "(hd6)"end ifif strDriveNum = drv7 thenstrDrv = "(hd7)"end ifif strDriveNum = drv8 thenstrDrv = "(hd8)"end ifif strDriveNum = drv9 thenstrDrv = "(hd9)"end ifstrRun = Chr(34) & strDrive & "\grubinst.exe" & Chr(34) & " --verbose -t=0 --silent-boot --skip-mbr-test" & strDrvwscript.echo strRunobjShell.Run strRun, 9Can someone maybe help with tidying up?
  12. Good day I have googled and googled but cant seam to get a working answer. I want to have a cmd batch file get the current drive letter then using the drive letter get the disk number eg @echo offpushd "%~dp0"echo %~d0set _DiskNum = wmic diskdrive %~d0 get disknumber #I know this isn't a real commandgrubinst.exe --verbose -t=0 --silent-boot --skip-mbr-test(%_DiskNum%) #This command I will stillpause #work out once the above exit #command is working.Thank you in advance
  13. Let me try explain again On my grub4dos partition the menu.lst in the root of the partition looks as follows title Boot To First Hardrivefind --set-root /SYS.tagpartnew (hd0,2) 0x0B 95674368 29358080partnew (hd0,0) 0 0 0partnew (hd0,1) 0 0 0partnew (hd0,3) 0 0 0root (hd0,2)makeactiveroot (hd1,0)chainloader /bootmgrboot#start AVASTtitle AVASTfind --set-root /SYS.tagpartnew (hd0,2) 0x0B 95674368 29358080partnew (hd0,0) 0x07 26468352 2095104root (hd0,2)makeactiveroot (hd0,0)chainloader /bootmgrboot#end AVAST#start WIN7title WIN7find --set-root /SYS.tagpartnew (hd0,2) 0x0B 95674368 29358080partnew (hd0,0) 0x07 1302528 12580864root (hd0,2)makeactiveroot (hd0,0)chainloader /bootmgrboot#end WIN7#start WIM10title WIM10find --set-root /SYS.tagpartnew (hd0,2) 0x0B 95674368 29358080partnew (hd0,0) 0x0B 13885440 12580864root (hd0,0)makeactivechainloader /grldrboot#start WinToGOtitle WinToGOfind --set-root /SYS.tagpartnew (hd0,2) 0x0B 95674368 29358080partnew (hd0,0) 0x07 28565504 67106816root (hd0,2)makeactiveroot (hd0,0)chainloader /bootmgrboot#end WinToGOtitle Shutdownhaltthen my WIM10 menu.lst looks as follows # 2014-05-16 - Clover boot7 added# 2014-05-18 - Clover hd0,1 added# 2014-05-19 - bugfix should be hd0,2 not hd0,1!# 2014-05-22a - support syslinux and clover# 2014-05-27 - add NTFS(win)+FAT32(blank) support for installing NTFS win via Clover only# 2015-03-07 - add FreeBSD menu entry (use xxx.imgPTNA5 and xxx. for FreeBSD memstick.ig file)# 2015-04-16 - new grldr + hotkey -A# 2015-06-17 - clover menu for NTFS+FAT32 changed# 2015-07-10 v0.51 - clover 32-bit added# 2015-08-20 - detect grub2 and syslinux in (hd0,2) partition and add menu entry, MBR.BIN addedset VER=0.56# get UUID of driveuuid () > nulset UUID=%?%#Backup Reserve MBR if it is grub4dos MBRcat --locate="Missing MBR" (hd0)30+1 > nul && dd if=(hd0)30+1 of=(hd0,0)/e2b/MBR.BIN > nulcat --locate="Missing MBR" (hd0)60+1 > nul && dd if=(hd0)60+1 of=(hd0,0)/e2b/MBR.BIN > nul# Detect grub2 bootloader in (hd0,2) partition #3parttype (hd0,2) > nulset P2=%@retval%if "%P2%"=="0" parttype (hd0,2) 0x83 > nul# grub2 - e.g. pmagicset CMD2=set CMD2T=if exist (hd0,2)/boot/grub/i386-pc/core.img set "CMD2=kernel (hd0,2)/boot/grub/i386-pc/core.img"if exist (hd0,2)/boot/grub/core.img set "CMD2=kernel (hd0,2)/boot/grub/core.img"if exist (hd0,2)/grub2/core.img set "CMD2=kernel (hd0,2)/grub2/core.img"if exist (hd0,2)/boot/grub2/i386-pc/core.img set "CMD2=kernel (hd0,2)/boot/grub2/i386-pc/core.img"# grub - e.g. bitdefenderif exist (hd0,2)/boot/grubi386.pc set "CMD2=kernel (hd0,2)/boot/grubi386.pc"# freeldrif exist (hd0,2)/freeldr.sys set "CMD2=kernel (hd0,2)/freeldr.sys"# for EasyRE payloadsif exist (hd0,2)/bootmgr if exist (hd0,2)/{EasyUSB} set "CMD2=kernel (hd0,2)/bootmgr"# Check if syslinux in ptn #3cat --locate="SYSLINUX" --length=10 --skip=0x2 (hd0,2)0+1 > nul && set "CMD2=chainloader (hd0,2)+1"if "%P2%"=="0" parttype (hd0,2) 0 > nulif exist CMD2 set "CMD2T=Boot to Partition 2"# --- HEADING, PAYLOAD and FOOTER TEXT -----# set CENTREHD to 1 to centre the heading and payload description or else comment outset CENTREHD=1#set CHEADING=\x20Easy2Boot CSM Menu (v%VER%) (UUID=%UUID%)#set CHELPTEXT=\x20 This menu has booted in MBR\\CSM Mode (not UEFI) (c) www.easy2boot.com\x20# ---cleartimeout 0default 1debug offpassword easy2boot/e2b/hotkey -A# backup PBRcat --locate="BOOT7" --length=10 --skip=0x58 ()+1 > nul || dd if=()+2 of=()/PBR.BIN > nul# this loads the thin unifont font for non-ASCII characters (e.g. Chinese) - to save menu load time, you can comment it out and remove the /e2b/unifont.hex.gz file#font /e2b/unifont.hex.gz# autonumber menu entries - use 0x0000 for no numberingwrite 0x8274 0x2001 > nul# ----- GRAPHICS MODE AND BACKGROUND BITMAP ----graphicsmode -1 800 600 && splashimage /e2b/csm.bmp > nulset E=# To adjust position, change P:XXXX in lines below#if exist /EFI/boot/bootia32.efi set E=%E%echo -n -e -P:2800 \\x24[0103]INFORMATION: x86 32-bit UEFI boot file \\\\EFI\\\\boot\\\\bootia32.efi present #if exist /EFI/boot/bootx64.efi set E=%E% \necho -n -e -P:2900 \\x24[0103]INFORMATION: x86 64-bit UEFI boot file \\\\EFI\\\\boot\\\\bootx64.efi present#if exist /EFI/boot/bootia64.efi set E=%E% \necho -n -e -P:3000 \\x24[0103]INFORMATION: ITANIUM 64-bit UEFI boot file \\\\EFI\\\\boot\\\\bootia64.efi present#if exist /EFI/boot/bootARM.efi set E=%E% \necho -n -e -P:3100 \\x24[0103]INFORMATION: ARM 32-bit UEFI boot file \\\\EFI\\\\boot\\\\bootARM.efi present#if exist /EFI/boot/bootAA64.efi set E=%E% \necho -n -e -P:3200 \\x24[0103]INFORMATION: ARM 64-bit UEFI boot file \\\\EFI\\\\boot\\\\bootAA64.efi present#ls /EFI > nul || set E=\necho -n -e -P:2800 \\x24[0103] INFORMATION: No \\\\EFI folder present (cannot UEFI boot)# -------- MENU COLOURS -------# Colour pairs are Text/Background - i.e cyan/blue = cyan text on blue background# Use black if a transparent background is required for menu highlight background - e.g. highlight=red/black# Valid colours are: black, blue, green, cyan, red, magenta, brown, light-gray, dark-gray, light-blue, light-green, light-cyan, light-red, light-magenta, yellow and white.# normal = normal menu text# highlight = highlighted menu text when a menu entry is selected# helptext = the colour of the title help text shown just below the menu box# standard = the console background and text colours (e.g. when listing files)# border = the colour of the border of the menu boxcolor normal=white/black highlight=black/white helptext=white/black standard=white/black border=black/black# ----- MENU POSITION ---# wordspacing linespacing borderwidth tophelp numberofitemsinmenu topstart menuwidth rightstartposofmenu# tophelp=topstart+noitems for menuhelp text just under menu boxset wdspace=0set lnspace=0set topstart=7set rstart=14set noitems=13set menuw=67set bdwidth=0set tophelp=20/e2b/menusetting.gz %wdspace% %lnspace% %bdwidth% %tophelp% %noitems% %topstart% %menuw% %rstart% && clear# --- HEADER --- # HCOLOUR sets the colour of the HEADING and FOOTER TEXT text # HCOLOUR=ABCD specifies the text colour [BLINK|BRIGHT|BACKGROUND|FOREGROUND]# A=0/1 1 = BLINK text (does not work under VM)# B=0/1 1 = BRIGHT colour for foreground text# C=0-7 = BACKGROUND colour - transparent if graphics mode so has no effect!# D=0-7 = FOREGROUND menu text colour# Colours parameters are: 0=black/grey 1=blue, 2=green, 3=cyan, 4=red, 5=pink, 6=yellow/brown, 7=grey/white.# e.g. 0106 is non-blinking yellow text, 0006 is brown text, 0101 is light blue text# HEADINGset CHPAD=\x20 ;; # PADDING for CHEADING and PAYLOAD - set to same as rstart-3set CHTOP=0100 ;; # HEADING POSITIONset CHCOLOUR=0107 ;; # HEADING COLOUR# PAYLOAD DESCRIPTIONset CPAY_POS=0300 ;; # PAYLOAD NAME POSITION XXYYset CPAY_COL=0106 ;; # PAYLOAD NAME COLOUR# FOOTER HELP TEXTset CHBTM=3605 ;; # HELP TEXT BOTTOM POSITION XXYYset CFCOLOUR=0005 ;; # FOOTER COLOUR#------## use PAYLOAD variable to hold title of payload (MakePartImage will replace next line with the payload name)##set PAYLOAD= ;; ###################################################################################################################################################set CLRTOP=\x20 \x20# This displays the heading, description and footer textif "%CENTREHD%"=="1" set CENTREHD=%menuw%if exist CENTREHD call /e2b/centrehd.g4b CHEADINGif exist CENTREHD call /e2b/centrehd.g4b PAYLOADwrite (md)0x220+2 !BAT\necho -n -P:0000 $[0122]%CLRTOP%\necho -n -P:%CHTOP% $[%CHCOLOUR%] %CHPAD%%CHEADING%\necho -n -P:%CPAY_POS% $[%CPAY_COL%]%CHPAD%%PAYLOAD%\necho -n -P:%CHBTM% $[%CFCOLOUR%]%CHELPTEXT%\n\0 > nul# add EFI boot file messagesecho -e %E% \0 >> (md)0x220+2initscript (md)0x220+2# --- MISC ----title Return To Main Menu\n find --set-root /SYS.tagpartnew (hd0,2) 0x0B 95674368 29358080partnew (hd0,0) 0 0 0partnew (hd0,1) 0 0 0partnew (hd0,3) 0 0 0root (hd0,2)makeactivechainloader /grldrboot# --- x64 UEFI BOOT using CLOVER ---iftitle [checkrange 2,3 is64bit && if exist /boot7 && if not exist (hd0,2)/EFI/boot/bootx64.efi && if exist /EFI/boot/bootx64.efi && cat --locate="FAT32" --length=10 --skip=0x50 ()+1 > nul] Clover 64-bit UEFI Boot Menu (USB 2.0 ports only)\n Boot via UEFI (choose the UEFI boot option)\n EFI options are for MBR booting#cat --locate="SYSLINUX" --length=10 --skip=0x2 ()+1 > nul && pause PROBLEM: SYSLINUX DETECTED - Will not install Clover to PBR... && configfile /menu.lstset CL=0## boot7 is default boot filecat --locate="BOOT7" --length=10 --skip=0x58 ()+1 > nul && set /a CL=%CL%+1 > nulif "%CL%"=="1" echo Information: Clover is already installed to the PBRecho ffffffffff > (md)0x350+1dd if=(hd0,0)+1 of=(md)0x350+1 > nuldd if=()/clover/boot1f32alt7 of=(md)0x350+1 skip=87 seek=87 bs=1 > nuldd if=()/clover/boot1f32alt7 of=(md)0x350+1 count=3 bs=1 > nul#cat --hex (md)0x350+1 && pause if not "%CL%"=="1" dd if=(md)0x350+1 of=(hd0,0)+1 > nul && pause --wait=2 PBR has been updated with Clover boot code...chainloader /clover/boot0ss || chainloader /clover/boot0md || chainloader /clover/boot0afboot# User can press 2 for 3 for 32-bit UEFI, 6 for 64-bit UEFI or 1 for Chameleon - within 3 seconds - uses \bootx files in root# boot0md gives a boot0 message and is slower - boot0ss is silent with no messageiftitle [checkrange 2,3 is64bit && if exist /boot7 && if not exist /EFI/boot/bootx64.efi && if exist (hd0,2)/EFI/boot/bootx64.efi && cat --locate="FAT32" --length=10 --skip=0x50 ()+1 > nul] Clover 64-bit UEFI Boot Menu (USB 2.0 ports only)\n Boot via UEFI (choose the UEFI boot option)\n EFI options are for MBR booting#cat --locate="SYSLINUX" --length=10 --skip=0x2 ()+1 > nul && pause PROBLEM: SYSLINUX DETECTED - Will not install Clover to PBR... && configfile /menu.lstset CL=0## boot7 is default boot filecat --locate="BOOT7" --length=10 --skip=0x58 ()+1 > nul && set /a CL=%CL%+1 > nulif "%CL%"=="1" echo Information: Clover is already installed to the PBRecho ffffffffff > (md)0x350+1dd if=(hd0,0)+1 of=(md)0x350+1 > nuldd if=()/clover/boot1f32alt7 of=(md)0x350+1 skip=87 seek=87 bs=1 > nuldd if=()/clover/boot1f32alt7 of=(md)0x350+1 count=3 bs=1 > nul#cat --hex (md)0x350+1 && pause if not "%CL%"=="1" dd if=(md)0x350+1 of=(hd0,0)+1 > nul && pause --wait=2 PBR has been updated with Clover boot code...chainloader /clover/boot0ss || chainloader /clover/boot0md || chainloader /clover/boot0afboot# IF PTN1(hd0,0)=NTFS PTN3(hd0,2)=FAT32 iftitle [checkrange 2,3 is64bit && if exist (hd0,2)/boot7 && if exist (hd0,2)/EFI/boot/bootx64.efi && if exist /EFI/boot/bootx64.efi && cat --locate="NTFS" --length=10 --skip=0x2 (hd0,0)+1 > nul && cat --locate="FAT32" --length=10 --skip=0x50 (hd0,2)+1 > nul] Clover 64-bit UEFI Boot (NTFS+FAT32) (USB 2.0 ports only)\n Boot via UEFI (choose the 'Boot UEFI internal' icon)\n Do not pick the Microsoft EFI options!set CL=0## boot7 is default boot filecat --locate="BOOT7" --length=10 --skip=0x58 (hd0,2)+1 > nul && set /a CL=%CL%+1 > nulif "%CL%"=="1" echo Information: Clover is already installed to the PBRecho ffffffffff > (md)0x350+1dd if=(hd0,2)+1 of=(md)0x350+1 > nuldd if=(hd0,2)/clover/boot1f32alt7 of=(md)0x350+1 skip=87 seek=87 bs=1 > nuldd if=(hd0,2)/clover/boot1f32alt7 of=(md)0x350+1 count=3 bs=1 > nulif not "%CL%"=="1" dd if=(md)0x350+1 of=(hd0,2)+1 > nul && pause --wait=2 PBR on (hd0,2) has been updated with Clover boot code...chainloader /clover/boot0ss || chainloader (hd0,2)/clover/boot0ss || chainloader /clover/boot0md || chainloader /clover/boot0afboot# --- 32-BIT UEFI BOOT using CLOVER ---iftitle [if exist /boot3 && if not exist (hd0,2)/EFI/boot/bootia32.efi && if exist /EFI/boot/bootia32.efi && cat --locate="FAT32" --length=10 --skip=0x50 ()+1 > nul] Clover 32-bit UEFI Boot Menu (USB 2.0 ports only)\n Boot via UEFI (choose the UEFI boot option)\n EFI options are for MBR bootingset CL=0cat --locate="BOOT3" --length=10 --skip=0x58 ()+1 > nul && set /a CL=%CL%+1 > nulif "%CL%"=="1" echo Information: Clover is already installed to the PBRecho ffffffffff > (md)0x350+1dd if=(hd0,0)+1 of=(md)0x350+1 > nuldd if=()/clover/boot1f32alt7 of=(md)0x350+1 skip=87 seek=87 bs=1 > nuldd if=()/clover/boot1f32alt7 of=(md)0x350+1 count=3 bs=1 > nulcat --locatei=boot7 --replace=BOOT3 (md)0x350+1 > nulif not "%CL%"=="1" dd if=(md)0x350+1 of=(hd0,0)+1 > nul && pause --wait=2 PBR has been updated with Clover boot code...chainloader /clover/boot0ss || chainloader /clover/boot0md || chainloader /clover/boot0afbootiftitle [if exist /boot3 && if not exist /EFI/boot/bootia32.efi && if exist (hd0,2)/EFI/boot/bootia32.efi && cat --locate="FAT32" --length=10 --skip=0x50 ()+1 > nul] Clover 32-bit UEFI Boot Menu (USB 2.0 ports only)\n Boot via UEFI (choose the UEFI boot option)\n EFI options are for MBR bootingset CL=0cat --locate="BOOT3" --length=10 --skip=0x58 ()+1 > nul && set /a CL=%CL%+1 > nulif "%CL%"=="1" echo Information: Clover is already installed to the PBRecho ffffffffff > (md)0x350+1dd if=(hd0,0)+1 of=(md)0x350+1 > nuldd if=()/clover/boot1f32alt7 of=(md)0x350+1 skip=87 seek=87 bs=1 > nuldd if=()/clover/boot1f32alt7 of=(md)0x350+1 count=3 bs=1 > nulcat --locatei=boot7 --replace=BOOT3 (md)0x350+1 > nulif not "%CL%"=="1" dd if=(md)0x350+1 of=(hd0,0)+1 > nul && pause --wait=2 PBR has been updated with Clover boot code...chainloader /clover/boot0ss || chainloader /clover/boot0md || chainloader /clover/boot0afboot# IF PTN1(hd0,0)=NTFS PTN3(hd0,2)=FAT32 iftitle [if exist (hd0,2)/boot3 && if exist (hd0,2)/EFI/boot/bootia32.efi && if exist /EFI/boot/bootia32.efi && cat --locate="NTFS" --length=10 --skip=0x2 (hd0,0)+1 > nul && cat --locate="FAT32" --length=10 --skip=0x50 (hd0,2)+1 > nul] Clover 32-bit UEFI Boot (NTFS+FAT32) (USB 2.0 ports only)\n Boot via UEFI (choose the 'Boot UEFI internal' icon)\n Do not pick the Microsoft EFI options!set CL=0cat --locate="BOOT7" --length=10 --skip=0x58 (hd0,2)+1 > nul && set /a CL=%CL%+1 > nulif "%CL%"=="1" echo Information: Clover is already installed to the PBRecho ffffffffff > (md)0x350+1dd if=(hd0,2)+1 of=(md)0x350+1 > nuldd if=(hd0,2)/clover/boot1f32alt7 of=(md)0x350+1 skip=87 seek=87 bs=1 > nuldd if=(hd0,2)/clover/boot1f32alt7 of=(md)0x350+1 count=3 bs=1 > nulcat --locatei=boot7 --replace=BOOT3 (md)0x350+1 > nulif not "%CL%"=="1" dd if=(md)0x350+1 of=(hd0,2)+1 > nul && pause --wait=2 PBR on (hd0,2) has been updated with Clover boot code...chainloader /clover/boot0ss || chainloader (hd0,2)/clover/boot0ss || chainloader /clover/boot0md || chainloader /clover/boot0afboot# FreeBSD partitioniftitle [if exist (hd0,2)/boot/boot1] Boot to FreeBSD on 3rd partition (MBR mode)\n Boot to FreeBSD partitionroot (hd0,2)chainloader (hd0,2)+1 || chainloader /boot/boot1# BOOTMGR on 3rd partitioniftitle [if exist (hd0,2)/bootmgr] Boot Windows on 3rd partition (MBR mode)\n Boot Windows using bootmgr on (hd0,2)root (hd0,2)chainloader /bootmgrThe above menu.lst on wim10 partition was taken from Steve Si's makepartimage tool that can be found at http://www.easy2boot.com/add-payload-files/makepartimage/ all I did is take the menu.lst from the partition the tool creates and removed the code that I don't need and left that which I do and added some extra code of my own. Now when I insert my USB the grub4dos menu.lst, I have made using the method jaclaz has suggested, is loaded. When I select WIM10 it boots (hd0,0) with the menu.lst taken from the tool. I want it so that it auto selects the default, which is 1, and then boots the partition in UEFI mode as is needed which I can do by setting the timeout to 0 which is fine but when I am done and the USB is booted again it boots the WIM10 partition as it is set active and then loads its menu.lst then boots the partiton in UEFI mode. I do not want this. I want it to rather load the Return To Main Menu to be loaded so that I go back to my main menu. So my question is can I make the grub4dos partition menu.lst to something like title Boot To First Hardrivefind --set-root /SYS.tagpartnew (hd0,2) 0x0B 95674368 29358080partnew (hd0,0) 0 0 0partnew (hd0,1) 0 0 0partnew (hd0,3) 0 0 0root (hd0,2)makeactiveroot (hd1,0)chainloader /bootmgrboot#start AVASTtitle AVASTfind --set-root /SYS.tagpartnew (hd0,2) 0x0B 95674368 29358080partnew (hd0,0) 0x07 26468352 2095104root (hd0,2)makeactiveroot (hd0,0)chainloader /bootmgrboot#end AVAST#start WIN7title WIN7find --set-root /SYS.tagpartnew (hd0,2) 0x0B 95674368 29358080partnew (hd0,0) 0x07 1302528 12580864root (hd0,2)makeactiveroot (hd0,0)chainloader /bootmgrboot#end WIN7#start WIM10title WIM10find --set-root /SYS.tagpartnew (hd0,2) 0x0B 95674368 29358080partnew (hd0,0) 0x0B 13885440 12580864root (hd0,0)makeactivechainloader /grldrload defaultboot#start WinToGOtitle WinToGOfind --set-root /SYS.tagpartnew (hd0,2) 0x0B 95674368 29358080partnew (hd0,0) 0x07 28565504 67106816root (hd0,2)makeactiveroot (hd0,0)chainloader /bootmgrboot#end WinToGOtitle ShutdownhaltSo that it automatically selects the entry 1 and loads the UEFI mode but on reboot the menu.lst on WIM10 partition will automatically load Return To Main Menu so I basically have only one main menu?
  14. I have found something that works http://clover-wiki.zetam.org/Contents now my new question is if you have a grub menu.lst on one part eg (hd0,1) and another (hd0,0) how can I auto load a menu entry from (hd0,1) menu.lst through the menu.lst on (hd0,0)? Please help me EG. menu.lst on (hd0,0) title (hd0,1)root (hd0,1)chainloader /grldrboot#Autoselect option two on menu.lst of (hd0,1)menu.lst on (hd0,1) title Windowsroot (hd0,2)chainloader /bootmgrtitle reboothalt
  15. Okay new question how do I load the wiindows 8 install dvd parition into efi mode so I can do a reinstall on a gpt disk?
×
×
  • Create New...