VBscript to apply .reg file

  • Thread starter Thread starter Damo_Suzuki
  • Start date Start date
D

Damo_Suzuki

hi,
I have a .reg file that changes the screen resolution. I need this .reg
file to be applied through a vbscript, Anyone have any idea how to do
this ?
thanks in advance
 
hi,
I have a .reg file that changes the screen resolution. I need this .reg
file to be applied through a vbscript, Anyone have any idea how to do
this ?
thanks in advance

Does it *have* to be through VBScript?

Since you're posting this in an XP-specific newsgroup, have a look at the
REG command. Specifically, REG IMPORT.
 
However, a VB Script can be used to manipulate the Registry directly.

I was tempted to suggest that, but given that the original poster already
has his .reg file, and without knowing exactly how big that file is, it's
probably easier to just import it.
 
If all its doing is changing the screen res, it can't be that big :-)

Throw in a binary field, and it's just easier to import a reg file than to
create the entry in VBScript. :-p

To the original poster: care to post the content of your .reg file? I'm
curious to know what registry entries you're editing to change resolution.
 
Here is the .reg file . I need two different resolutions , one for when
the laptop is docked and one for when its using an external LCD

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\IBM\NPdirect\Data\Common\Presentation
Schemes\Dual Display]
"UserCreatedScheme"=dword:00000001
"OrderOfScheme"=dword:00000000
"DisplayDeviceMode"=dword:00000003
"AutomaticOpenFile"=dword:00000001
"PresentationFileName"=""
"CleanDesktop"=dword:00000000
"DisablePMTimers"=dword:00000000
"DisableScreenSaver"=dword:00000000
"EnableThinkLight"=dword:00000000
"EnableWallPaper"=dword:00000000
"WallpaperStyle"=dword:00000001
"WallPaperFileName"=""
"IsCapture"=dword:00000000
"CRTisProjector"=dword:00000000
"ShowScheme"=dword:00000001
"ExtendedPosition"=dword:00000001

[HKEY_CURRENT_USER\Software\IBM\NPdirect\Data\Common\Presentation
Schemes\Dual Display\00]
"DisplayDeviceMode"=dword:00000003
"Resolution"=dword:03000400
"ColorDepth"=dword:00000020
"RefreshRate.LCD"=dword:00000000
"RefreshRate"=dword:00000000
"TVSignalFormat"=dword:00000000
"CRTCConfig"=dword:00000001
"DeviceForCRTC.0"=dword:00000001
"DeviceForCRTC.1"=dword:00000000

[HKEY_CURRENT_USER\Software\IBM\NPdirect\Data\Common\Presentation
Schemes\Dual Display\01]
"DisplayDeviceMode"=dword:00000003
"Resolution"=dword:04000500
"ColorDepth"=dword:00000020
"RefreshRate.LCD"=dword:00000000
"RefreshRate"=dword:0000003c
"TVSignalFormat"=dword:00000000
"CRTCConfig"=dword:00000002
"DeviceForCRTC.0"=dword:00000000
"DeviceForCRTC.1"=dword:00000002
 
Here is the .reg file . I need two different resolutions , one for when
the laptop is docked and one for when its using an external LCD

<snip>

Oooh, proprietary IBM stuff... ;-)
 
Back
Top