Guide: Automated 3D Vision Switch and Personalised Settings
[justify]TL;DR:
1. Download the file at the bottom and unzip it to your c:\ drive.
2. Drag the shortcuts onto taskbar or desktop / assign them to a hotkey on your programmeable keyboard / use AutoHotKey on a standard keyboard.
3Denable or 3Ddisable shortcuts/assigned hotkeys to do all of the following with one simple action:
1. Enable/Disable the 3DVision driver from Control Panel
2. Set all personalised values in the 3DVision driver to your custom personalised preferences (enabling advanced hotkeys / enabling depth hack / setting custom depth / setting custom hotkeys / custom crosshair etc)
3. Bypass the initial 3DVision setup after a new driver install.
You're done.
This is a WIP, so there might be some scripting errors specific to your system we can work through.
=====================
[b]Main body:[/b]
=====================
I find it quite a chore to redo all my settings and go through the nVidia 3D Vision setup every time I upgrade/downgrade a driver. With the advent of VR, I also have to disable 3D Vison before starting up a VR game for vastly improved [s]VR performance[/s]. [i]bo3b points out that in recent drivers, S3D in the control panel is automatically disabled when VR is run.
[/i]
For the uninitiated, while 3D Vision may be toggled off, leaving it on in the nvidia control panel will significantly degrade 2D gaming and VR performance.
Similar to my old depth hack, I have made a small script which:
1. Enables 3D vision and sets all personalised 3D Vision driver settings, and bypasses 3DV setup
2. Disables 3D vision and sets all personalised 3D Vision driver settings, and bypasses 3DV setup
The idea is that, after a new driver install, or before starting up a 3D Vision/3D/2D game, you simply click on the shortcut or hotkey, to enable/disable 3D Vision driver from the control panel, as well as setting all personalized settings. This saves a lot of hassle, especially if you are like me and like to mess around with different things throughout the day - someone even recently mentioned the windows 10 problem of green screening full screen videos when the 3D Vision driver is enabled - this is a time saving workaround for all those issues.
I remember that a few people have done something similar in the past, but I can't find those posts now, and the old toggles no longer work for me. A special mention goes to our friend TsaebehT for finding the Monitor Size Override dword!
There might be a better way to do this, but this is what has worked for me with my limited programming skills.
Edit: bo3b has done an extensive write-up on "Handy batch file to fix 3D settings", with excellent explanations here: [url]https://forums.geforce.com/default/topic/544995/handy-batch-file-to-fix-3d-settings/[/url] -- ~this is what I was originally looking for.
This is what we will need (everything has been included in the attached zip):
[b]nvstlink.exe[/b] - this is in the 3D Vision folder in Program Files x86, and is used to enable/disable 3D Vision
[b]regini.exe[/b] - this changes keys in the registry
[b]s3dtoggle.txt[/b] commands to send to regini.exe
[b]3Denable/3Ddisable.bat[/b] files to automate the process
=====================
[b]s3dtoggle.txt:[/b]
=====================
Please customise this to your liking.
This will contain all the personalised values you want to set within the driver, and you can edit out/add in the values as you like. The important ones to keep are:
[b]MonitorSizeOverride[/b] - TsaebehT's override which is a depth hack. Please look here for its explanation:
[url]https://forums.geforce.com/default/topic/930853/[/url]
[b]StereoVisionConfirmed[/b] - you don't have to go through the 3D Vision setup process for the umpteenth time.
[b]StereoAdvancedHKConfig[/b] - enable advanced convergence controls
The rest are personalisations such as specific hotkeys to enable lasersight, or the lasersight file itself. You can find the personalised values within the registry at:
64 bit
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\NVIDIA Corporation\Global\Stereo3D
32 bit
HKEY_LOCAL_MACHINE\SOFTWARE\NVIDIA Corporation\Global\Stereo3D
[code]\Registry\Machine\SOFTWARE\Wow6432Node\NVIDIA Corporation\Global\Stereo3D
MonitorSizeOverride = REG_DWORD 0x0000000F
StereoVisionConfirmed = REG_DWORD 0x00000001
StereoAdvancedHKConfig = REG_DWORD 0x00000001
StereoDefaultOn = REG_DWORD 0x00000001
StereoViewerType = REG_DWORD 0x00000001
ToggleLaserSight = REG_DWORD 0x00000248 <-- my personalised lasersight hotkey (Ctl+H)
LaserSightIndex = REG_DWORD 0x00000009 <-- note both these have to be the same number
LaserSightFile = REG_SZ DLL:9 <-- note both these have to be the same number
StereoSeparation = REG_DWORD 0x00000042[/code]
=====================
[b]3Denable.bat/3Ddisable.bat[/b]
=====================
vstlink.exe needs to be used to enable/disable 3DVision from the control panel. [s]We hit a little snag here due to protection in later Windows Operating Systems. Windows will not allow you to make changes to files inside the Program Files directories without administrative permissions. You can easily bypass this by creating a shortcut to the bat files and changing the properties of the batch files shortcuts to enable "Run as Administrator" under advanced settings. Unfortunately, if you want to convert the batch file to an exe file (as I did), then this will not work even when the created .exe has administrative privileges.
So, for max compatibility, what I have done is to automatically create a new folder called C:\nvstlink. When the batch file is run, it:
1. Deletes any vstlink.exe in that direcotry
2. Copies the current version of vstlink.exe from C:\Program Files (x86)\NVIDIA Corporation\3D Vision\ into C:\nvstlink. It then performs a command using this most recent version of vstlink.exe which enables or disables 3D Vision from the control panel. This means that it is always compatible with whatever driver version you install and whatever OS you use with the usual set permissions.[/s]
TsaebehT has kindly written far nicer code for us, as below:
[b]3Denable.bat[/b]
[code]regini.exe 3Dtoggle.txt
@echo off
"C:\Program Files (x86)\NVIDIA Corporation\3D Vision\nvstlink.exe" /enable[/code]
[b]3Ddisable.bat[/b]
[code]regini.exe 3Dtoggle.txt
@echo off
"C:\Program Files (x86)\NVIDIA Corporation\3D Vision\nvstlink.exe" /disable
[/code]
=====================
[b]How to use this?[/b]
=====================
Download 3DVToggle.zip from the following link and unzip it into your C:\. You should now have a folder C:\3DVToggle. Drag and drop the shortcuts onto your desktop or quicklaunch taskbar, or assign them hotkeys using your programmeable keyboard keys, or AutoHotKey (http://ahkscript.org/) for single-click 3DVision enabling/Disabling and restoring of all 3D Vision personalised settings.
https://www.dropbox.com/s/7e7l1rstrh19bc1/3DVToggle.zip?dl=0
Let me know if you guys find this useful, or if you hit a snag and I can try and help. Hopefully the more knowledgeable people with more programming experience will also help :)[/justify]
======================================
Alternative method written by TsaebehT
======================================
This method uses files enable.VBS, Disable.VBS, and your personal UserDefined.Reg. This is a more eloquent solution as it uses registry keys which can be exported directly from the registry, and only makes changes to the registry once after a new driver install.
Link to his post as follows:
Posts #10 an #12
https://forums.geforce.com/default/topic/990832/3d-vision/guide-automated-3d-vision-switch-and-personalised-settings/post/5072502/#5072502
TL;DR:
1. Download the file at the bottom and unzip it to your c:\ drive.
2. Drag the shortcuts onto taskbar or desktop / assign them to a hotkey on your programmeable keyboard / use AutoHotKey on a standard keyboard.
3Denable or 3Ddisable shortcuts/assigned hotkeys to do all of the following with one simple action:
1. Enable/Disable the 3DVision driver from Control Panel
2. Set all personalised values in the 3DVision driver to your custom personalised preferences (enabling advanced hotkeys / enabling depth hack / setting custom depth / setting custom hotkeys / custom crosshair etc)
3. Bypass the initial 3DVision setup after a new driver install.
You're done.
This is a WIP, so there might be some scripting errors specific to your system we can work through.
===================== Main body:
=====================
I find it quite a chore to redo all my settings and go through the nVidia 3D Vision setup every time I upgrade/downgrade a driver. With the advent of VR, I also have to disable 3D Vison before starting up a VR game for vastly improved VR performance. bo3b points out that in recent drivers, S3D in the control panel is automatically disabled when VR is run.
For the uninitiated, while 3D Vision may be toggled off, leaving it on in the nvidia control panel will significantly degrade 2D gaming and VR performance.
Similar to my old depth hack, I have made a small script which:
1. Enables 3D vision and sets all personalised 3D Vision driver settings, and bypasses 3DV setup
2. Disables 3D vision and sets all personalised 3D Vision driver settings, and bypasses 3DV setup
The idea is that, after a new driver install, or before starting up a 3D Vision/3D/2D game, you simply click on the shortcut or hotkey, to enable/disable 3D Vision driver from the control panel, as well as setting all personalized settings. This saves a lot of hassle, especially if you are like me and like to mess around with different things throughout the day - someone even recently mentioned the windows 10 problem of green screening full screen videos when the 3D Vision driver is enabled - this is a time saving workaround for all those issues.
I remember that a few people have done something similar in the past, but I can't find those posts now, and the old toggles no longer work for me. A special mention goes to our friend TsaebehT for finding the Monitor Size Override dword!
There might be a better way to do this, but this is what has worked for me with my limited programming skills.
This is what we will need (everything has been included in the attached zip):
nvstlink.exe - this is in the 3D Vision folder in Program Files x86, and is used to enable/disable 3D Vision regini.exe - this changes keys in the registry s3dtoggle.txt commands to send to regini.exe 3Denable/3Ddisable.bat files to automate the process
Please customise this to your liking.
This will contain all the personalised values you want to set within the driver, and you can edit out/add in the values as you like. The important ones to keep are:
MonitorSizeOverride - TsaebehT's override which is a depth hack. Please look here for its explanation: https://forums.geforce.com/default/topic/930853/ StereoVisionConfirmed - you don't have to go through the 3D Vision setup process for the umpteenth time. StereoAdvancedHKConfig - enable advanced convergence controls
The rest are personalisations such as specific hotkeys to enable lasersight, or the lasersight file itself. You can find the personalised values within the registry at:
64 bit
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\NVIDIA Corporation\Global\Stereo3D
32 bit
HKEY_LOCAL_MACHINE\SOFTWARE\NVIDIA Corporation\Global\Stereo3D
\Registry\Machine\SOFTWARE\Wow6432Node\NVIDIA Corporation\Global\Stereo3D
MonitorSizeOverride = REG_DWORD 0x0000000F
StereoVisionConfirmed = REG_DWORD 0x00000001
StereoAdvancedHKConfig = REG_DWORD 0x00000001
StereoDefaultOn = REG_DWORD 0x00000001
StereoViewerType = REG_DWORD 0x00000001
ToggleLaserSight = REG_DWORD 0x00000248 <-- my personalised lasersight hotkey (Ctl+H)
LaserSightIndex = REG_DWORD 0x00000009 <-- note both these have to be the same number
LaserSightFile = REG_SZ DLL:9 <-- note both these have to be the same number
StereoSeparation = REG_DWORD 0x00000042
vstlink.exe needs to be used to enable/disable 3DVision from the control panel. We hit a little snag here due to protection in later Windows Operating Systems. Windows will not allow you to make changes to files inside the Program Files directories without administrative permissions. You can easily bypass this by creating a shortcut to the bat files and changing the properties of the batch files shortcuts to enable "Run as Administrator" under advanced settings. Unfortunately, if you want to convert the batch file to an exe file (as I did), then this will not work even when the created .exe has administrative privileges.
So, for max compatibility, what I have done is to automatically create a new folder called C:\nvstlink. When the batch file is run, it:
1. Deletes any vstlink.exe in that direcotry
2. Copies the current version of vstlink.exe from C:\Program Files (x86)\NVIDIA Corporation\3D Vision\ into C:\nvstlink. It then performs a command using this most recent version of vstlink.exe which enables or disables 3D Vision from the control panel. This means that it is always compatible with whatever driver version you install and whatever OS you use with the usual set permissions.
TsaebehT has kindly written far nicer code for us, as below:
3Denable.bat
regini.exe 3Dtoggle.txt
@echo off
"C:\Program Files (x86)\NVIDIA Corporation\3D Vision\nvstlink.exe" /enable
3Ddisable.bat
regini.exe 3Dtoggle.txt
@echo off
"C:\Program Files (x86)\NVIDIA Corporation\3D Vision\nvstlink.exe" /disable
===================== How to use this?
=====================
Download 3DVToggle.zip from the following link and unzip it into your C:\. You should now have a folder C:\3DVToggle. Drag and drop the shortcuts onto your desktop or quicklaunch taskbar, or assign them hotkeys using your programmeable keyboard keys, or AutoHotKey (http://ahkscript.org/) for single-click 3DVision enabling/Disabling and restoring of all 3D Vision personalised settings.
https://www.dropbox.com/s/7e7l1rstrh19bc1/3DVToggle.zip?dl=0
Let me know if you guys find this useful, or if you hit a snag and I can try and help. Hopefully the more knowledgeable people with more programming experience will also help :)
======================================
Alternative method written by TsaebehT
======================================
This method uses files enable.VBS, Disable.VBS, and your personal UserDefined.Reg. This is a more eloquent solution as it uses registry keys which can be exported directly from the registry, and only makes changes to the registry once after a new driver install.
Nice thing!
Thank you for sharing that.
It's nice to keep the settings ready when trying to find a driver who work well for you.
Same for easy toggle between ON and OFF.
It reminds me Advanced 3D Vision Configuration:
http://helixmod.blogspot.fr/2015/10/advanced-3d-vision-configuration.html
But with more advanced features (Laser choice and ability to toggle ON/OFF the 3D).
Handy batch file for doing initial setup:
https://forums.geforce.com/default/topic/544995/handy-batch-file-to-fix-3d-settings/
Might be some details in there that are helpful.
BTW, the most recent drivers actually disable 3D Vision automatically when VR is running. This is actually a problem for me, not a feature, but might be worth looking at. I'm not sure when this arrived.
BTW, the most recent drivers actually disable 3D Vision automatically when VR is running. This is actually a problem for me, not a feature, but might be worth looking at. I'm not sure when this arrived.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607 Latest 3Dmigoto Release Bo3b's School for ShaderHackers
[quote="bo3b"]BTW, the most recent drivers actually disable 3D Vision automatically when VR is running. This is actually a problem for me, not a feature, but might be worth looking at. I'm not sure when this arrived.[/quote]Oh, annoying. On a related note I was playing around with some app the other week that supported running on either VR or a monitor, but the launch options didn't work properly and it *always* initialised VR and that wreaked havoc for trying to get it to work with 3D Vision - I ended up having to move the SteamVR folder out of the way to force VR initialisation to fail. I was thinking it might not be a bad idea to add a feature to 3DMigoto to hook into SteamVR and force it to fail in case we run into more of these problems. Unplugging the headset might have worked, but that is not really convenient.
bo3b said:BTW, the most recent drivers actually disable 3D Vision automatically when VR is running. This is actually a problem for me, not a feature, but might be worth looking at. I'm not sure when this arrived.
Oh, annoying. On a related note I was playing around with some app the other week that supported running on either VR or a monitor, but the launch options didn't work properly and it *always* initialised VR and that wreaked havoc for trying to get it to work with 3D Vision - I ended up having to move the SteamVR folder out of the way to force VR initialisation to fail. I was thinking it might not be a bad idea to add a feature to 3DMigoto to hook into SteamVR and force it to fail in case we run into more of these problems. Unplugging the headset might have worked, but that is not really convenient.
2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit
I'm pretty sure you want these lines:
regini.exe s3denable.txt
regini.exe s3ddisable.txt
to read:
regini.exe s3dtoggle.txt
I guess I'm not sure why we're copying "C:\Program Files (x86)\NVIDIA Corporation\3D Vision\nvstlink.exe" to another Folder when it can be run directly where it is without the need for Start or /Min... and I'd only run RegIni on Enable.
Enable:
[code]regini.exe s3denable.txt
@Echo Off
"C:\Program Files (x86)\NVIDIA Corporation\3D Vision\nvstlink.exe" /enable[/code]
Disable:[code]@Echo Off
"C:\Program Files (x86)\NVIDIA Corporation\3D Vision\nvstlink.exe" /disable[/code]
I'd also suggest using RegEdit/*.REG on Enable, because it self elevates, and making it check the Registry before it updates it, that way it would only self elevate after a Driver install... I could whip something up sometime tomorrow if you want.
I'm pretty sure you want these lines:
regini.exe s3denable.txt
regini.exe s3ddisable.txt
to read:
regini.exe s3dtoggle.txt
I guess I'm not sure why we're copying "C:\Program Files (x86)\NVIDIA Corporation\3D Vision\nvstlink.exe" to another Folder when it can be run directly where it is without the need for Start or /Min... and I'd only run RegIni on Enable.
Enable:
regini.exe s3denable.txt
@Echo Off
"C:\Program Files (x86)\NVIDIA Corporation\3D Vision\nvstlink.exe" /enable
Disable:
@Echo Off
"C:\Program Files (x86)\NVIDIA Corporation\3D Vision\nvstlink.exe" /disable
I'd also suggest using RegEdit/*.REG on Enable, because it self elevates, and making it check the Registry before it updates it, that way it would only self elevate after a Driver install... I could whip something up sometime tomorrow if you want.
[quote="DarkStarSword"][quote="bo3b"]BTW, the most recent drivers actually disable 3D Vision automatically when VR is running. This is actually a problem for me, not a feature, but might be worth looking at. I'm not sure when this arrived.[/quote]Oh, annoying. On a related note I was playing around with some app the other week that supported running on either VR or a monitor, but the launch options didn't work properly and it *always* initialised VR and that wreaked havoc for trying to get it to work with 3D Vision - I ended up having to move the SteamVR folder out of the way to force VR initialisation to fail. I was thinking it might not be a bad idea to add a feature to 3DMigoto to hook into SteamVR and force it to fail in case we run into more of these problems. Unplugging the headset might have worked, but that is not really convenient.[/quote]
For Rift, the easiest way is to stop the Rift service.
[code]net stop "OVRService"[/code]
Batch file to toggle on/off:
[code]sc config OVRService start= demand
net start "OVRService"
if %errorlevel% == 2 net stop "OVRService"[/code]
Haven't run across anything similar for Vive.
I've asked our contacts at NVidia for a solution to the auto-disable function, so maybe we'll get another profile bit or something.
bo3b said:BTW, the most recent drivers actually disable 3D Vision automatically when VR is running. This is actually a problem for me, not a feature, but might be worth looking at. I'm not sure when this arrived.
Oh, annoying. On a related note I was playing around with some app the other week that supported running on either VR or a monitor, but the launch options didn't work properly and it *always* initialised VR and that wreaked havoc for trying to get it to work with 3D Vision - I ended up having to move the SteamVR folder out of the way to force VR initialisation to fail. I was thinking it might not be a bad idea to add a feature to 3DMigoto to hook into SteamVR and force it to fail in case we run into more of these problems. Unplugging the headset might have worked, but that is not really convenient.
For Rift, the easiest way is to stop the Rift service.
net stop "OVRService"
Batch file to toggle on/off:
sc config OVRService start= demand
net start "OVRService"
if %errorlevel% == 2 net stop "OVRService"
Haven't run across anything similar for Vive.
I've asked our contacts at NVidia for a solution to the auto-disable function, so maybe we'll get another profile bit or something.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607 Latest 3Dmigoto Release Bo3b's School for ShaderHackers
Thanks for the input guys, I'm pretty newbish when it comes to programming :)
@bo3b, that page of yours is what I remember seeing from a long time ago - It is what I was after! I have added it to the body.
@TsaebehT, thanks for the correction. I had it correct in the download but forgot to fix it in the post. Now I know how helifax feels when he says he has to spend a lot of time cleaning up his fixes before releasing them to the public :D
I might be wrong as a newbie but my thinking of having the values inserted at both enable.bat and disable.bat is from the usability standpoint - the user can hit either without having to worry about or remember which one is correct and it will just work.
Your enable and disable code works flawlessly!
I'll modify my post to reflect the changes :)
Thanks for the input guys, I'm pretty newbish when it comes to programming :)
@bo3b, that page of yours is what I remember seeing from a long time ago - It is what I was after! I have added it to the body.
@TsaebehT, thanks for the correction. I had it correct in the download but forgot to fix it in the post. Now I know how helifax feels when he says he has to spend a lot of time cleaning up his fixes before releasing them to the public :D
I might be wrong as a newbie but my thinking of having the values inserted at both enable.bat and disable.bat is from the usability standpoint - the user can hit either without having to worry about or remember which one is correct and it will just work.
Your enable and disable code works flawlessly!
I'll modify my post to reflect the changes :)
Windows 10 64-bit, Intel 7700K @ 5.1GHz, 16GB 3600MHz CL15 DDR4 RAM, 2x GTX 1080 SLI, Asus Maximus IX Hero, Sound Blaster ZxR, PCIe Quad SSD, Oculus Rift CV1, DLP Link PGD-150 glasses, ViewSonic PJD6531w 3D DLP Projector @ 1280x800 120Hz native / 2560x1600 120Hz DSR 3D Gaming.
I was going to do something of a start up script for myself but just haven't gotten around to it yet... what I was going to do on start up is have it check if StereoVisionConfirmed = 0, basically what happens after a Driver install. If so, it would update my settings and reenable 3D... we can basically use that here as well...
My reasoning for having the Registry portion only happen on the Enable is because those settings don't matter when you're trying to disable it and disabling it when it's already disabled doesn't affect anything... that and then there's no need for running anything as Admin, when it's necessary to update the Registry then the UAC Prompt will kick in...
For this it would be something along the lines of this...
Enable:
[code]@Echo Off
Reg Query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\NVIDIA Corporation\Global\Stereo3D" /v "StereoVisionConfirmed"|Find "0x0"&&(
RegEdit /S "%cd%\UserDefined.REG"
)
"C:\Program Files (x86)\NVIDIA Corporation\3D Vision\nvstlink.exe" /enable[/code]
...you could use RegEdit to Export your current Stereo3D Key, although there's some portions I'd trim out of them or you can make your own UserDefined.REG using this format:
[quote]Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\NVIDIA Corporation\Global\Stereo3D]
"MonitorSizeOverride"=dword:0000000F
"StereoVisionConfirmed"=dword:00000001
"StereoAdvancedHKConfig"=dword:00000001[/quote]edit:Values MUST be in Hexadecimal
I was going to do something of a start up script for myself but just haven't gotten around to it yet... what I was going to do on start up is have it check if StereoVisionConfirmed = 0, basically what happens after a Driver install. If so, it would update my settings and reenable 3D... we can basically use that here as well...
My reasoning for having the Registry portion only happen on the Enable is because those settings don't matter when you're trying to disable it and disabling it when it's already disabled doesn't affect anything... that and then there's no need for running anything as Admin, when it's necessary to update the Registry then the UAC Prompt will kick in...
For this it would be something along the lines of this...
...you could use RegEdit to Export your current Stereo3D Key, although there's some portions I'd trim out of them or you can make your own UserDefined.REG using this format:
Or better yet rewrite it all in VBS so there's nothing popping up until after a Driver update... :)
Enable.vbs
[code]Set objShell = WScript.CreateObject("WScript.Shell")
On Error Resume Next
if objShell.RegRead("HKLM\SOFTWARE\WOW6432Node\NVIDIA Corporation\Global\Stereo3D\StereoVisionConfirmed") <> "1" Then
objShell.Run ("RegEdit.exe /S """ & objShell.CurrentDirectory & "\UserDefined.REG""")
End if
objShell.Run ("""C:\Program Files (x86)\NVIDIA Corporation\3D Vision\nvstlink.exe"" /enable")[/code]
Disable.vbs
[code]Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run ("""C:\Program Files (x86)\NVIDIA Corporation\3D Vision\nvstlink.exe"" /disable")[/code]
Or better yet rewrite it all in VBS so there's nothing popping up until after a Driver update... :)
Enable.vbs
Set objShell = WScript.CreateObject("WScript.Shell")
On Error Resume Next
if objShell.RegRead("HKLM\SOFTWARE\WOW6432Node\NVIDIA Corporation\Global\Stereo3D\StereoVisionConfirmed") <> "1" Then
objShell.Run ("RegEdit.exe /S """ & objShell.CurrentDirectory & "\UserDefined.REG""")
End if
objShell.Run ("""C:\Program Files (x86)\NVIDIA Corporation\3D Vision\nvstlink.exe"" /enable")
So I ran into a scenario where StereoVisionConfirmed didn't exist at all. Not sure, it might have been due to a clean install... either way the Enable.bat needed to be rewritten so it works when it 'fails', that way it works for both scenarios...
Enable.bat
[code]@Echo Off
Reg Query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\NVIDIA Corporation\Global\Stereo3D" /v "StereoVisionConfirmed"|Find "0x1"||(
RegEdit /S "%cd%\UserDefined.REG"
"C:\Program Files (x86)\NVIDIA Corporation\3D Vision\nvstlink.exe" /enable
)[/code]
So I ran into a scenario where StereoVisionConfirmed didn't exist at all. Not sure, it might have been due to a clean install... either way the Enable.bat needed to be rewritten so it works when it 'fails', that way it works for both scenarios...
1. Download the file at the bottom and unzip it to your c:\ drive.
2. Drag the shortcuts onto taskbar or desktop / assign them to a hotkey on your programmeable keyboard / use AutoHotKey on a standard keyboard.
3Denable or 3Ddisable shortcuts/assigned hotkeys to do all of the following with one simple action:
1. Enable/Disable the 3DVision driver from Control Panel
2. Set all personalised values in the 3DVision driver to your custom personalised preferences (enabling advanced hotkeys / enabling depth hack / setting custom depth / setting custom hotkeys / custom crosshair etc)
3. Bypass the initial 3DVision setup after a new driver install.
You're done.
This is a WIP, so there might be some scripting errors specific to your system we can work through.
=====================
Main body:
=====================
I find it quite a chore to redo all my settings and go through the nVidia 3D Vision setup every time I upgrade/downgrade a driver. With the advent of VR, I also have to disable 3D Vison before starting up a VR game for vastly improved
VR performance. bo3b points out that in recent drivers, S3D in the control panel is automatically disabled when VR is run.For the uninitiated, while 3D Vision may be toggled off, leaving it on in the nvidia control panel will significantly degrade 2D gaming and VR performance.
Similar to my old depth hack, I have made a small script which:
1. Enables 3D vision and sets all personalised 3D Vision driver settings, and bypasses 3DV setup
2. Disables 3D vision and sets all personalised 3D Vision driver settings, and bypasses 3DV setup
The idea is that, after a new driver install, or before starting up a 3D Vision/3D/2D game, you simply click on the shortcut or hotkey, to enable/disable 3D Vision driver from the control panel, as well as setting all personalized settings. This saves a lot of hassle, especially if you are like me and like to mess around with different things throughout the day - someone even recently mentioned the windows 10 problem of green screening full screen videos when the 3D Vision driver is enabled - this is a time saving workaround for all those issues.
I remember that a few people have done something similar in the past, but I can't find those posts now, and the old toggles no longer work for me. A special mention goes to our friend TsaebehT for finding the Monitor Size Override dword!
There might be a better way to do this, but this is what has worked for me with my limited programming skills.
Edit: bo3b has done an extensive write-up on "Handy batch file to fix 3D settings", with excellent explanations here: https://forums.geforce.com/default/topic/544995/handy-batch-file-to-fix-3d-settings/ -- ~this is what I was originally looking for.
This is what we will need (everything has been included in the attached zip):
nvstlink.exe - this is in the 3D Vision folder in Program Files x86, and is used to enable/disable 3D Vision
regini.exe - this changes keys in the registry
s3dtoggle.txt commands to send to regini.exe
3Denable/3Ddisable.bat files to automate the process
=====================
s3dtoggle.txt:
=====================
Please customise this to your liking.
This will contain all the personalised values you want to set within the driver, and you can edit out/add in the values as you like. The important ones to keep are:
MonitorSizeOverride - TsaebehT's override which is a depth hack. Please look here for its explanation:
https://forums.geforce.com/default/topic/930853/
StereoVisionConfirmed - you don't have to go through the 3D Vision setup process for the umpteenth time.
StereoAdvancedHKConfig - enable advanced convergence controls
The rest are personalisations such as specific hotkeys to enable lasersight, or the lasersight file itself. You can find the personalised values within the registry at:
64 bit
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\NVIDIA Corporation\Global\Stereo3D
32 bit
HKEY_LOCAL_MACHINE\SOFTWARE\NVIDIA Corporation\Global\Stereo3D
=====================
3Denable.bat/3Ddisable.bat
=====================
vstlink.exe needs to be used to enable/disable 3DVision from the control panel.
We hit a little snag here due to protection in later Windows Operating Systems. Windows will not allow you to make changes to files inside the Program Files directories without administrative permissions. You can easily bypass this by creating a shortcut to the bat files and changing the properties of the batch files shortcuts to enable "Run as Administrator" under advanced settings. Unfortunately, if you want to convert the batch file to an exe file (as I did), then this will not work even when the created .exe has administrative privileges.
So, for max compatibility, what I have done is to automatically create a new folder called C:\nvstlink. When the batch file is run, it:
1. Deletes any vstlink.exe in that direcotry
2. Copies the current version of vstlink.exe from C:\Program Files (x86)\NVIDIA Corporation\3D Vision\ into C:\nvstlink. It then performs a command using this most recent version of vstlink.exe which enables or disables 3D Vision from the control panel. This means that it is always compatible with whatever driver version you install and whatever OS you use with the usual set permissions.
TsaebehT has kindly written far nicer code for us, as below:
3Denable.bat
3Ddisable.bat
=====================
How to use this?
=====================
Download 3DVToggle.zip from the following link and unzip it into your C:\. You should now have a folder C:\3DVToggle. Drag and drop the shortcuts onto your desktop or quicklaunch taskbar, or assign them hotkeys using your programmeable keyboard keys, or AutoHotKey (http://ahkscript.org/) for single-click 3DVision enabling/Disabling and restoring of all 3D Vision personalised settings.
https://www.dropbox.com/s/7e7l1rstrh19bc1/3DVToggle.zip?dl=0
Let me know if you guys find this useful, or if you hit a snag and I can try and help. Hopefully the more knowledgeable people with more programming experience will also help :)
======================================
Alternative method written by TsaebehT
======================================
This method uses files enable.VBS, Disable.VBS, and your personal UserDefined.Reg. This is a more eloquent solution as it uses registry keys which can be exported directly from the registry, and only makes changes to the registry once after a new driver install.
Link to his post as follows:
Posts #10 an #12
https://forums.geforce.com/default/topic/990832/3d-vision/guide-automated-3d-vision-switch-and-personalised-settings/post/5072502/#5072502
Windows 10 64-bit, Intel 7700K @ 5.1GHz, 16GB 3600MHz CL15 DDR4 RAM, 2x GTX 1080 SLI, Asus Maximus IX Hero, Sound Blaster ZxR, PCIe Quad SSD, Oculus Rift CV1, DLP Link PGD-150 glasses, ViewSonic PJD6531w 3D DLP Projector @ 1280x800 120Hz native / 2560x1600 120Hz DSR 3D Gaming.
Thank you for sharing that.
It's nice to keep the settings ready when trying to find a driver who work well for you.
Same for easy toggle between ON and OFF.
It reminds me Advanced 3D Vision Configuration:
http://helixmod.blogspot.fr/2015/10/advanced-3d-vision-configuration.html
But with more advanced features (Laser choice and ability to toggle ON/OFF the 3D).
https://forums.geforce.com/default/topic/544995/handy-batch-file-to-fix-3d-settings/
Might be some details in there that are helpful.
BTW, the most recent drivers actually disable 3D Vision automatically when VR is running. This is actually a problem for me, not a feature, but might be worth looking at. I'm not sure when this arrived.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers
2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit
Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD
Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword
regini.exe s3denable.txt
regini.exe s3ddisable.txt
to read:
regini.exe s3dtoggle.txt
I guess I'm not sure why we're copying "C:\Program Files (x86)\NVIDIA Corporation\3D Vision\nvstlink.exe" to another Folder when it can be run directly where it is without the need for Start or /Min... and I'd only run RegIni on Enable.
Enable:
Disable:
I'd also suggest using RegEdit/*.REG on Enable, because it self elevates, and making it check the Registry before it updates it, that way it would only self elevate after a Driver install... I could whip something up sometime tomorrow if you want.
[MonitorSizeOverride][Global/Base Profile Tweaks][Depth=IPD]
For Rift, the easiest way is to stop the Rift service.
Batch file to toggle on/off:
Haven't run across anything similar for Vive.
I've asked our contacts at NVidia for a solution to the auto-disable function, so maybe we'll get another profile bit or something.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers
@bo3b, that page of yours is what I remember seeing from a long time ago - It is what I was after! I have added it to the body.
@TsaebehT, thanks for the correction. I had it correct in the download but forgot to fix it in the post. Now I know how helifax feels when he says he has to spend a lot of time cleaning up his fixes before releasing them to the public :D
I might be wrong as a newbie but my thinking of having the values inserted at both enable.bat and disable.bat is from the usability standpoint - the user can hit either without having to worry about or remember which one is correct and it will just work.
Your enable and disable code works flawlessly!
I'll modify my post to reflect the changes :)
Windows 10 64-bit, Intel 7700K @ 5.1GHz, 16GB 3600MHz CL15 DDR4 RAM, 2x GTX 1080 SLI, Asus Maximus IX Hero, Sound Blaster ZxR, PCIe Quad SSD, Oculus Rift CV1, DLP Link PGD-150 glasses, ViewSonic PJD6531w 3D DLP Projector @ 1280x800 120Hz native / 2560x1600 120Hz DSR 3D Gaming.
My reasoning for having the Registry portion only happen on the Enable is because those settings don't matter when you're trying to disable it and disabling it when it's already disabled doesn't affect anything... that and then there's no need for running anything as Admin, when it's necessary to update the Registry then the UAC Prompt will kick in...
For this it would be something along the lines of this...
Enable:
...you could use RegEdit to Export your current Stereo3D Key, although there's some portions I'd trim out of them or you can make your own UserDefined.REG using this format:
edit:Values MUST be in Hexadecimal
[MonitorSizeOverride][Global/Base Profile Tweaks][Depth=IPD]
Good work.
Finally something constructive..... :D
Intel i7 8086K
Gigabyte GTX 1080Ti Aorus Extreme
DDR4 2x8gb 3200mhz Cl14
TV LG OLED65E6V
Windows 10 64bits
Enable.vbs
Disable.vbs
[MonitorSizeOverride][Global/Base Profile Tweaks][Depth=IPD]
Windows 10 64-bit, Intel 7700K @ 5.1GHz, 16GB 3600MHz CL15 DDR4 RAM, 2x GTX 1080 SLI, Asus Maximus IX Hero, Sound Blaster ZxR, PCIe Quad SSD, Oculus Rift CV1, DLP Link PGD-150 glasses, ViewSonic PJD6531w 3D DLP Projector @ 1280x800 120Hz native / 2560x1600 120Hz DSR 3D Gaming.
Enable.bat
[MonitorSizeOverride][Global/Base Profile Tweaks][Depth=IPD]