Jump to content

Yzöwl

Patron
  • Posts

    4,113
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United Kingdom

Everything posted by Yzöwl

  1. I already have a batch file knocked up somewhere for doing this on ini, sif and inf files. If I remember correctly it creates the new file without empty lines, merges same-name label entries under a single lable and reorders all labels alphabetically. So as not to steal Mim0's thunder I'll not post anything up for now and jump in only if the task proves more complicated than it at first seems.
  2. In order to do that all you need is a batch file containing this: @"%~dp0..\wpi\wpi.hta"
  3. This is the result on both Vista x86 and Xp x86
  4. Additional note: You can do that in a single command. WMIC NICConfig WHERE "Index <> '0' AND Index <= '5'" CALL SetTCPIPNetBios 1
  5. You don't need to add those commands to a batch file, just add them to the winnt.sif file section. [GuiRunOnce] "regedit /s %systemdrive%\install\regtweaks.reg" "%systemdrive%\install\wallpaper.exe"Your two files would go into the X:\$OEM$\$1\Install folder. For a refresher see here.
  6. Thinking about it, I'd suggest that you also remove the %systemdrive% from the list of available drives too!
  7. The problem with using going down this route is that it removes the interactive nature of requesting a driveletter from the user. If you wished to do that then I'd suggest you request the drive letter at the command line, this can be input as a result of another script or a simple user input. I'm not the most proficient vbscripter in the world, (I'm sure that GSM will be able to improve it, or even fix it since it hasn't been tested!), but I'd use something like this: _Xample.extnOption ExplicitDim objAShell, objFSO, objWShell Dim strChsDst Dim strMyDocs, strDocsNm Dim strMyMusc, strMuscNm, strMusPth Dim strMyPics, strPicPth, strPicsNm Dim strMyVids, strVidsNm, strVidPth Dim strProfNm, strUserNm Set objAShell = CreateObject("Shell.Application") Set objFSO = CreateObject("Scripting.FileSystemObject") Set objWShell = CreateObject("WScript.Shell") If WScript.Arguments.Count = 1 Then strChsDst = WScript.Arguments.Item(0) & ":\" Else WScript.Echo("Drive letter not provided as script argument") WScript.Quit 1 End If strDocsNm = objAShell.NameSpace(&h5).Self.Name strMyDocs = objAShell.NameSpace(&h5).Self.Path strMyMusc = objAShell.NameSpace(&hD).Self.Path strMuscNm = objAShell.NameSpace(&hD).Self.Name strMusPth = objFSO.GetParentFolderName(strMyMusc) strMyPics = objAShell.NameSpace(&h27).Self.Path strMyVids = objAShell.NameSpace(&hE).Self.Path strPicPth = objFSO.GetParentFolderName(strMyPics) strPicsNm = objAShell.NameSpace(&h27).Self.Name strUserNm = objWShell.ExpandEnvironmentStrings("%UserName%") strVidPth = objFSO.GetParentFolderName(strMyVids) strVidsNm = objAShell.NameSpace(&hE).Self.Name strProfNm = objWShell.ExpandEnvironmentStrings("%UserProfile%") If strUserNm = "" Then WScript.Echo("Unable to retrieve current %UserName%") WScript.Quit 1 End If If Not objFSO.FolderExists(strChsDst & strUserNm) Then objFSO.CreateFolder strChsDst & strUserNm End If If (objFSO.FolderExists(strMyVids)) Then If Not strMyVids = strChsDst & strUserNm & "\" & strVidsNm Then If strVidPth = strProfNm Then objFSO.MoveFolder strMyVids, strChsDst & strUserNm & "\" & _ strDocsNm Else objFSO.MoveFolder strMyVids, strChsDst & strUserNm End If End If Else If strVidPth = strProfNm Then objFSO.CreateFolder strChsDst & strUserNm & "\" & strDocsNm & "\" & _ strVidsNm Else objFSO.CreateFolder strChsDst & strUserNm & "\" & strVidsNm End If End If If strVidPth = strProfNm Then objWShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\" _ & "Explorer\User Shell Folders\My Video", & Chr(34) & strChsDst & _ "%UserName%\" & strDocsNm & strVidsNm & Chr(34), "REG_EXPAND_SZ" Else objWShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\" _ & "Explorer\User Shell Folders\My Video", & Chr(34) & strChsDst & _ "%UserName%\" & strVidsNm & Chr(34), "REG_EXPAND_SZ" End If If (objFSO.FolderExists(strMyPics)) Then If Not strMyPics = strChsDst & strUserNm & "\" & strPicsNm Then If strPicPth = strProfNm Then objFSO.MoveFolder strMyPics, strChsDst & strUserNm & "\" & _ strDocsNm Else objFSO.MoveFolder strMyPics, strChsDst & strUserNm End If End If Else If strPicPth = strProfNm Then objFSO.CreateFolder strChsDst & strUserNm & "\" & strDocsNm & "\" & _ strPicsNm Else objFSO.CreateFolder strChsDst & strUserNm & "\" & strPicsNm End If End If If strPicPth = strProfNm Then objWShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\" _ & "Explorer\User Shell Folders\My Video", & Chr(34) & strChsDst & _ "%UserName%\" & strDocsNm & strPicsNm & Chr(34), "REG_EXPAND_SZ" Else objWShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\" _ & "Explorer\User Shell Folders\My Video", & Chr(34) & strChsDst & _ "%UserName%\" & strPicsNm & Chr(34), "REG_EXPAND_SZ" End If If (objFSO.FolderExists(strMyMusc)) Then If Not strMyMusc = strChsDst & strUserNm & "\" & strMuscNm Then If strMusPth = strProfNm Then objFSO.MoveFolder strMyMusc, strChsDst & strUserNm & "\" & _ strDocsNm Else objFSO.MoveFolder strMyMusc, strChsDst & strUserNm End If End If Else If strMusPth = strProfNm Then objFSO.CreateFolder strChsDst & strUserNm & "\" & strDocsNm & "\" & _ strMuscNm Else objFSO.CreateFolder strChsDst & strUserNm & "\" & strMuscNm End If End If If strMusPth = strProfNm Then objWShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\" _ & "Explorer\User Shell Folders\My Video", & Chr(34) & strChsDst & _ "%UserName%\" & strDocsNm & strMuscNm & Chr(34), "REG_EXPAND_SZ" Else objWShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\" _ & "Explorer\User Shell Folders\My Video", & Chr(34) & strChsDst & _ "%UserName%\" & strMuscNm & Chr(34), "REG_EXPAND_SZ" End If If (objFSO.FolderExists(strMyDocs)) Then If Not strMyDocs = strChsDst & strUserNm & "\" & strDocsNm Then objFSO.MoveFolder strMyDocs, strChsDst & strUserNm End If End If objWShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\" _ & "User Shell Folders\Personal", & Chr(34) & strChsDst & "%UserName%\" & _ strDocsNm & Chr(34), "REG_EXPAND_SZ" Wscript.Quit 0 In order to use it you could either directly or by another script enter the following command: Cscript //Nologo //B //E:Vbscript _Xample.extn FThe above would probably produce the following on an XP system and this on a Vista / 7 system Using the start command like this you'll just have to change it to this: start "" /wait "change_personal_folders.hta"
  8. Actually I was under the impression that there should be no need to touch the 'Shell Folders' keys. All work should be done on the 'User Shell Folders' keys which should in turn propagate down to the Shell Folders key.
  9. I think I'd prefer to see it fill the list box with just fixed and network drives! objWMIService.ExecQuery("Select * from " _ & "Win32_LogicalDisk Where DriveType = '2' OR Drivetype = '3'")
  10. This doesn't do what you requested! It only changes the references in the registry and creates directories if they don't exist. (If the directories do exist should you not move the contents to the new location too?) The script is only using a specific language, meaning that it is useless for people using a different language version of Windows. Also you've requested it to be suitable for XP, Vista and 7; however in Vista and 7; Music, Pictures and Videos are not found as subdirectories of the Documents directory. I would also suggest that you think about using a directory structure beneath the Users Name in your new location, i.e. X:\UserName\DocsFolderName
  11. Post moved to more appropriate location, (than Windows XP Forum). What have you got so far, we have no idea what you've tried or which part you need help with
  12. Seeing that you have already got an agreement, just download according to that and forget about asking for things which fall outside of our rules. Closed
  13. This may sound a little bit out of line, but why don't you advertise that you'd appreciate donations at some of the places where you'd expect to find warez OS releases containing WPI and some of your other stuff. They may be under some false illusion that Microsoft don't need their money, but they should at least appreciate the work of 'the small man' in their misguided beliefs.
  14. See if this Powershell Script helps you!
  15. If you want a little more light reading, take a look here.
  16. The simplest solution using the method you've described would be to copy one of the files. Use that unwanted dummy file as the first in the series and when the rename is done delete that first file!
  17. Here's a thought!Each time you use START, you are actually opening a new CMD window, if this is considered as a new Command Prompt session then according to MartinH it will not wait by default for the app to close! Try therefore to run some tests using combinations of STARTs /I and /B switches without the /WAIT switch and see if it makes a difference to you in your situation. Post back the results!
  18. Since we know that the installers for .NET FW result in a listing under Win32_Product whats wrong with using this VBScript? NetVerIs.vbs strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_Product") For Each objItem in colItems If InStr(objItem.Name, "Microsoft .NET Framework") > 0 Then Wscript.Echo objItem.Version End If Next
  19. The reason you cannot find it is that it isn't the name of a topic. The Recent Status Updates are similar to a Twitter idea and have no relevance to you. The Topic you are probably looking for is How to install from USB- WinSetupFromUSB with GUI.
  20. Thank you Yzöwl, but it cuts the file extension if I ECHO the variable! Is it possible to show the full filename WITH the extension? Thanks Of course without the knowledge to make the change directly yourself you could have simply appended the extension!FOR %%# IN ("%TMP%\*.INF") DO SET "IFN=%%~n#.INF"Now in order for you to implement the change as shown by jaclaz above, I'll change my code to help you understand the examples provided. FOR %%i IN ("%TMP%\*.INF") DO SET "IFN=%%~ni"The main thing to note is that in a batch file the percent needs to be escaped by another therefore these are what you need to use
  21. This should save the filename to a variable named %IFN% FOR %%# IN ("%TMP%\*.INF") DO SET "IFN=%%~n#"
  22. Yzöwl

    Help Please

    I'm aware that English is not your native language, however your previous posts show that your capability in this area exceeds that which you've exercised in this instance. Could you please therefore reword your question in order that readers can understand what it is you are trying to say!
  23. There is nothing in that comment file which contains commands for file deletion. Could you please fully explain the file structure and locations (with names) of what you are doing. As stated earlier you need to provide sufficient information for us to work with in order for us to help you.
  24. Not a clue! How about you try giving us a little information; are you talking about an application called 'any DVD manager', (a Google search for that string comes up empty)
×
×
  • Create New...