Jump to content

WinPE 2.0 GimageX COM based HTA


geezery

Recommended Posts

I think you have a problem with the setres function.

Have you copied the setres.exe from the package to boot.wim Windows\System32\ folder.

'****************************************************************************>
'* Setres Function
'****************************************************************************>
Sub Setres
Dim SetresFile, SysFolder
Set SysFolder = Objfso.GetSpecialFolder(1)
SetResFile = (SysFolder & "\setres.exe ")
If objFso.FileExists(SetResFile) Then
objShell.Run(SetResFile + SetResSettings),0
Else
Exit Sub
End If
End Sub

You can also bypass the error if you change above part to this.

'****************************************************************************>
'* Setres Function
'****************************************************************************>
Sub Setres
on error resume next
Dim SetresFile, SysFolder
Set SysFolder = Objfso.GetSpecialFolder(1)
SetResFile = (SysFolder & "\setres.exe ")
If objFso.FileExists(SetResFile) Then
objShell.Run(SetResFile + SetResSettings),0
Else
Exit Sub
End If
On Error Goto 0
End Sub

Link to comment
Share on other sites


Yes, all the files from the GUI32 zip file have been extracted to windows\ststem32 when the image is mounted.

I think ive found the problem here

in the imageX.hta the line has "1" down for the frequency when it needs to be 60 or nothing at all

setressettings = "1024 768 32 1"

should be

setressettings = "1024 768 32 60"

nope thats not the problem... Cant find out whats wrong but ive supressed the error with geezery's code change

Edited by chiners_68
Link to comment
Share on other sites

creating the image is taking forever... 4% 4 hours to go.

i normally use Drive Image & we image a PC in 10mins max. How comes ImageX is taken so long..?

what do i need to change in the HTA to turn of Verify..?

Edited by chiners_68
Link to comment
Share on other sites

Can you try to run setres with the parameters included in the script straight from the command line and tell me what happens?

I think that there is no way put the /VERIFY switch off when you are capturing image to the network drive, since there is a builtin function in imagex that enables the /verify by default when capturing to network share. I could be wrong, but I don't know any methods for doing that. If it works from command line change the setres function to this.

'****************************************************************************>
'* Setres Function
'****************************************************************************>
Sub Setres
Dim SetresFile, SysFolder
Set SysFolder = Objfso.GetSpecialFolder(1)
SetResFile = (SysFolder & "\setres.exe ")
If objFso.FileExists(SetResFile) Then
'This is the line that runs the setres.exe with the given parameters
objShell.Run "cmd /c " & SetResFile + SetResSettings",0
Else
Exit Sub
End If
End Sub

I didn't have time to test the modified Sub, but I'll hope it works:)

Edited by geezery
Link to comment
Share on other sites

Cheers Geezery,

Ive just noticed from running imageX from the cmd line it verifys. microsft have obviously built that in. Im looking for away of turning it off but I dont think that is going to be possible.

What sort of times do others get copying & image to a network share..? a 40GB drive with 14GB of used space took 2 hours to create an image on my network. If I use my old drive image I can do it in 10 mins.

Ill try the cmd line for setres when this image im doing has finished.

Link to comment
Share on other sites

SETRES worked Ok from the cmd line.

Ive now updated the hta file & I got an error

line 463

char 1

type mismatch 'do task'

this is when the GUI loads & I get the same erro when I now click on your cmd window button.

i think ill reset the setres to the supress error & run set res from startnet.cmd

Edited by chiners_68
Link to comment
Share on other sites

Right, Im creating XP images OK but when I restore one it wont boot into Xp. i think its possibly due to the 15GB c partition & the orginal partition size is 60GB.

how can I set diskpart.txt so I only get 1 partition & the whole size of the HDD. i dont want to diskpart to a specific size as various models of machine have different size HDD's. I want it always to do a single partition the whole size of the drive.

Link to comment
Share on other sites

Sample diskpart.txt file for only one partition

select disk 0
clean
create partition primary
select partition 1
assign letter=c
format fs=ntfs label="system" quick
active
exit

If you got problems booting to new applied system try to manually put the first partition active

type diskpart from the command line:

select disk 0

select partition 1

active

If you had vista bootsector before. you must use the bootsect.com utility witch comes along with WAIK.

bootsect /nt52 c:

Edited by geezery
Link to comment
Share on other sites

@Geezery

Why add the sel partiton 1 then do the assign?

sel disk 0

(sets focus to disk 0)

clean

create part pri (This is part 1)

active

assign letter = blah

format fs=ntfs label="System" quick

or do the format out of diskpart

I know there are allways more than one way to do things.

Link to comment
Share on other sites

so this will make a partition the whole disk size no matter how big the disk is?

select disk 0
clean
create partition primary
select partition 1
assign letter=c
format fs=ntfs label="system" quick
active
exit

The dell units im installing had xp on previous. Im just repartioning & reimaging.

Link to comment
Share on other sites

This is from M$

"When you choose to run a regular format on a volume, files are removed from the volume that you are formatting and the hard disk is scanned for bad sectors. The scan for bad sectors is responsible for the majority of the time that it takes to format a volume.

If you choose the Quick format option, format removes files from the partition, but does not scan the disk for bad sectors. Only use this option if your hard disk has been previously formatted and you are sure that your hard disk is not damaged."

Link to comment
Share on other sites

Geezery,

is there any chance of you adding some options for partitioning when installing an image. A few simple selection would surfice.

1. Selection for 1 partition or 2

2a.Tickbox for full drive partition if only one partition slected.

2b.A box next to this if you want to specify partition size for the 1 partition.

3. If two partition are slected you have two boxes for partition sizes with a tick box next to partition 2 to just fill the rest of the drive after size of partition 1 is set.

If I could write code i would do it but i havent got a clue.

regards

chiners_68

Edited by chiners_68
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...