Tuesday, December 2, 2008

[THIN] Re: Using %username% in registry files

Wonderful! Conceptually, I like scripts that write other scripts. :)


From: thin-bounce@freelists.org [mailto:thin-bounce@freelists.org] On Behalf Of Kevin Stewart
Sent: Tuesday, December 02, 2008 7:41 AM
To: thin@freelists.org
Subject: [THIN] Re: Using %username% in registry files

Worst case you can generate the reg file from script:

@echo off
echo Windows Registry Editor Version 5.00 > tmp.reg
echo [HKEY_CURRENT_USER\Software\Telelogic] >> tmp.reg
echo "DICTIONARY"="C:\\Documents and Settings\\%username%\\dictionary" >> tmp.reg
regedit /s tmp.reg
echo y |del tmp.reg

Kevin

On Tue, Dec 2, 2008 at 8:17 AM, StGeorge <wcsconnect@gmail.com> wrote:
Hector,

Try %%username%%

Regards

Rob


On Tue, Dec 2, 2008 at 10:08 PM, Minero, Hector B CIV NSWCDD, K55 <hector.minero@navy.mil> wrote:

Hi all, is there a way to use the %username% variable in reg files? Something like:

[HKEY_CURRENT_USER\Software\Telelogic]
"DICTIONARY"="C:\Documents and Settings\\%username%\dictionary"

After running it, the "%username%" is entered in their registry.  What's the correct syntax?

Thanks,

_______________________________
Hector Minero
NSWCDD K55





--
Kevin G. Stewart


This message and any attachments may be a confidential attorney-client communication or otherwise be privileged and confidential. If you are not the intended recipient, any review, distribution or copying of this transmittal is prohibited. If you have received this transmittal in error, please reply by e-mail and delete this message and all attachments

No comments: