Trouble writing Path to registry
- From: Jan <kartoffelmensch@xxxxxx>
- Date: Mon, 23 Jul 2007 05:52:15 -0400
hi everyone,
i like to write two paths from edit-fields to the registry using the
following code:
write:
regFile='write_reg.reg';
Dir1 = '[HKEY_CURRENT_USER\Zamomo\PlotDeviation\]';
dirValue = get (handles.EDIT_DIR, 'String');
fileValue = get (handles.EDIT_FILE, 'String');
fp = fopen(regFile,'wt');
fprintf(fp,'REGEDIT4\n');
fprintf(fp,'%s\n',Dir1);
fprintf(fp,'"MatDir"="%s"\n"FileName"="%s"\n', dirValue, fileValue);
fclose(fp);
dos('regedit.exe /s write_reg.reg');
delete ('write_reg.reg');
read:
dirName = winqueryreg('HKEY_CURRENT_USER', 'Zamomo\PlotDeviation\',
'MatDir');
fileName = winqueryreg('HKEY_CURRENT_USER', 'Zamomo\PlotDeviation\',
'FileName');
dirName = num2str(dirName)
fileName = num2str(fileName)
set (handles.EDIT_DIR, 'String', dirName);
set (handles.EDIT_FILE, 'String', fileName);
However, if the path includes a "\" it isnt written to the registry.
Other Strings are written completely fine. I use matlab 7.3 on a
windows2000 machine. Any ideas?
Thanx in advance, Jan
.
- Follow-Ups:
- Re: Trouble writing Path to registry
- From: Jan
- Re: Trouble writing Path to registry
- Prev by Date: www.nike368.com )sell nike air jordans 1-22 shoes
- Next by Date: Re: Need A Matlab Programmer Urgently!!!
- Previous by thread: Distributing compiled applications
- Next by thread: Re: Trouble writing Path to registry
- Index(es):
Relevant Pages
|