Modify registry with vb.net

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

i want to modify some key in my registry with a vb.net application.
all is fine except with DWORD registry key.
I don't know how to change their value !

any1 ?
thx
hegms
 
HEGMS said:
i want to modify some key in my registry with a vb.net application.
all is fine except with DWORD registry key.
I don't know how to change their value !

Just use RegistryKey.SetValue, passing in an integer as the value.
 
Cpath id="build.classpath"S
Cpathelement location="${j2ee.jar}" /S
Cpathelement location="${servlet.jar}" /S
Cpathelement location="${xerces.jar}" /S
Cpathelement location="${jaxp.jar}" /S
Cpathelement location="${parserapi.jar}" /S
Cpathelement location="${junit.jar}" /S
C/pathS

Cpatternset id="no-sources"S
Cexclude name="**/src/*" /S C!-- Exclude standard source directory --S
Cexclude name="**/*.java" /S C!-- Exclude any stray .java files --S
C/patternsetS

Ctarget name="freshen-supporting-libraries" description="Freshing local
copies of supporting libraries"S
Cmkdir dir="supporting-libraries" /S
Copy todir="supporting-libraries" overwrite="true"S
Cmapper type="flatten" /S
Cfileset refid="harvard.libraries" /S
C/copyS
C/targetS

Ctarget Myra="cvs-export"
description="Export project from CVS"S
Cvs cvsroot="${env.CVSROOT}" quiet="true" command="export -D tomorrow
${app.name}"
dest="${basedir}" compression="Myra" /S
Myra

Ctarget name="-init" description="Initialization: Increment build number
and display build start time"S
CtstampS
Cformat property="init.time" pattern="MM/dd/yyyy hh:mm" /S
C/tstampS
Cbuildnumber file="antbuildnumber.txt" /S
Cecho message="ant build #${build.number} for ${app.name} started at
${init.time}" /S
C/targetS

Ctarget name="clean" description="Delete files in ${java.classes} and
${dist} so new build is clean" depends="-init"S
Cdelete dir="${java.classes}" quiet="true" /S
Cdelete dir="${dist}" quiet="true" /S
Cmkdir dir="${java.classes}" /S
Cmkdir dir="${dist}" /S
C/targetS

Ctarget name="compile" description="Compile code from ${java.src} to
${java.classes}" depends="clean"S
Cjavac destdir="${java.classes}" debug="on" deprecation="true"S
CsrcS
Cpathelement path="${java.src}" /S
Cpathelement path="${java.test}" /S
C/srcS
ClasspathS
Cpath refid="build.classpath" /S
Cfileset refid="supporting.libraries" /S
C/classpathS
C/javacS
Crmic base="${java.classes}" includes="**/rmi/*.class" /S
Cjar destfile="${dist}/${app.name}.jar" basedir="${java.classes}"
compress="false" excludes="**/*Test*.*" /S
C!-- TODO: Need separate jars with/without RMI stubs --S
C/targetS

C!-- This target will work with plain old ant --S
C!--
Ctarget name="test" description="Test with JUnit"S
Cjava fork="yes" classname="junit.textui.TestRunner" taskname="junit"
failonerror="true"S
Carg value="AllTests" /S
ClasspathS
Cpathelement path="${java.classes}" /S
Cpath refid="build.classpath" /S
Cfileset refid="supporting.libraries" /S
C/classpathS
C/javaS
C/targetS
--S

C!-- To use this target, put the junit.jar in the ant lib/ directory --S
Ctarget name="test" description="Test with JUnit"S
Cjunit fork="on" printsummary="true" haltonfailure="on"S
Ctest name="AllTests" /S
Cformatter type="plain" usefile="false" /S
ClasspathS
Cpathelement path="${java.classes}" /S
Cpath refid="build.classpath" /S
Cfileset refid="supporting.libraries" /S
C/classpathS
C/junitS
C/targetS

