Bills Gate Posted June 9, 2004 Share Posted June 9, 2004 Hi guys, Im new here and Im trying to make my first unatteneded..I know this a dumb question, but how do I call one reg file from another reg file ?I know how to call a batch from within a batch, but I just don't know what code to use to call a reg file from a reg file...I have two registry files, one called tweaks.reg and one called runonce.reg, I want to keep this layout for clarity of editing...What code do I need to add to the end of the 'tweaks.reg' to get it to call the 'runonce.reg' after it ?Both files are located in the same folder.and before you all start shouting to search the forum, I DID, but I get a 'page cannot be displayed' error when I search for ANYTHING on this forum, so I assume the search is broken or something, I get the 'your search has been completed please wait while we transfer you' screen, but then I get the error of page can't be displayed, it doesn't matter what I search for, can someone tell me if the search is working ok here at the moment ? I never had problems before...Thanks for any info on this simple question... and sorry to be asking dumb questions...TYVM Link to comment Share on other sites More sharing options...
MCT Posted June 9, 2004 Share Posted June 9, 2004 in your .cmd/.bat file, why not just put thisREGEDIT /S file1.regREGEDIT /S file2.reg replace filenames with your ownor u can add an entry in "RunOnce" in registry 2 run file #2 when the pc starts up again (but that defeats the purpose of unattended really) so suggestion #1 is best HTH Link to comment Share on other sites More sharing options...
Bills Gate Posted June 9, 2004 Author Share Posted June 9, 2004 Hmmm, that doesn't help Im afraid, but thanks lots for the prompt post !!!! My reasons for needing this particular line of code are very very specific.Without going in to an over elaborate explanation, I must be able to call the runonce.reg file from the last line of the tweaks.reg and need to know the line of code I would use to do that, given they are in the same folder..At the moment the two files are infact one big long file which does run fine, but for clarity of editing I would prefer to use two files and call the second one from the end of the first one...Can anyone tell me what code I need to use to achive this ? Alternatives and work arounds are of no use to me.Thanks guy's..Bill Link to comment Share on other sites More sharing options...
Alanoll Posted June 9, 2004 Share Posted June 9, 2004 why don't you just call them seperately? it would have the same effect.by the way, you can't call a registry file from with a registry file like a batch file can. They weren't designed that way. They were just made to to import registry settings, not to execute things. the registry file with the RunOnce keys doesn't execute the program, RunDll32 does when it see the RunOnce keys in the registry. Link to comment Share on other sites More sharing options...
jdoe Posted June 9, 2004 Share Posted June 9, 2004 Why don't just merge them together? Link to comment Share on other sites More sharing options...
johann83 Posted June 9, 2004 Share Posted June 9, 2004 Alternatives and work arounds are of no use to me.Looks like you don't really want an answer then, because what you want to do cannot be done. Sorry... Link to comment Share on other sites More sharing options...
ZoSTeR Posted June 9, 2004 Share Posted June 9, 2004 My reasons for needing this particular line of code are very very specific.Without going in to an over elaborate explanation...Well trust me, people around here deal with very specific stuff all day Just tell us what the final result is you're looking for and I'm sure there's a solution. Link to comment Share on other sites More sharing options...
Bills Gate Posted June 9, 2004 Author Share Posted June 9, 2004 @ Alanoll : Yes, calling them individually would indeed be the best option, but sadly I don't have the ability to modify the code that executes the first file, it's a routine written by someone else which calls a single reg file of a pre-determined name which can not be changed or it doesn't find it. Thats the best soloution for sure, but I regret it's not an option, but thanks lots for your time and input, I did not know you couldn't call one reg file from another... darn... Sincere thanks to you !@ jdoe : if you read my second post in this thread, you would have seen that at the moment they ARE merged together in one big long file, however for simplicity of editing just the parts I need, I would have liked to have two files, one for tweaks and one for runonce, so when I come to update this in 6 months and I can't remember what I did, it would be easier to do, I guess I just can't have it that way, no harm in asking tho, right ?@ johann83 : If I didn't want an answer, I wouldn't have asked the question, what I did not ask for however, was your opionions on what I may or may not have needed, a simple 'thats not possible' like Alanoll was kind enough to explain, would have sufficed... I couldn't put it any more simply, how can I call one reg file from another ? Its not rocket science.. my reasons for needing that answer and not an alternative answer are not up for discussion, it was a simple enough question and a simple answer was all I was looking for...@ ZoSTeR : Thanks for that input, I can't really be any more specific, I wanted one reg file to call the other one, but I think Alanoll has infact answered my question with a resounding 'Windows won't let you do that as it's not designed that way'... I can solve this one my self using a multitude of different methods, but none of them were exactly what I was looking for, one file calling the other was...Sadly it can't be done as I intended, as already stated, no harm in asking tho, right ?Thanks to all who posted, and in particular Alanoll, if an admin would be kind enough to close this thread for me, I would be grateful Link to comment Share on other sites More sharing options...
Alanoll Posted June 9, 2004 Share Posted June 9, 2004 can't you edit the script?if the script is simple, perhaps just adding another line? or if it's just a line that calls the reg file, change the entry to a batch file that then calls teh two reg files..... Link to comment Share on other sites More sharing options...
sleepnmojo Posted June 9, 2004 Share Posted June 9, 2004 The only way I can think of doing what you want is if you had a key to the run section of either HKLM, or HKCU. Have that run a REGEDIT. That will require another restart though.Other than that, there is no other way. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now