1

私はログオフ VB スクリプトを持っています (これはhttp://www.rlmueller.net/Logon7.htmからのものです)。ログインユーザーを制限するために使用します。

Win 7 ではスクリプトは正常に実行されますが、PC を再起動すると XP SP2 でエラーが発生します。

  • スクリプト: logoff7.vbs
  • ライン : 63
  • 文字: 9
  • エラー : 権限が拒否されました
  • コード:800A0046
  • ソース: Microsoft VBScrpt ランタイム エラー

以下はコードです:

 ' Check if flag file exists for this user.
If (objFSO.FileExists(strFlagFile) = True) Then
    ' Read encoded computer name from the flag file.
    Set objFile = objFSO.OpenTextFile(strFlagFile, ForReading)
    strLine = objFile.ReadLine
    objFile.Close
    ' Check encoded computer name.
    If (strLine = strComputerEncoded) Then
        ' Delete the file.
        objFSO.DeleteFile strFlagFile
    End If
    Wscript.Quit
End If

行のスクリプト: 63 文字: 9 は

objFSO.DeleteFile strFlagFile.

この問題を解決するのを手伝ってください。

thx 前に、私の英語が十分でない場合は申し訳ありません。

4

0 に答える 0