
Tracy7011
MemberContent Type
Profiles
Forums
Events
Everything posted by Tracy7011
-
Anyone setup the properties of an FTP server? I need to be able to setup the FTP Home Directory root path as having Read and Write properties and also Unix Directory Listing instead of DOS. Changing the registry doesn't seem to work, it gets changed back on every reboot. Anyone know any install switches or scripts? I am installing IIS via command line so I can change the root directory to "e:\inetpub\bootable". The way described here "http://blogs.technet.com/chrisad/archive/2005/11/16/414630.aspx"
-
Change CD Drive Letter w/Diskpart /w Unattended
Tracy7011 replied to Tracy7011's topic in Unattended Windows 2000/XP/2003
It kept telling me the cd rom was not reassignable. I am doing this on W2K, not sure if that is diff or not. I also didn't have the second partition built yet, I have an automated format cd that makes c: 4G and formats it. As I understood it, you need to add a file "drive.x" to each drive. e: is assinged to the cd after install, I need it R before I create my second partition e. Before I can make my partition I need to know what params to send to diskpart, (disk id). I then need to format it. I am sure mapdrive can do it and the problems I was having was mistakes on my part. But here is another way to do what I needed. Thanks for looking! -
'Just incase anyone needs an alternatvie to mapdrive.com found in this forum. 'mapdrive didn't work for me due to me wanting to make my second partition during install and I 'didn't know any of the disk numbers, volume numbers. 'I used this last night on several machines and it worked good. Interesting, All the machines I have 'checked that have one cd, windows always calls them volume 0 'From Topic: 'Determine if CD-R drive exists 'http://www.msfn.org/board/index.php?showtopic=60721&st=20 'Ok, I am done with this now. 'This script will: '1. find your cd-rom drive letter. '2. find the disk id of your hard disk '3. create a diskpart txt script file to a. remove the cd-rom drive letter, b. assign cd a letter (r: in my case) 'c. create another partition on hard disk with remaining space and assign it letter e: '4. Creates a batch file that a. launches diskpart with the above script file b. formats the newly 'created partition. We have to do it from a batch due to diskpart runs in its own little command line and 'want to know when it is complete so we can launch format as soon as it has created the partition. 'I had to do this due to the systems we use at work need a e: partition and the cd at r:, we have a zip 'so windows always put the cd at defualt of e: and you can never know if windows will call the hard disk ' disk 1 or disk 0. 'I call this script from GuiRunOnce in Unattended with no support files. '************************DoDrives.vbs********************* Const FOR_READING = 1, FOR_WRITING = 2 ComputerName = "." strComputer = "." Dim TF DIM NewFile DIM DefaultString DIM CDDeviceID DIM DiskNum DefaultString = Array ("select volume ", "remove noerr", "assign letter r", "select disk ", _ "Create partition primary", "assign letter e", "exit") NewFile = "C:\install\Disk.txt" 'We have to create a .txt script file for diskpart NewBat = "C:\install\edrive.bat" 'We have to use a bat so we can launch format after we are done with diskpart Set objFSO = CreateObject("Scripting.FileSystemObject") Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" _ & strComputer & "\root\cimv2") Set colDisks = objWMIService.ExecQuery _ ("Select * from Win32_LogicalDisk") For Each objDisk in colDisks Select Case objDisk.DriveType Case 1 Case 2 Case 3 Case 4 Case 5 CDDeviceID = objDisk.DeviceID Case 6 Case Else End Select Next Set wmiServices = GetObject ( _ "winmgmts:{impersonationLevel=Impersonate}!//" _ & ComputerName) Set wmiDiskDrives = wmiServices.ExecQuery ( _ "SELECT Caption, DeviceID FROM Win32_DiskDrive") For Each wmiDiskDrive In wmiDiskDrives query = "ASSOCIATORS OF {Win32_DiskDrive.DeviceID='" _ & wmiDiskDrive.DeviceID & "'} WHERE AssocClass = Win32_DiskDriveToDiskPartition" Set wmiDiskPartitions = wmiServices.ExecQuery(query) For Each wmiDiskPartition In wmiDiskPartitions Set wmiLogicalDisks = wmiServices.ExecQuery _ ("ASSOCIATORS OF {Win32_DiskPartition.DeviceID='" _ & wmiDiskPartition.DeviceID & "'} WHERE AssocClass = Win32_LogicalDiskToPartition") For Each wmiLogicalDisk In wmiLogicalDisks If wmiDiskDrive.DeviceID = "\\.\PHYSICALDRIVE0" then DiskNum="0" End If If wmiDiskDrive.DeviceID = "\\.\PHYSICALDRIVE1" then DiskNum="1" End If Set TF=objfso.CreateTextFile(NewFile, True) 'Create a new script text file TF.WriteLine (DefaultString(0)) & CDDeviceID 'select volume x: (x = CD Drive Letter) TF.WriteLine (DefaultString(1)) 'remove noerr TF.WriteLine (DefaultString(2)) 'assign letter r TF.WriteLine (DefaultString(3)) & DiskNum 'select disk x (0,1) TF.WriteLine (DefaultString(4)) 'Create partition primary TF.WriteLine (DefaultString(5)) 'assign letter e TF.WriteLine (DefaultString(6)) 'exit TF.close 'Close the new file Set TF=objfso.CreateTextFile(NewBat, True) 'Create a new batch file TF.WriteLine "%windir%\system32\diskpart.exe /S c:\install\disk.txt > c:\install\drivelog.txt" 'This line launches diskpart TF.WriteLine "echo Y | %windir%\system32\format e: /fs:ntfs /q /v:""" 'This line formats TF.close 'Close the new file Set objShell = WScript.CreateObject("WScript.Shell") objShell.Run("%comspec% /K c:\install\edrive.bat"), 1, true 'Run the bat file Next Next Next '''''End Code '''''Thanks gunsmokingman for putting the three scripts into one which led me making just one file to do it all.
-
Determine if CD-R drive exists
Tracy7011 replied to Bezalel's topic in Unattended Windows 2000/XP/2003
Ok, I am done with this now. This script will: 1. find your cd-rom drive letter. 2. find the disk id of your hard disk 3. create a diskpart txt script file to a. remove the cd-rom drive letter, b. assign cd a letter (r: in my case) c. create another partition on hard disk with remaining space and assign it letter e: 4. Creates a batch file that a. launches diskpart with the above script file b. formats the newly created partition. We have to do it from a batch due to diskpart runs in its own little command line and want to know when it is complete so we can launch format as soon as it has created the partition. I had to do this due to the systems we use at work need a e: partition and the cd at r:, we have a zip so windows always put the cd at defualt of e: and you can never know if windows will call the hard disk disk 1 or disk 0. I call this script from GuiRunOnce in Unattended with no support files. ************************DoDrives.vbs********************* Const FOR_READING = 1, FOR_WRITING = 2 ComputerName = "." strComputer = "." Dim TF DIM NewFile DIM DefaultString DIM CDDeviceID DIM DiskNum DefaultString = Array ("select volume ", "remove noerr", "assign letter r", "select disk ", _ "Create partition primary", "assign letter e", "exit") NewFile = "C:\install\Disk.txt" 'We have to create a .txt script file for diskpart NewBat = "C:\install\edrive.bat" 'We have to use a bat so we can launch format after we are done with diskpart Set objFSO = CreateObject("Scripting.FileSystemObject") Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" _ & strComputer & "\root\cimv2") Set colDisks = objWMIService.ExecQuery _ ("Select * from Win32_LogicalDisk") For Each objDisk in colDisks Select Case objDisk.DriveType Case 1 Case 2 Case 3 Case 4 Case 5 CDDeviceID = objDisk.DeviceID Case 6 Case Else End Select Next Set wmiServices = GetObject ( _ "winmgmts:{impersonationLevel=Impersonate}!//" _ & ComputerName) Set wmiDiskDrives = wmiServices.ExecQuery ( _ "SELECT Caption, DeviceID FROM Win32_DiskDrive") For Each wmiDiskDrive In wmiDiskDrives query = "ASSOCIATORS OF {Win32_DiskDrive.DeviceID='" _ & wmiDiskDrive.DeviceID & "'} WHERE AssocClass = Win32_DiskDriveToDiskPartition" Set wmiDiskPartitions = wmiServices.ExecQuery(query) For Each wmiDiskPartition In wmiDiskPartitions Set wmiLogicalDisks = wmiServices.ExecQuery _ ("ASSOCIATORS OF {Win32_DiskPartition.DeviceID='" _ & wmiDiskPartition.DeviceID & "'} WHERE AssocClass = Win32_LogicalDiskToPartition") For Each wmiLogicalDisk In wmiLogicalDisks If wmiDiskDrive.DeviceID = "\\.\PHYSICALDRIVE0" then DiskNum="0" End If If wmiDiskDrive.DeviceID = "\\.\PHYSICALDRIVE1" then DiskNum="1" End If Set TF=objfso.CreateTextFile(NewFile, True) 'Create a new script text file TF.WriteLine (DefaultString(0)) & CDDeviceID 'select volume x: (x = CD Drive Letter) TF.WriteLine (DefaultString(1)) 'remove noerr TF.WriteLine (DefaultString(2)) 'assign letter r TF.WriteLine (DefaultString(3)) & DiskNum 'select disk x (0,1) TF.WriteLine (DefaultString(4)) 'Create partition primary TF.WriteLine (DefaultString(5)) 'assign letter e TF.WriteLine (DefaultString(6)) 'exit TF.close 'Close the new file Set TF=objfso.CreateTextFile(NewBat, True) 'Create a new batch file TF.WriteLine "%windir%\system32\diskpart.exe /S c:\install\disk.txt > c:\install\drivelog.txt" 'This line launches diskpart TF.WriteLine "echo Y | %windir%\system32\format e: /fs:ntfs /q /v:""" 'This line formats TF.close 'Close the new file Set objShell = WScript.CreateObject("WScript.Shell") objShell.Run("%comspec% /K c:\install\edrive.bat"), 1, true 'Run the bat file Next Next Next '''''End od Code Thanks gunsmokingman for putting the three scripts into one which led me making just one file to do it all. -
Determine if CD-R drive exists
Tracy7011 replied to Bezalel's topic in Unattended Windows 2000/XP/2003
Yep, that does it. Thanks for making them one! -
Determine if CD-R drive exists
Tracy7011 replied to Bezalel's topic in Unattended Windows 2000/XP/2003
Thanks! That works except there is a space after the word volume in "select volume" --> "select volume " Change MyFile = Array("C:\install\disk0.txt","C:\install\disk1.txt","select volume") To MyFile = Array("C:\install\disk0.txt","C:\install\disk1.txt","select volume ") After I added the space it worked great. Thanks alot, I will have to figure out the variable array.... -
Determine if CD-R drive exists
Tracy7011 replied to Bezalel's topic in Unattended Windows 2000/XP/2003
Thanks for your help, I got it figured out. I use 3 .vbs scripts 2 .bat files and 2 diskpart.exe script text files to remove the drive letter from the cd-rom and assign it the letter r:, find out what disk (0) or (1) the 4G volume c: is on and create another partition with the letter e: out the remaining space and format it. I am sure there is a prettier and easier way but this is the first time I have used scripts. I got all the code straight from the Microsoft script site and cut and paste as required. What I am doing: I call the scripts in this order from GuiRunOnce ***********Script 1: attrib.vbs************************************************************ 'modifies the attributes of two diskpart script files called "disk0.txt" and "disk1.txt" to make sure they ' are not readonly. Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.GetFile("C:\install\disk0.txt") If objFile.Attributes AND 1 Then objFile.Attributes = objFile.Attributes AND 0 ' Wscript.Echo "Read-only." End If Set objFile = objFSO.GetFile("C:\install\disk1.txt") If objFile.Attributes AND 1 Then objFile.Attributes = objFile.Attributes AND 0 ' Wscript.Echo "Read-only." End If **********Script 2: drive.vbs************************************************************* '1. Finds Volume Letter of CD-Rom '2. Modifies a "diskpart.exe" script file called disk0.txt and another disk1.txt to include the command ' "select volume" and the returned drive letter in line 1. (example: "select volume D:") Const FOR_READING = 1 Const FOR_WRITING = 2 strFileName0 = "C:\install\disk0.txt" strFileName1 = "C:\install\disk1.txt" strNewContent = "select volume " strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" _ & strComputer & "\root\cimv2") Set colDisks = objWMIService.ExecQuery _ ("Select * from Win32_LogicalDisk") For Each objDisk in colDisks ' Wscript.Echo "DeviceID: "& vbTab _ ' & objDisk.DeviceID Select Case objDisk.DriveType Case 1 Case 2 Case 3 Case 4 Case 5 'Write it to the First File "disk0.txt" Set objFS = CreateObject("Scripting.FileSystemObject") Set objTS = objFS.OpenTextFile(strFileName0,FOR_READING) strContents = objTS.ReadAll objTS.Close Set objTS = objFS.OpenTextFile(strFileName0,FOR_WRITING) 'this next line write the string into the first line of the text file objTS.WriteLine strNewContent & objDisk.DeviceID objTS.Write strContents 'Write to the Second File "disk1.txt" Set objFS = CreateObject("Scripting.FileSystemObject") Set objTS = objFS.OpenTextFile(strFileName1,FOR_READING) strContents = objTS.ReadAll objTS.Close Set objTS = objFS.OpenTextFile(strFileName1,FOR_WRITING) 'this next line write the string into the first line of the text file objTS.WriteLine strNewContent & objDisk.DeviceID objTS.Write strContents Case 6 Case Else End Select Next **********Script 3: drivetopart.vbs********************************************************* 'Finds the disk id (Disk 0 or Disk 1) of C: drive and launches the correct correct bat file so I can create 'E: drive out of the remaining space. 'Tells us which letter goes with what partition.. ComputerName = "." Set wmiServices = GetObject ( _ "winmgmts:{impersonationLevel=Impersonate}!//" _ & ComputerName) ' Get physical disk drive Set wmiDiskDrives = wmiServices.ExecQuery ( _ "SELECT Caption, DeviceID FROM Win32_DiskDrive") For Each wmiDiskDrive In wmiDiskDrives 'Use the disk drive device id to ' find associated partition query = "ASSOCIATORS OF {Win32_DiskDrive.DeviceID='" _ & wmiDiskDrive.DeviceID & "'} WHERE AssocClass = Win32_DiskDriveToDiskPartition" Set wmiDiskPartitions = wmiServices.ExecQuery(query) For Each wmiDiskPartition In wmiDiskPartitions 'Use partition device id to find logical disk Set wmiLogicalDisks = wmiServices.ExecQuery _ ("ASSOCIATORS OF {Win32_DiskPartition.DeviceID='" _ & wmiDiskPartition.DeviceID & "'} WHERE AssocClass = Win32_LogicalDiskToPartition") For Each wmiLogicalDisk In wmiLogicalDisks if wmiDiskDrive.DeviceID = "\\.\PHYSICALDRIVE0" then Set objShell = WScript.CreateObject("WScript.Shell") objShell.Run("%comspec% /K c:\install\edrive0.bat"), 1, True end if if wmiDiskDrive.DeviceID = "\\.\PHYSICALDRIVE1" then Set objShell = WScript.CreateObject("WScript.Shell") objShell.Run("%comspec% /K c:\install\edrive1.bat"), 1, True end if Next Next Next ##################The other files######################### ********* edrive0.bat %windir%\system32\diskpart.exe /S c:\install\disk0.txt > c:\install\drivelog.txt echo Y | %windir%\system32\format e: /fs:ntfs /q /v:"" *********edrive1.bat***************** %windir%\system32\diskpart.exe /S c:\install\disk1.txt > c:\install\drivelog.txt echo Y | %windir%\system32\format e: /fs:ntfs /q /v:"" *********drive0.txt 'this is a diskpart script file********************* 'select volume e: This is what drive.vbs will write ERASE THIS LINE IF YOU ARE USING THIS!!! remove noerr assign letter r Select Disk 0 Create partition primary assign letter e exit *********drive1.txt 'this is a diskpart script file********************* 'select volume e: This is what drive.vbs will write ERASE THIS LINE IF YOU ARE USING THIS!!! remove noerr assign letter r Select Disk 1 Create partition primary assign letter e exit I hope this helps someone, I know it is dirty code and I am not sure how to post it in the pretty quote box. Like I said I cut and paste from the Microsoft site. I know it works for my app! Thanks again -
Determine if CD-R drive exists
Tracy7011 replied to Bezalel's topic in Unattended Windows 2000/XP/2003
Thanks for your help! I need this for Win2000, however I can't get it to work on either. Thanks again! -
Determine if CD-R drive exists
Tracy7011 replied to Bezalel's topic in Unattended Windows 2000/XP/2003
I like the script but when I run it, I get a confirm on the: "Act.Popup SearchChar, 5, "Confirm CD-RW",0 + 32", it goes away or I can click "Ok". Then I get the: "Act.Popup "Completed CD Drive Letter Change" &_ vbCrLf & "Old CD Drive Letter : " & CD &_ vbCrLf & "New CD Drive Letter : " & ChangeDrv, 7,"Finished", 0 + 32" It seems to skip the whole Function Change_CD_Letter The new drive letter text is "" (blank) and it doesn't change anything on the drive. Any ideas? -
Nvidia Quadro horizontal span and resolution force?
Tracy7011 replied to Tracy7011's topic in Unattended Windows 2000/XP/2003
Got it to work by using one of those regwatch utilities and copying what changed. I just need to verify it works on the different models of Quadro 580, 500, 540 cards. Doesn't look like any are specific to a model of card. All the changes were in "nv" (NView). Thanks for looking. -
Determine if CD-R drive exists
Tracy7011 replied to Bezalel's topic in Unattended Windows 2000/XP/2003
Thanks, But how would I use this program to rename the drive letter of the cd rom to R:, how would I use this to tell me what letter the cdrom is and to remove that letter and assign R:? Thanks in advance! -
Determine if CD-R drive exists
Tracy7011 replied to Bezalel's topic in Unattended Windows 2000/XP/2003
Looks like I am going to have to figure out this scripting, I am not sure where to paste this or how to pass this to diskpart. I am a newbie at batchs in windows. (I can sometimes figure out DOS ) I need to figure out the diff of cmd, bat and scripts (scr?). Can I use this syntax in a bat called from command.txt? How do I pass it to diskpart? Thanks for your reply! Sorry for the newbie questions... -
Determine if CD-R drive exists
Tracy7011 replied to Bezalel's topic in Unattended Windows 2000/XP/2003
Is it possible to use this script with diskpart? I need to change my cd to R: (is e: right after install, d: is a zip drive) and make another partition that is e:. Right now I call a bat with command.txt that runs diskpart script that selects volume 0 (the cd) removes drive letter (it has the e: and I need to create a partition with e:) assign r: create my partition with e: letter. I need a more reliable method of getting the cd drive letter. I tried another method (mapdrive.cmd) that is heavily commented but couldn't get it to work, maybe due to me doing this on w2k. Thanks, -
I have been making a unattended disk for W2K. The driver installs fine and the resolution is set fine with the winnt.sif settings. I need to figure out how to enable the spanning with the right resolution. I can copy the twinview regkey at the runonce spot and this will enable the spanning I want however my resolution is then messed up. Funny how you do a search on the net for Nvidia and unattended there are all kinds of great press releases saying it supports unattended but I can't find documentation. Emailed tech support no help, won't return calls...errrr. Anyone know how to set spanning and resolution in unattended? Thanks for your help.