Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

Resolved Question

Change from Reg file to Script

Jul 31, 2011 12:37PM PDT

Hi. Would anyone reading this know how to convert this Registry file into a script to run on Windows 7 Professional? Or is there a software that does converts all kinds of registry files to scripts & scripts to a registry file? Kindly advise, thanks.

========

Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT] [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers\PackagePointAndPrint] "PackagePointAndPrintServerList"=dword:00000000 "PackagePointAndPrintOnly"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers\PointAndPrint] "Restricted"=dword:00000000 "TrustedServers"=dword:00000000 "InForest"=dword:00000000

Discussion is locked

mklchan has chosen the best answer to their question. View answer

Best Answer

- Collapse -
Euraka!! Got it.
Aug 23, 2011 1:07PM PDT
- Collapse -
Euraka!! Got it. This is the real deal.
Aug 23, 2011 1:16PM PDT
- Collapse -
Answer
To what end?
Jul 31, 2011 12:54PM PDT

To what end? For all intents and purposes, registry update files ARE already scripts. It's just a matter of whether or not different versions of Windows will respect a given value of an entry you make.

Also, I would recommend exercising some EXTREME caution here since you're planning to tinker with the registry, and clearly have little to no understanding of the registry or you wouldn't be asking such a basic question. The second something goes wrong, you're going to be hopelessly lost, and will likely lack even enough basic understanding to be able to explain what it is that's wrong.

Learning about the Windows Registry will not be pleasant, but at least if you ever develop insomnia you'll have a ready cure on hand. Still, it is necessary background info for someone to have before they go monkeying about in such a sensitive part of the operating system. This is akin to asking some first year med student to perform complex brain surgery.

- Collapse -
No thanks.
Jul 31, 2011 1:27PM PDT

I know what I'm doing even though it's a delicate part of the OS. And I know how to script but not good enough to change it from registry files to scripting. And if you're trying to be sarcastic, not giving any intelligent input or help don't even bother trying to reply. No thanks.

- Collapse -
Obviously you don't
Jul 31, 2011 2:26PM PDT

Obviously you don't, or you wouldn't be here asking for something that is unnecessary. Not only do you seem to not understand what a registry update file is, or how it's treated by the OS, but you seem to think that you're going to find the answer on a Cnet forum. Cnet caters to the technically clueless by and large. I've said it numerous times... From a business perspective, there's absolutely nothing wrong with that, but it doesn't help people like you when you come to a place where most people have no concept of what programming is. So that is the second major blunder, or oversight if that doesn't bruise your ego as much, that you made with a single post, that was effectively about two sentences long.

I get that it probably looked like I dismissed you out of hand, but you made at least two major errors in a single, very short, posting. All I did was pick up on those two errors you made, and use it to make a pretty reasonable inference about your overall skill level. Not to get all zen buddhist, but it's only when we start to understand what it is we don't understand that we have truly learned anything. You haven't even figured that much out yet.

I'm a pretty poor programmer on my best days. I can usually take something someone else has already written and modify it for my needs, but that's about the extent of it. Still, I can think of at least one way around your little problem. It's an ugly kludge, but it would work. The better method would be to spend the time and energy learning the Win32 API for whatever language I was using. That would be a far more elegant and flexible long term solution. Of course it would require learning a bit about the Win32 API in general, and that would probably require learning some OS design theory, which would probably require learning some lower level programming languages, which is a lot of work that most people just aren't willing to do. So you keep building on top of an increasingly fragile foundation, just praying to all the gods that were, are, and ever will be, that the whole thing won't come crashing down around you. There are simply no shortcuts here. You have to put in the time to learn these things. If you're unwilling or unable, hand the project off to someone else, maybe consider a different line of work. There's no shame in recognizing your limits. We can't all Kobe Bryant level basketball players, or Tiger Woods level golfers, or Albert Einstein level intellectuals.

If you set your ego aside for a minute, and take an objective view of the situation, you'll probably find that I'm right. That's why you got so defensive: I struck at a nerve. You don't yet understand what you don't understand. You need to take a couple of steps back and shore up your skill set. Once you do that, the answer to your question should be pretty self-evident.

And just for the record, this is the whole teach a man to fish methodology. I give you the answer, or an answer anyway, and you haven't really learned anything. You spend the time to develop your skill set to encompass this problem, you won't need my help, or anyone else's.

- Collapse -
No Thanks X 10!!
Jul 31, 2011 2:45PM PDT

I know what BEFORE you've even talked about. But unfortunately I'm doing ALL the jobs for now. If I can dedicate them to you I would. But I've got no time to discuss when & how the earth was made or what god you worshipped (which I already KNEW, thanks Einstein). It's NOT about ego, it's about TIME. And I haven't got a lot to go learn EVERYTHING myself. Unless you want to work yourself to hell which you probably already did. I've enough of you. I NEED answers. NOT telling me what to do. No thanks. DON'T reply, thanks.

- Collapse -
Answer
No but you could write one. Here's a start.
Aug 1, 2011 2:53AM PDT
http://ss64.com/nt/reg.html

We see that the command REG does allow you to alter such in the registry without using the .REG file.

So your app could read a .REG and convert it to some .BAT or .CMD with the result being a bunch or REG commands in the script.
Bob
- Collapse -
Thanks.
Aug 1, 2011 8:58AM PDT

Thanks. I'll try this out & see how things work. Appreciate your input.

- Collapse -
Answer
Bob offered you the use of REG ...
Aug 2, 2011 9:39AM PDT
- Collapse -
Or is there another way?
Aug 4, 2011 4:31PM PDT

Hi. I'm still reading & testing from the given URL. And I'm also experimenting http://support.microsoft.com/kb/310516 to try to use the script to run it silently. In which it's still popping up to ask a question to run it. Or is there another way to allow registry files to be run silently without prompting? Kindly suggest. No worries if it sounds silly as long as it works, it's worth a try, thanks.

- Collapse -
I'm going with NO!
Aug 5, 2011 2:24AM PDT

The problems incurred by malware and more has changed windows forever so that silent installs had to be abandoned.

But you knew that.
Bob

- Collapse -
I say you DON'T KNOW.
Aug 5, 2011 10:15AM PDT

I don't believe Microsoft is that stupid to not allow in an AD Domain environment to put things down silently. It's not as if it's a stand alone PC. But thanks anyway.

- Collapse -
Can be done but is NOT SUPPORTED ...
Aug 5, 2011 10:54AM PDT

REGEDIT.EXE has an available /S switch for hiding the confirmation box.

Using a good old BATCH FILE might just be your best bet. Simply create the *.reg file (forget scripting it) then write the batch file to import the edit.

This link should be all you need:
http://www.robvanderwoude.com/regedit.php

- Collapse -
I've already tried.
Aug 5, 2011 7:23PM PDT

Hi I've already tried this but the security on Windows 7 is set to highest. I can't get it to run silently. Tested a few times on my Windows server 2003. I've already mentioned & read that ONLY a windows 2008 R2 server can push down *.reg, *.vbs, *.bat files to all windows 7 clients & above. Windows 2003 can only push to Windows XP Pro & lower versions. Thanks.

- Collapse -
Funny you mention AD.
Aug 5, 2011 12:19PM PDT
- Collapse -
Answer
Better tools like what?
Aug 5, 2011 7:25PM PDT

Yes it's a Domain environment. And I'm stuck with Windows 2003 server to do ALL the GPO pushing. Don't give dead lock answers unless you've got something for me to test, thanks. And better tools like what? Give a name to the tool, thanks.