Discussion Locked

How to run REGEDIT.EXE silently ?

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am using "REGEDIT.EXE filename.reg" in a logon script w/ KIXtart, it works but always prompt the user a confirm window.

What is the correct parameter? I tried "/s" but it didn't work, also look by "regedit /?" under DOS, there is no such option.

I know I can use ADDKEY and WRITEVALUE in KIX to do this, but I really don't want to rewtite more than 30 lines of customized registry again in KIX since I already have my .reg file done.

8 replies

by achen2002

The error message when I used "REGEDIT.EXE /s filename.reg":
--------------------------------------
Can not import xxx.reg: Error opening the file: There may be a disk or file system error.
--------------------------------------

PLEASE DO NOTTHINK THERE IS DISK OR FILE PROBLEM, see the following tests:

Try 1:
When I try "REGEDIT.EXE filename.reg", it shows confirm windows for adding filename.reg, so I know it works but I just don't want that message pop out for my users.

Try 2:
When I try "REGEDIT.EXE filename.reg /s", it shows 2 confirm windows, one for filename.reg, the other one for "/s", it takes the string as one thing I want to add by REGEDIT. >_<

So obviously it is not any of file/disk problems.

by achen2002

I tried both
"regedit.EXE /s filename.reg" and
"regedit /s filename.reg"

They didn't work, both pop out the error message:
--------------------------------------
Can not import xxx.reg: Error opening the file: There may be a disk or file system error.
--------------------------------------

And once again, it is NOT disk or file error because when I took out "/s", it works.

by syscokid

I am able to duplicate your problem at the command prompt, but ONLY if I use the incorrect syntax you first cited:

REGEDIT.EXE filename.reg /s

First I get a dialog box telling me the info was successfully imported, which I have to click OK. Then I get the box that says "Can not import xxx.reg: Error opening the file: There may be a disk or file system error." and I have to click OK again.

The behavior DOES NOT occur if I use the correct syntax:
REGEDIT.EXE /s filename.reg

The process works, no dialog box.

You must be using the wrong syntax.

by achen2002

I don't like the word "rejected" because you guys all helped, yet my problem has not been solved so I can not release the points...

Well, it looks like I should turn the issue to "how to call the REGEDIT in KIX and run it silently", what I used is RUN command and the rest are exactly as what I said in the questions, I've already double checked the syntax.

What I do in the KIX file is like this:
RUN "REGEDIT /s filename.reg"

I tried to use SHELL instead of RUN, still shows the same error window.

by jimbb

Hi,

To be honest I don't know a thing about KIXstart, being a Novell guy, but we do have similar problems when trying to let ZENworks, via a policy or an application, execute a similar command while in the "system" context in stead of as the "user". The idea is that user "system" doesn't have access to the files on the server, in our case the workstation has to have at least read rights.

Don't know if this is similar to your case, but would it help if you first copied the .REG file to the PC, and then executed regedit, rather than run regedit \\server\share\file.reg? I would presume that to be able to execute Regedit, one needs to have the right to do so, and to avoid that, your KIX script impersonates someone with the appropriate rights, so...?

Jim

This discussion is closed to new replies.