Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Question about shortcuts for Registry values

14 Nov 2010   #1
t4akawolf

Windows 7 Ultimate x32 (UPDATE: Now x64!)
 
 
Question about shortcuts for Registry values

Greetings my fellow Landwalkers,

I created a 'NoTrayItemDisplay' DWORD with a value of 1 for a program. What I want to know is, can I create shortcuts to modify/change it's value from 1 to 0 and vice versa?

The ideal solution for me would be creating two shortcuts; one which modifies the value to 0 and another which modifies the value to 1.

The perfect solution for me would be some sort of Value Toggle which can toggle between both values...

So, how do I do either of the above solutions? Or is there another solution out there?


My System SpecsSystem Spec
.
14 Nov 2010   #2
Dwarf

Windows 8.1 Pro RTM x64
 
 

What is the registry location?
My System SpecsSystem Spec
14 Nov 2010   #3
t4akawolf

Windows 7 Ultimate x32 (UPDATE: Now x64!)
 
 

Quote   Quote: Originally Posted by Dwarf View Post
What is the registry location?
If you are referring to the place where the DWORD is located, then it is
" Computer\KEY_CURRENT_USER\Software\BitTorrent\uTorrent "

Sorry, I'm a bit of a...scratch that, I AM a noob in these matters. Remember how I said I created a DWORD, well I had to follow step by step instructions to do so...
My System SpecsSystem Spec
.

14 Nov 2010   #4
Dwarf

Windows 8.1 Pro RTM x64
 
 

Here you go. Copy and paste the codes below into Notepad and save them with a suitable name, giving them a .bat extension.

Code:
@ECHO OFF
REG ADD "HKCU\Software\BitTorrent\uTorrent" /v "NoTrayItemDisplay" /t REG_DWORD /d "00000000" /f
Code:
@ECHO OFF
REG ADD "HKCU\Software\BitTorrent\uTorrent" /v "NoTrayItemDisplay" /t REG_DWORD /d "00000001" /f
My System SpecsSystem Spec
14 Nov 2010   #5
t4akawolf

Windows 7 Ultimate x32 (UPDATE: Now x64!)
 
 

Quote   Quote: Originally Posted by Dwarf View Post
Here you go. Copy and paste the codes below into Notepad and save them with a suitable name, giving them a .bat extension.

Code:
@ECHO OFF
REG ADD "HKCU\Software\BitTorrent\uTorrent" /v "NoTrayItemDisplay" /t REG_DWORD /d "00000000" /f
Code:
@ECHO OFF
REG ADD "HKCU\Software\BitTorrent\uTorrent" /v "NoTrayItemDisplay" /t REG_DWORD /d "00000001" /f
Hmmmm, most odd...I tried that and the value does seem to change when I check in Regedit but now, whatever I set the value to, uTorrent seems to open with the icon. Before I created the shortcut, setting the value to 1 manually used to stop the icon...what did I do wrong??
My System SpecsSystem Spec
14 Nov 2010   #6
WindowsStar

Windows 7 Enterprise (x64); Windows Server 2008 R2 (x64)
 
 

Here is a VBScript to flip it back and forth.

Code:
 
' Change Registry Key v1.1.1
' Programmed WindowsStar - Copyright (c) 2010
' ---------------------------------------------------
On Error Resume Next
Set WShShell = WScript.CreateObject("WScript.Shell")
Value = WSHShell.RegRead ("HKCU\Software\BitTorrent\uTorrent\NoTrayItemDisplay")
If Value = "0" Then
   WSHShell.RegWrite "HKCU\Software\BitTorrent\uTorrent\NoTrayItemDisplay", 00000001, "REG_DWORD"
Else
   WSHShell.RegWrite "HKCU\Software\BitTorrent\uTorrent\NoTrayItemDisplay", 00000000, "REG_DWORD"
End If
WshShell.Popup "          Done!",5,"Script Message"


Attached Files
File Type: vbs Change Registry Key v1.1.3.vbs (584 Bytes, 22 views)
My System SpecsSystem Spec
15 Nov 2010   #7
t4akawolf

