VBS 变量值写入.INI文件的问题
On Error Resume Next strComputer = "A1" Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\") Set colItems = objWMIService.ExecQuery("Select * from Win32_Share",,48) For Each objItem in colItems Wscript.Echo "Name: " & objItem.Name jItem.Type Next 上面代码可获得A1共享目录的名字 我要怎么做才能让它不逐个显示目录名,而是以固定格式将目录名保存到指定的INI文件里? 比如:Share1= Share2= ..... 最好给出完整代码。(假设为Path.ini ,段名为dir)
Function GetIni( strPrimary , strSubKey, strIniFilePath ) Dim myFso Dim MyFile Dim intCount , strState Set myFso = CreateObject("Scripting。
FileSystemObject") Set MyFile = myFso。OpenTextFile(strIniFilePath, 1, False, False) With MyFile Do Until 。
AtEndOfStream If intCount = 0 Then If 。ReadLine = "[" & strPrimary & "]" Then intCount = 1 End If Else strState = 。
ReadLine If UCase(Left(strState, Len(strSubKey & "="))) = UCase(strSubKey & "=") Then GetIni = Right(strState, Len(strState) - Len(strSubKey & "=")) End If End If Loop 。
Close End With Set MyFile = Nothing Set myFso = Nothing End Function 。
答:穿墙文件不是 BUG而是图形文件被别人拿来修改并在重新覆盖文件,GM根本不会的~ 别指望他们,只能指望自觉,我看过图形文件,通过一些软件可以破解并进行重写.. ...详情>>
答:线性链表分好几种,分为单链,双链等,它们的存储顺序也不一样. 线性表是顺序存储的,占顺序的存储空间详情>>
问:电脑安装了VB6.0,为什么打开方式里面没有VB程序选项,进安装好的VB里去关联...
答:打开方式最下面还有一个《选择程序》,点开后查VB的安装目录的EXE,找到后直接打开,下次就会在打开方式里查到了详情>>