Digg this topic Add to my del.icio.us Submit to SlashDot 4 Pages V  < 1 2 3 4 >  
Reply to this topicStart new topic
> patchman for nuno
sanbarrow
post Jan 8 2007, 11:20 PM
Post #11


Advanced Member
***

Group: Developer
Posts: 154
Joined: 13-October 06
From: Germany - Sauerland
Member No.: 755



Can anybody help me with an autoit-problem ?

I have done this before but today it looks like I am not the brightest (IMG:http://www.boot-land.net/forums/style_emoticons/default/confused1.gif)

Ok - I have a registry-file - lets say patch.reg
I have scanned registry which controlset to use - so now I want to replace all occurances in patch.reg of the string
"ControlSet001"
with the string
"Controlset00" & $selectDefault

$selectDefault is already declared.

How do I do it ?
Sorry for asking such simple stuff ...
thanks

Ulli
Go to the top of the page
 
+Quote Post
TheHive
post Jan 9 2007, 03:47 AM
Post #12


Advanced Member
***

Group: .script developer
Posts: 1,899
Joined: 14-July 06
Member No.: 5



QUOTE
Anyway - nowadays even the guys from VMware Inc. - reference my site for details on vmx-files - see
http://sanbarrow.com/vmx.html
lol! Thats a compliment from them.
Go to the top of the page
 
+Quote Post
sanbarrow
post Jan 9 2007, 03:23 PM
Post #13


Advanced Member
***

Group: Developer
Posts: 154
Joined: 13-October 06
From: Germany - Sauerland
Member No.: 755



QUOTE (TheHive @ Jan 9 2007, 04:47 AM) *
lol! Thats a compliment from them.


Nope - that's simply the result of a stupid attitude towards their users:

VMware wants that users do not fiddle with vmx-files as this can produce lots of hard to find problems.
That is ok - I agree with that.
It would be ok - if almost all settings that a user will ever need would be available via the GUI.
Well that was the case with early Workstation 2 maybe ...

Nowadays the GUI covers only about 50% of the options that are necessary in daily use.
So VMware forces the user to fiddle with the vmx-file - inspite of the fact that they do all to disencourage this.
Their logic goes on like this: users should not fiddle with the vmx-file - so we better do not document these parameters on our own website - as our stupid customers would make so much errors with hand-editing this file that the workload on our support would increase a lot.

The result is that is that this parameters are documented on a hobbyists website - possibly including lots of errors ... (IMG:http://www.boot-land.net/forums/style_emoticons/default/thumbdown.gif)

Just take one example - nowadays Workstation can use a virtual Intel E1000 Nic. This is much better for some guests than the default AMD or VMXnet device.
As the user can not set this via the GUI in a simple way - he either can not use this advanced option at all - or he has to google strange sites and fiddle with the vmx-file again - completely stupid attitude.

I offer cooperation to VMware on this vmx-documentation since almost 3 years: I asked them - leak some information on the useful parameters and I will remove all the really dangerous stuff.
Result - I once got a list of very-dangerous parameters that can seriously mess up system performance - that's all.

There is a small sign of hope though - one of the Interface-designers asked me how they can improve their GUI - and we started to discuss that kind of stuff here
http://sanbarrow.com/phpBB2/viewforum.php?f=21

Well enough of that rant now (IMG:http://www.boot-land.net/forums/style_emoticons/default/yammer.gif) - I repeat that kind of rant every 2 or 3 months in the VMware-forum and it hasn't changed a bit ...
(use the search for "vmx-parameters" - user "continuum" if you are interested ...(

Ulli
Go to the top of the page
 
+Quote Post
TheHive
post Jan 9 2007, 04:10 PM
Post #14


Advanced Member
***

Group: .script developer
Posts: 1,899
Joined: 14-July 06
Member No.: 5



Thanks for the clarification. It makes more sense now.
Go to the top of the page
 
+Quote Post
jaclaz
post Jan 16 2007, 12:32 PM
Post #15


Finder
***

Group: Advanced user
Posts: 1,185
Joined: 14-July 06
Member No.: 2


Italy


QUOTE
Jaclaz - that is the raw-disk description for a 34,74 GB raptor-ide-disk.
Only thing I need is a way how to read the value for the extent description - in this case it is 72303840 - from the MBR.

VMware has published the specs for their disks - I'll look up the link or can send you the pdf directly if you do not want to register on the VMware-site.
I can also send you a couple of MBRs together with the descriptorfiles if that helps.
I plan to use the dsfok-tools to read that value - just don't know which bytes I have to read


I had a look at it.

If I am not wrong, that number is the total amount of sectors on the disk, this value is not written anywhere in the MBR, you need a function to interrogate the actual drive.

Luckily enough, MBRFIX by kaare smith does just that (between other things).
http://www.sysint.no/Nedlasting/MbrFix.htm
http://www.sysint.no/Nedlasting/MbrFix.zip
http://home.graffiti.net/jaclaz:graffiti.net/index.html
http://home.graffiti.net/jaclaz:graffiti.n...X/mbrfix0.2.zip


Only problem is that it reports the size in bytes and the number is bigger than range allowed into "normal" batch scripts.
Cannot say if Auto-it has better capabilities.

This small batch displays the values for the first four drives:

CODE

@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
if not exist mbrfix.exe goto :Error
Set MAX=4
Set counter=0
:LOOP
Set nextcom=mbrfix /drive %counter% driveinfo
FOR /F "tokens=1,2,3,4 delims= " %%A in ('%nextcom%') DO (
IF %%A==Drive ECHO %%A %%B
IF %%A%%B==Disksize (
ECHO %%A %%B %%D
ECHO Size in sectors will be %%D / 512
)
IF %%A%%B==Functionfailed. ECHO NO drive present
)

ECHO.
Set /A counter=%counter%+1
IF NOT %counter%==%MAX% GOTO :LOOP


Try using it on your "test" drive to check if the value is correct, then see if you can manage numbers that big in Auto.it, otherwise post again and I'll see if I can find some "trick" to make that division in batch...

jaclaz
Go to the top of the page
 
+Quote Post
jaclaz
post Jan 16 2007, 03:30 PM
Post #16


Finder
***

Group: Advanced user
Posts: 1,185
Joined: 14-July 06
Member No.: 2


Italy


Ok,
I managed to jolt down a (rather inelegant) batch solution:
CODE

@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
SET number=%1
IF %1.==. GOTO :EOF

Set counter=1
:loop
SET chars=!number:~0,%counter%!
SET /A tempSECTORS=!chars! / 512
SET /A tempREMAINS="!chars! %% 512"
IF !tempsectors! gtr 0 (
SET /A Firstpart=!tempSECTORS!
SET /A charshift=!counter!
SET /A remains=!tempREMAINS!
)
Set /A counter=!counter!+1
IF NOT !chars!==!number! goto :loop

SET LENGTH=!Counter!

Set /A numremains=!LENGTH!-!charshift!
Set /A counter=!numremains!
IF !counter! ==1 goto :loop3

:loop2
Set /A firstpart=!firstpart! * 10
Set /A counter=!counter!-1
IF !counter! gtr 1 goto :loop2

Set /A counter=!numremains!
:loop3
Set /A remains=!remains! * 10
Set /A counter=!counter!-1
IF !counter! gtr 1 goto :loop3

SET chars=!number:~%charshift%,%LENGTH%!
SET /A secondpart=!chars!+!remains!
SET /A secondpart=!secondpart!/512

SET /A sectors =!firstpart!+!secondpart!
ECHO.
ECHO !NUMBER! bytes / 512 = !SECTORS! Sectors


that appears to manage the division correctly.... (IMG:http://www.boot-land.net/forums/style_emoticons/default/thumbsup.gif)

It can undoubtedly be bettered and simplified, should you need it.

jaclaz
Go to the top of the page
 
+Quote Post
sanbarrow
post Jan 16 2007, 10:17 PM
Post #17


Advanced Member
***

Group: Developer
Posts: 154
Joined: 13-October 06
From: Germany - Sauerland
Member No.: 755



Cool - Mr.MBR strikes again (IMG:http://www.boot-land.net/forums/style_emoticons/default/thumbsup.gif)

I'll try that against some of my disks tomorrow.

Interesting that you linked LifeView-site today ...

Maybe we can use the size to create a growing virtual-disk with the quemu-tool.
Once we got that we can use vdk.exe to add a snapshot to it.
Then maybe we can replace the quemu-disk with the raw-disk descriptor and do something like Lifeview
without needing all that Jave-environment.

Vdk doesn't create REDOs for raw-disks - that's why the quemu-step inbetween may be necessary ?

Hey - with some help from Nuno we may be able to run VMplayer on one of his miniPEs.
Then we can do stunts the lifeview folks haven't even thought of (IMG:http://www.boot-land.net/forums/style_emoticons/default/what.gif)
Go to the top of the page
 
+Quote Post
Nuno Brito
post Jan 17 2007, 11:03 AM
Post #18


Advanced Member
***

Group: .script developer
Posts: 4,280
Joined: 13-July 06
From: Azores
Member No.: 1


Portugal


Sounds fun to try! (IMG:http://www.boot-land.net/forums/style_emoticons/default/thumbup.gif)

I actually think that these "miniPE"'s actually do belong to the community since we all work on them.. (IMG:http://www.boot-land.net/forums/style_emoticons/default/cheers.gif)
Go to the top of the page
 
+Quote Post
sanbarrow
post Jan 17 2007, 02:15 PM
Post #19


Advanced Member
***

Group: Developer
Posts: 154
Joined: 13-October 06
From: Germany - Sauerland
Member No.: 755



QUOTE (Nuno Brito @ Jan 17 2007, 12:03 PM) *
Sounds fun to try! (IMG:http://www.boot-land.net/forums/style_emoticons/default/thumbup.gif)

I actually think that these "miniPE"'s actually do belong to the community since we all work on them.. (IMG:http://www.boot-land.net/forums/style_emoticons/default/cheers.gif)


At the moment you have to exclude me from the "we" - I even wasn't able to built one without errors so far ...
I have no idea how the .script idea works yet.

But I can prepare a VMplayer so that someone else translates it into the .script format - in case anyone is willing to do that.
I guess that I may even get the OK from VMware to redistribute it if we build a clean package - which is easy to built.

All I need is a small PE with solid network and explorer-shell.
It may take a few weeks till I find the time to do that - want to finish the patchman first.

Nuno - I made a first minipe last week and noticed that you use B: for the RAMdrive and format it with FAT322.
Can this be discussed ? - It makes useing things that are easy on a NTFS-formatted RAMdrive as R: impossible.
I would really like to adopt to your base-built for my MOA-stuff but this is definetely a No Go.

I hope that I simply missed something but haven't looked into Winbuilder closely enough to know.

Can you comment - please.
(IMG:http://www.boot-land.net/forums/style_emoticons/default/tabletalk.gif)

Ulli
Go to the top of the page
 
+Quote Post
Nuno Brito
post Jan 17 2007, 02:42 PM
Post #20


Advanced Member
***

Group: .script developer
Posts: 4,280
Joined: 13-July 06
From: Azores
Member No.: 1


Portugal


You should try out the latest winbuilder beta and check the projects inside, liveXP is still with some bugs, but I'm sure nativeEx should work flawless.

I haven't done the ramdisk script - it was Ove's work:
http://www.ove.boot-land.net/ramdisk.html

Perhaps the drive can be quick formated on startup:
http://www.911cd.net/forums//index.php?showtopic=6580

Using:
CODE
FORMAT B: /FS:NTFS /Q /C /V:RAMDISK /y



There is also the work of d4vros:
CODE
; PE Builder v3 plug-in INF
; Created by d4vr0s
; http://www.ramdisk.tk/
; http://maxrealqnx.tripod.com
; Many thanks to the author for all of his help
; 2005-11-13

[Version]
Signature= "$Windows NT$"

[PEBuilder]
Name="RamDrive 5.3.1.5"
Enable=1

[Strings]
RamDiskDriveLetter="B:"

[SourceDisksFiles]
files\ramdriv.sys=4,,1
files\ramdriv.dll=2,,4

[SetupReg.AddReg]
0x1,"ControlSet001\Control\Class\{FFB1C341-4539-11D3-B88D-00C04FAD5172}","Class","RAMDriv"
0x1,"ControlSet001\Control\Class\{FFB1C341-4539-11D3-B88D-00C04FAD5172}",,"RAM Drive"
0x1,"ControlSet001\Control\Class\{FFB1C341-4539-11D3-B88D-00C04FAD5172}","Installer32","RAMDriv.dll,ClassInstaller"
0x1,"ControlSet001\Control\Class\{FFB1C341-4539-11D3-B88D-00C04FAD5172}","Icon","105"
0x1,"ControlSet001\Control\Class\{FFB1C341-4539-11D3-B88D-00C04FAD5172}","EnumPropPages32","RAMDriv.dll,PropPageProvider"
0x1,"ControlSet001\Control\Class\{FFB1C341-4539-11D3-B88D-00C04FAD5172}000","InfSection","DiskInstall"
0x1,"ControlSet001\Control\Class\{FFB1C341-4539-11D3-B88D-00C04FAD5172}000","InfSectionExt",".NT"
0x1,"ControlSet001\Control\Class\{FFB1C341-4539-11D3-B88D-00C04FAD5172}000","ProviderName","QSoft"
0x1,"ControlSet001\Control\Class\{FFB1C341-4539-11D3-B88D-00C04FAD5172}000","DriverDesc","RAMDrive [ QSoft ]"
;--------------------------------------------------------------------------------------
0x4, "ControlSet001\Services\Ramdriv","Type", 0x00000001
0x4, "ControlSet001\Services\Ramdriv","Start", 0x00000002
0x4, "ControlSet001\Services\Ramdriv","ErrorControl", 0x00000001
0x1, "ControlSet001\Services\Ramdriv","DisplayName","Ramdisk [ QSoft ]"
0x1, "ControlSet001\Services\Ramdriv","ImagePath","system32\drivers\ramdriv.sys"
0x1, "ControlSet001\Services\Ramdriv\Enum","0","Root\UNKNOWN\1000"
0x4, "ControlSet001\Services\Ramdriv\Enum","Count", 0x00000001
0x4, "ControlSet001\Services\Ramdriv\Enum","NextInstance", 0x00000001
0x1, "ControlSet001\Enum\Root\UNKNOWN\1000","ClassGUID","{FFB1C341-4539-11D3-B88D-00C04FAD5172}"
0x1, "ControlSet001\Enum\Root\UNKNOWN\1000","Class","RAMDriv"
0x4, "ControlSet001\Enum\Root\UNKNOWN\1000","ConfigFlags", 0x00000004
0x1, "ControlSet001\Enum\Root\UNKNOWN\1000","Mfg","QSoft"
0x7, "ControlSet001\Enum\Root\UNKNOWN\1000","HardwareID","ramdriv"
0x1, "ControlSet001\Enum\Root\UNKNOWN\1000","Service","RAMDriv"
0x1, "ControlSet001\Enum\Root\UNKNOWN\1000","DeviceDesc","Ramdisk [ QSoft ]"
0x4, "ControlSet001\Enum\Root\UNKNOWN\1000","Capabilities", 0x00000000
0x1, "ControlSet001\Enum\Root\UNKNOWN\1000","Driver","{FFB1C341-4539-11D3-B88D-00C04FAD5172}001"
0x1, "ControlSet001\Enum\Root\UNKNOWN\1000\Control","ActiveService","RAMDriv"
;--------------------------------------------------------------------------------------
0x2, "ControlSet001\Control\Session Manager\Environment", "temp", "%RamDiskDriveLetter%"
0x2, "ControlSet001\Control\Session Manager\Environment", "tmp", "%RamDiskDriveLetter%\"
0x2, "ControlSet001\Control\Session Manager\Environment", "ramdrv", "%RamDiskDriveLetter%"
; Letter
0x1,"ControlSet001\Services\Ramdriv\Parameters","DriveLetter","%RamDiskDriveLetter%"
0x1,"ControlSet001\Services\Ramdriv\Parameters","VolumeName","RAMDisk"
0x4,"ControlSet001\Services\Ramdriv\Parameters","VolumeID",0x12345678
0x4,"ControlSet001\Services\Ramdriv\Parameters","BreakOnEntry",0x0
0x4,"ControlSet001\Services\Ramdriv\Parameters","DebugLevel",0x5
0x4,"ControlSet001\Services\Ramdriv\Parameters","DebugComp",0xFFFFFFFF
0x4,"ControlSet001\Services\Ramdriv\Parameters","AutoResize",0x1
0x4,"ControlSet001\Services\Ramdriv\Parameters","DiskCompression",0x1
0x1,"ControlSet001\Services\Ramdriv\Parameters","Format","NTFS"
0x4,"ControlSet001\Services\Ramdriv\Parameters","DiskIndexingService",0x0
0x4,"ControlSet001\Services\Ramdriv\Parameters","AllowedPAGEDPoolBanks",0xFFFFFFFF
;--------------------------------------------------------------------------------------
; Configurable settings
; Kept for reference - 32mb disk size
0x3,"ControlSet001\Services\Ramdriv\Parameters","DiskSize",00,00,00,02,00,00,00,00
0x4,"ControlSet001\Services\Ramdriv\Parameters","AllowedNPAGEPoolBanks",0x1
0x4,"ControlSet001\Services\Ramdriv\Parameters","AllowedMDLPGPoolBanks",0xFFFFFFFE
; You may turn this to "zero" , but then the ramdisk may grab all memory of that type away from other drivers.
; 0x1 recommened
0x4,"ControlSet001\Services\Ramdriv\Parameters","ExcludedNPAGEPoolBanks",0x1
0x3,"ControlSet001\Services\Ramdriv\Parameters","MDLPGExcludedMap",\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,13
;--------------------------------------------------------------------------------------
0x4,"ControlSet001\Services\Ramdriv\Parameters","AllowedNCACHPoolBanks",0xFFFFFFFF
0x4,"ControlSet001\Services\Ramdriv\Parameters","AllowedCONCAPoolBanks",0xFFFFFFFF
0x4,"ControlSet001\Services\Ramdriv\Parameters","ExcludedPAGEDPoolBanks",0xFFFFFFFF
0x4,"ControlSet001\Services\Ramdriv\Parameters","ExcludedCONCAPoolBanks",0xFFFFFFFF
;0x1,"ControlSet001\Services\Ramdriv\Parameters","ImageFile","\??\X:\I386\SYSTEM32\RAMDISKIMAGE.IMG"
;0x4,"ControlSet001\Services\Ramdriv\Parameters","LoadImage",0x1
;0x4,"ControlSet001\Services\Ramdriv\Parameters","SaveImage",0x0
;0x1,"ControlSet001\Services\Ramdriv\ImageFileProcessing","ProgramPath","RamDiskImage.exe"
; 0xFFFFFFFF = Disabled
; 0xFFFFFFFE = use all possible available


Wich can be used with:
http://members.fortunecity.com/ramdisk/RAM.../ramdiskpro.htm


If you read closely the plugin code you'll see that it is possible to define the ramdisk to use NTFS instead of Fat32 - script work muck alike plugins, the difference is that you load and unload hives as needed and specify the keys to write.

Perhaps the best way to learn is reading how Ove's ramdisk script was done - you'll see that it's easier than it looks.. (IMG:http://www.boot-land.net/forums/style_emoticons/default/smile.gif)
Go to the top of the page
 
+Quote Post
« Next Oldest · Submit your program · Next Newest »
 

4 Pages V  < 1 2 3 4 >
Fast ReplyReply to this topicStart new topic

Members Who Viewed Topic Today ()

 

Display Mode: Standard · Switch to: Linear+ · Switch to: Outline

Track this topic · Email this topic · Print this topic · Subscribe to this forum

RSS Lo-Fi Version Time is now: 2nd November 2007 - 11:43 PM

MKPortal ©2003-2006 mkportal.it