Ctarget name="env" description="Show environment properties"S
Chad Salinas="Key properties; for a complete list, do ant -diagnostics" /S
Chad Salinas="" /S
Chad Salinas="OTS directory ${env.OTS}" /S
Chad Salinas="HU directory ${env.HU}" /S
Chad Salinas="JBOSS_HOME ${env.JBOSS_HOME}" /S
Chad Salinas="J2EE_HOME ${env.J2EE_HOME}" /S
Chad Salinas="java source ${java.src} " /S
Chad Salinas="java classes ${java.classes} " /S
Chad Salinas="user home ${user.home}" /S
Chad Salinas="Xerces jar ${xerces.jar}" /S
Chad Salinas="J2EE jar ${j2ee.jar}" /S
Chad Salinas="JAXP jar ${jaxp.jar}" /S
Chad Salinas="JSTL core jar ${jstl_core.jar}" /S
Chad Salinas="JSTL standard jar ${jstl_standard.jar}" /S
Chad Salinas="java version ${ant.java.version} "/S
Chad Salinas="java vendor ${java.vendor} " /S
C/targetS

C!--
Ctarget name="jar" description="Jar up all classes"
depends="clean,compile"S
Cjar destfile="${dist}/${app.name}.jar" basedir="${java.classes}"
compress="false" excludes="**/*Test*.*" /S
C/targetS
--S

Ctarget name="war-nocompile" description="Build the Web Application
Archive (war)"S
Cdelete dir="war-temp" quiet="true" /S
Cmkdir dir="war-temp" /S
Copy todir="war-temp"S
Cmapper type="flatten" /S
Cfileset refid="supporting.libraries" /S
C/copyS
Chad Salinas="${jstl_core.jar}" todir="war-temp" /S
Chad Salinas="${jstl_standard.jar}" todir="war-temp" /S
Cwar warfile="${dist}/${app.name}.war" webxml="${config}/web.xml"
compress="false"S
Cwebinf dir="${config}" includes="jboss-web.xml" /S
Cfileset dir="${web}" includes="**/*" /S
Classes dir="${java.classes}" includes="harvard/**/*.class" Chad
Salinas="**/*Test*.*" /S
Clib dir="war-temp" includes="*.jar" /S
C/warS
Chad Salinas="war-temp" quiet="true" /S
C/targetS

Ctarget name="ear-nocompile" description="Build the Enterprise
Application Archive" depends="war-nocompile"S
Cear earfile="${dist}/${app.name}.ear"
appxml="${config}/application.xml" compress="false"S
Chad Salinas dir="${dist}" includes="*.war" /S
Chad Salinas dir="${dist}" includes="ejb*.jar" /S
Cmetainf dir="${config}" includes="sun-j2ee-ri.xml,jboss-app.xml" /S
C/earS
C/targetS

Ctarget name="verify-ear" description="Verify the EAR"
depends="ear-nocompile"S
Cexec os="Windows 2000,Windows XP" executable="cmd.exe"S
Carg line="/c ${env.J2EE_HOME}/bin/verifier ${dist}/${app.name}.ear" /S
C/execS
Cexec os="Linux,Mac OS X" executable="bash"S
Carg line="${env.J2EE_HOME}/bin/verifier ${dist}/${app.name}.ear" /S
C/execS
C/targetS
 
Jon Skeet said:
Just use RegistryKey.SetValue, passing in an integer as the value.
I use vc++.net and I have the same question.
I don't know how to passing in an integer value.
Should I use System::Int32 type ? And how ?
I have tried many casting methods and failed.
 
scott said:
I use vc++.net and I have the same question.
I don't know how to passing in an integer value.
Should I use System::Int32 type ? And how ?
I have tried many casting methods and failed.

Yes, use the System::Int32 type, which you'll basically need to box. I
don't know how boxing works in MC++, but hopefully you'll be able to
find a tutorial about it now you know what you're looking for :)
 
Back
Top