JayDogg Posted January 3, 2009 Author Share Posted January 3, 2009 Cool thanks you very much, I totaly get it now Im a bit of a newbie with batch and cmd file. Hey do you know if you can call a cmd file from bat file. I ask cause on my windows disk after it installs and boots up for the first time it runs a setup.bat which install some programs and cleans up the start menu and so on and this is when I want the cmd to run. So can I call it for the batch file or start or run it? now sure with way would be the right way.Thanks for all your help Link to comment Share on other sites More sharing options...
JayDogg Posted January 3, 2009 Author Share Posted January 3, 2009 ok I have tested it and it looks like I can call it from a batch script. =)Can you make sure this code is right for me @Reg "HKEY_CLASSES_ROOT\Directory\shell\Command Prompt\command" /ve /d"\"cmd.exe\" /k cd \"%%1\"" /f>NulHere is what the .reg key I exported saysWindows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\Directory\shell\Command Prompt\command]@="cmd.exe /k cd %1" Link to comment Share on other sites More sharing options...
Yzöwl Posted January 3, 2009 Share Posted January 3, 2009 This should do:@Reg add "HKCR\Directory\shell\Command Prompt\command" /ve /d"cmd.exe /k cd \"%%1\"" /f>Nulor as I said before@Reg add "HKLM\SOFTWARE\Classes\Directory\shell\Command Prompt\command" /ve /d"cmd.exe /k cd \"%%1\"" /f>NulIncidentally .bat is for legacy use and for your purposes is not required, you should rename those .bat files to .cmd.You can run scripts from another either directly using the Start command or using the Call command. Link to comment Share on other sites More sharing options...
JayDogg Posted January 4, 2009 Author Share Posted January 4, 2009 (edited) Ok im so close to being done I can taste it. The .cmd Im running (which I have uploaded) runs the first 2 reg adds but gets held up on the third (I have uploaded a pic). Can you help me fix what ever is wrong with this last reg add. Cool little note instead of starting or calling the cmd file I drop it in the $OEM$ to be dropped in the start menu start up so it all works right it will run on the first start up and delete it self. =) and I have already tested if I get that last one up and running my disk is done... till V.3PS If you fix the cmd file it would be really cool if you uploaded it back to me =)reg.cmd Edited January 5, 2009 by JayDogg Link to comment Share on other sites More sharing options...
Yzöwl Posted January 4, 2009 Share Posted January 4, 2009 Try the attached.fixed.zip Link to comment Share on other sites More sharing options...
JayDogg Posted January 4, 2009 Author Share Posted January 4, 2009 (edited) Dam so close but it for some reason doesnt delete it self at the end so when the pc restarts it gets stuck in this loop( I uploaded an error image for you to see)Thanks so so so much for all your help Edited January 5, 2009 by JayDogg Link to comment Share on other sites More sharing options...
Yzöwl Posted January 4, 2009 Share Posted January 4, 2009 Change the name of your script, preferably to something which is also not the name, (without extension), of an existing file in %Path%.Instead of:Del %0You could also use this as your last line:Start/b %Comspec% /c @Del "%~f0" Link to comment Share on other sites More sharing options...
JayDogg Posted January 5, 2009 Author Share Posted January 5, 2009 (edited) Cool thanks you so much my disk is working great =) I just did a test install and it went of with out a hitch. Now there was one last thing I wanted to do but I dont even know if it can be done. I have an image.dll which gets dropped to C:\windows\system32 and that cmd file you helped me with to register it (Regsvr32 %SystemRoot%\system32\image.dll /s) now what the dll does is it adds an image to the right click menu when you right click on your desktop. I would like to make the image that is in the right click menu, when clicked on open the systems properties (same place that opens when you right click on my computer and go to properties). But I have no and I mean no idea on how to do that. Any ideas? I have uploaded the image.dllP.S. I didnt not make the dll, I download it and used reshacker to add my own image =) but I uploaded the one I downloaded so it has not been editedImage.rar Edited January 5, 2009 by JayDogg Link to comment Share on other sites More sharing options...
JayDogg Posted January 5, 2009 Author Share Posted January 5, 2009 Hey is there a way to donate to the site like a pay pal account or something. This site has helped me so much I would like to give back or somthing =)THANKS Link to comment Share on other sites More sharing options...
Yzöwl Posted January 5, 2009 Share Posted January 5, 2009 I'm a little busy ATM, so I'll take a look at your problem when I've got more time.Until then, see if this 'floats your boat' 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