|
-
Aug 6th, 2006, 08:20 PM
#1
Thread Starter
Addicted Member
Several Questions about DOT NET
Hi Everyone
I have several questions. I am making the adjustment from VB6 to VB DOT NET. Because of the mass changes in DOT NET I feel like I am starting over learning Visual Basic. So please bear with me
The first question:
I am writing a program in VB DOT NET, that I need to determine if Windows is running in Safe Mode. How can I accomplish this?
The second question:
I have the following line in my VB code:
File.Copy(STROrginal, STRBackup, True)
The destination is C:\Temp\Windows\Activation\Backup
When I run the program, with the complete path for the destination already created I get an error that the directory already exists. If I delete the directory Backup I get an error that the destination directory does not exists. I have Imports System.IO at the top of the code.
The third question:
In VB6 you can require variable declaration, how can this be required in DOT NET or is it even necessary
Last questions
I currently have 14 systems that I need to load Win 98 onto. (Yea I know out of date crap, but they were donated to a preschool, and had password protected NT 4, might have been 3.51, on them, only 200 Meg hertz PII, Some have... gulp.... EDO memory). What I have done is installed Windows on one hard drive updated it etc, and then I will ghost this drive to the others. What I want my program to do is change the names of all the PCs from PreSchool to PreSchool-1 PreSchool-2 PreSchool-3 etc. I have gotten a VB 6 program to do every thing that I want it to do. But actually change the name of the system. STRNewPCName is what the name of the PC should be and is set in the previous line.
Currently the line that will do that reads
environ(6) = STRNewPCName
When this line is executed the program just drops out. I understand that this environ value is read only. If their is way, I don't mind writing the program in DOT NET. I would like this program to run under 98, 2000 and XP, if po
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|