Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

desktop shortcuts

Status
Not open for further replies.

knerve1

Programmer
Mar 28, 2005
20
0
0
US
I have an application that sits on a test as well as a production server. On the win2k client in order to change from test to production, I must go into the registry and modify a Server Profile setting. I go into the setting and remove a few alpha characters to access test and add them back to access production.

I do not want to keep doing this. Is there a way set up a desktop shortcut or add a registry setting so that there are two registry settings? One pointing to production and one pointing to test.

Shortcut A = Test

Shortcut B = Production

Thank you, any help is greatly appreciated.
 
If you create two reg files one that sets it to test and one to production server.

Then you only need to create two batch files that call these reg files for you at a click of a button.

For some more information look at this page

---
Make the best use of what is in your power, and take the rest as it happens.
 
I have been on your site and it is awesome. Thanks. I am trying a Call statement in DOS. I am completely new to this. I created another registry setting so now I have a setting that goes to test and one that goes to production. What I don't understand is how to put the path for the registry setting in.

The site says to use this format:


CALL [drive:][path]filename [batch-parameters]

So I input below

CALL

[MyComputer:]\HKEY_LOCAL_MACHINE\SOFTWARE\******\***\Profile\******\ServerProfile1


EXIT

It tells me path is not recognized. What am I doing wrong?
 
I have a similar task that I need to do. I created a batch file that creates a .reg file (file that you use to add things to your registry), runs the .reg file and then deletes the .reg file. I do this on Windows XP but I think it will work in 2000. Here is an example...

CD C:\
ECHO Windows Registry Editor Version 5.00>Reg.txt
ECHO.>>Reg.txt
ECHO [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]>>Reg.txt
ECHO.>>Reg.txt
ECHO "KEYHERE"="STRING">>REG.txt
REN Reg.txt Reg.reg
START /WAIT Reg.reg
DEL Reg.reg

It creates a file on the C: drive called Reg.txt. In the text file it reads..
----------------------------------------------
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]

"KEYHERE"="STRING"
------------------------------------------

Obviously your HKEY line, Key and string will be different. Like I said, this should work, but let me know for sure.

Also, if you need me to break down the lines of the batch file, I'll be happy to do that for you.
 
Here is one of my scripts I use to import a .reg file. Basically what you can do it set the reg key up then export it. go back in and set the reg key up the second way you have it set then export the key (calling it something different) then use this script to import the according .reg file back intot he registry

ECHO w2kregistryscript.bat, Version 1.00 for Windows 2000 Terminal Server
ECHO Merges exported registered registry key back into the registry
ECHO.
ECHO Written by Mark Morton

@ECHO OFF

:: Merge's wtklm.reg to local current registry
:Merge
REGEDIT /S c:\scripts\wtplm.reg

END

Mark Morton, MCSA, MCP, SNA, CCA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top