Computing.Net > Forums > Programming > windows xp batch file, edit .......

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

windows xp batch file, edit .......

Reply to Message Icon

Name: IxNEOxI
Date: January 23, 2004 at 23:29:56 Pacific
OS: windows xp pro
CPU/Ram: p4 3.0 ghz/ 512 ddr400
Comment:

how can i edit the registry from command prompt (batch file) in windows xp. I want the batch file to be able to edit the registry and add something in the startup area to make itself boot when windows does.


im a newb so dont get to complicated, just a simple batch file



Sponsored Link
Ads by Google

Response Number 1
Name: StuartS
Date: January 24, 2004 at 06:05:02 Pacific
Reply:

You would be better creating a .reg file then just running it. This will insert the entries into the registry. Here is my startp registry entry to get you going. Create the entries that you need and save it as STARTUP.REG.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
"AIM"="E:\\AOLInstantMessaging\\aim.exe -cnetwait.odl"
"CCWC7a"="D:\\TOOLS\\Windows Cleaner XP\\ac.exe"
"Magic Notes"="\"E:\\Magic Notes\\Sticky32.exe\""
"TClockEx"="D:\\TOOLS\\TClockEx\\TCLOCKEX.exe"
"HDDHealth"="D:\\TOOLS\\HDD Health\\hddhealth.exe -wl"

Stuart


0

Response Number 2
Name: barteld
Date: January 24, 2004 at 21:24:52 Pacific
Reply:

make a
launch_things.bat
let it read like

c:\docume~1\user\mydocu~1\startm~1\bla\shortcut.lnk
c:\docume~1\user\mydocu~1\startm~1\bla\shortcut2.lnk
or make it

Set shrtct_folder=c:\docume~1\user\mydocu~1\startm~1\bla

%shrtct_folder%\shortcut1.lnk
%shrtct_folder%\shortcut2.lnk
%shrtct_folder%\shortcut3.lnk

etc..
make a shortcut to it in your start/programs/startup folder ;P

batch files and long filename referrings simply dont work together period.
actually its just that any file/folder name with a space in it wont work..

so i always use shortnames

to find out short file/folder names (~1)
u need to use names formatted like that else batch wont work


(if you wanna browse your hdd in dos, go start->run->type 'cmd')
(to find out 8 character-file/folder names of files/folders with long names (needed for making your own items)
use these commands
if its your first time browsing your hdd in DOS it helps to open 'My Computer' on the background)

firsttime-cmd-help
C: or D: or E: or F: to access one of your hard disks (depends on how many hdds you have)
dir /x to find out short formatted file/foldernames (needed in batch files)


CD foldername to access one..
CD foldername\foldername\foldername\etc
CD .. to go one folder back up
CD \ to go to the root of the HDD

most dos commands you get help when u type
'command' /?
example:
dir /?
CD /?
etc


0

Response Number 3
Name: IxNEOxI
Date: January 25, 2004 at 10:58:23 Pacific
Reply:

ok, i got the whole thing to work, in the batch file, i used ,

c:\docume~1\alluse~1\startm~1\programs\startup\

the one thing i didn't know that i did wrong before was for words with spaces in them (ex : all users) i had to cut down to 6 words and get rid of the space, alluse, then put the ~1 to finish off the 8 character DOS names, so it would be alluse~1

thanks barteld

so for anything with a space in it, just to get rid of the space period.

o and thanks stuart for the registry editing one, thats something new i learned also.


0

Response Number 4
Name: Mtin
Date: February 28, 2004 at 04:45:19 Pacific
Reply:

I have tried using the .reg example by stuart which works well except that I get prompts to accept the registry changes. Do you know how I can stop these prompts so that registry changes occur automatically?



0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Com dcom Buffer Overflow in C



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: windows xp batch file, edit .......

Windows Xp Batch files www.computing.net/answers/programming/windows-xp-batch-files/18142.html

Win XP batch file problem www.computing.net/answers/programming/win-xp-batch-file-problem/11239.html

Windows 2000 >> Batch file Problem www.computing.net/answers/programming/windows-2000-batch-file-problem/13167.html