Go Back   TechArena Community > Technical Support > Computer Help > Windows XP > Windows XP Support
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: ,

Sponsored Links



VBscript to apply .reg file

Windows XP Support


Reply
 
Thread Tools Search this Thread
  #1  
Old 02-05-2006
Damo_Suzuki
 
Posts: n/a
VBscript to apply .reg file

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

Reply With Quote
  #2  
Old 03-05-2006
Homer J. Simpson
 
Posts: n/a
Re: VBscript to apply .reg file

> 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.


Reply With Quote
  #3  
Old 03-05-2006
Doug Knox MS-MVP
 
Posts: n/a
Re: VBscript to apply .reg file

Or alternatively, REGEDIT /S <name of REG file>

However, a VB Script can be used to manipulate the Registry directly. See http://msdn.microsoft.com/scripting. Download the documentation for VB Script and the Windows Script Host.

--
Doug Knox, MS-MVP Windows Media Center\Windows Powered Smart Display\Security
Win 95/98/Me/XP Tweaks and Fixes
http://www.dougknox.com
--------------------------------
Per user Group Policy Restrictions for XP Home and XP Pro
http://www.dougknox.com/xp/utils/xp_securityconsole.htm
--------------------------------
Please reply only to the newsgroup so all may benefit.
Unsolicited e-mail is not answered.

"Homer J. Simpson" <root@127.0.0.1> wrote in message news:u5OyIIibGHA.3712@TK2MSFTNGP03.phx.gbl...
>> 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.
>
>

Reply With Quote
  #4  
Old 03-05-2006
Homer J. Simpson
 
Posts: n/a
Re: VBscript to apply .reg file

> 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.


Reply With Quote
  #5  
Old 03-05-2006
Doug Knox MS-MVP
 
Posts: n/a
Re: VBscript to apply .reg file

If all its doing is changing the screen res, it can't be that big :-)

--
Doug Knox, MS-MVP Windows Media Center\Windows Powered Smart Display\Security
Win 95/98/Me/XP Tweaks and Fixes
http://www.dougknox.com
--------------------------------
Per user Group Policy Restrictions for XP Home and XP Pro
http://www.dougknox.com/xp/utils/xp_securityconsole.htm
--------------------------------
Please reply only to the newsgroup so all may benefit.
Unsolicited e-mail is not answered.

"Homer J. Simpson" <root@127.0.0.1> wrote in message news:uWdMtbrbGHA.1260@TK2MSFTNGP05.phx.gbl...
>> 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.
>
>

Reply With Quote
  #6  
Old 03-05-2006
Homer J. Simpson
 
Posts: n/a
Re: VBscript to apply .reg file

> 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.


Reply With Quote
  #7  
Old 04-05-2006
Damo_Suzuki
 
Posts: n/a
Re: VBscript to apply .reg file

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

Reply With Quote
  #8  
Old 04-05-2006
Homer J. Simpson
 
Posts: n/a
Re: VBscript to apply .reg file

> 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... ;-)


Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows XP > Windows XP Support


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "VBscript to apply .reg file"
Thread Thread Starter Forum Replies Last Post
How to run a .bat file with VBScript ? troy Software Development 6 28-11-2011 06:01 PM
Any application to apply a file extension for group of files Tristyn Windows Software 6 03-12-2010 03:28 PM
Vbscript to find latest file BoanHed Software Development 3 23-11-2009 08:38 AM
How can i drag and drop another file on top of the VBScript file Dharmesh Arora Software Development 2 01-06-2009 10:53 PM
Issues when launching a vbscript file from hta interface file Hari Windows Server Help 3 15-04-2009 12:01 AM


All times are GMT +5.5. The time now is 09:51 AM.