Windows 7 Ultimate x32 (UPDATE: Now x64!)
 
 

Quote   Quote: Originally Posted by WindowsStar View Post
Here is a VBScript to flip it back and forth.

Code:
 
' Change Registry Key v1.1.1
' Programmed WindowsStar - Copyright (c) 2010
' ---------------------------------------------------
On Error Resume Next
Set WShShell = WScript.CreateObject("WScript.Shell")
Value = WSHShell.RegRead ("HKCU\Software\BitTorrent\uTorrent\NoTrayItemDisplay")
If Value = "0" Then
   WSHShell.RegWrite "HKCU\Software\BitTorrent\uTorrent\NoTrayItemDisplay", 00000001, "REG_DWORD"
Else
   WSHShell.RegWrite "HKCU\Software\BitTorrent\uTorrent\NoTrayItemDisplay", 00000000, "REG_DWORD"
End If
WshShell.Popup "          Done!",5,"Script Message"
Thanks!
My System SpecsSystem Spec
15 Nov 2010   #8
WindowsStar

Windows 7 Enterprise (x64); Windows Server 2008 R2 (x64)
 
 

Quote   Quote: Originally Posted by t4akawolf View Post
Quote   Quote: Originally Posted by WindowsStar View Post
Here is a VBScript to flip it back and forth.

Code:
 
' Change Registry Key v1.1.1
' Programmed WindowsStar - Copyright (c) 2010
' ---------------------------------------------------
On Error Resume Next
Set WShShell = WScript.CreateObject("WScript.Shell")
Value = WSHShell.RegRead ("HKCU\Software\BitTorrent\uTorrent\NoTrayItemDisplay")
If Value = "0" Then
   WSHShell.RegWrite "HKCU\Software\BitTorrent\uTorrent\NoTrayItemDisplay", 00000001, "REG_DWORD"
Else
   WSHShell.RegWrite "HKCU\Software\BitTorrent\uTorrent\NoTrayItemDisplay", 00000000, "REG_DWORD"
End If
WshShell.Popup "          Done!",5,"Script Message"
Thanks!
You are very welcome.
My System SpecsSystem Spec
Reply

 Question about shortcuts for Registry values




Thread Tools




Similar help and support threads
Thread Forum
Unable to delete Blackberry registry keys & values
Hello, I'm running Win7Pro SP1 with all updates. I recently tried to delete all Blackberry software (desktop Manager, etc.) from my computer and found the software was not listed in the PROGRAMS section of Control Panel so I could not UNINSTALL it. So I deleted the folders with program data and...
General Discussion
Registry values of one specific program
How i can search and backup ALL VALUES of entire registry for and only specific program so i can restore it to another one? I want that because i have issues with bsplayer and doen's play some audio of files before it play normally. I already try complete uninstal including registry valies...
Backup and Restore
Registry Values Resetting After Connecting To A Domain
Hi everyone. Sorry if this problem has been posted somewhere else but I can't seem to find a solution for this. So when I go into Regedit.exe to change the values of the taskbar context menu as it is originally disabled, it stays fine and I can right click on the taskbar without a problem...
General Discussion
Registry - "Unable to Delete all specific values."
I want ask a weird Question ... sorry if i post at wrong threads ... when i open regedit , i suddenly delete the wrong registry i want to delete , and appear this message "Unable to Delete all specific values." is that mean that registry not deleted right? is that mean that registry is safe? not...
General Discussion
Registry values for msachi and iaStorV "Start" variable
Right now my values for both HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Msahci and HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\iaStorV Start variables are set to "3" My system configuration consists of:
General Discussion
Direct Group Policy features as Registry values in Win7 Home Premium ?
Win7 Home Premium does NOT contain the well known GroupPolicy Editor. This is a feature only in Win7 Pro and above. What is exactly meant by "Group Policy Editor": The tool "gpedit.msc" (from former WinXP) or the group policy features itself? If only the tool is meant then the Home Premium...
Performance & Maintenance


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 13:39.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App