Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set sh = CreateObject("Wscript.Shell")
- Set fso = CreateObject("Scripting.FileSystemObject")
- dim command
- dim location
- dim retVal
- location = fso.GetFile(Wscript.ScriptFullName).ParentFolder
- '%windir%microsoft.netframeworkv2.0.50727caspol.exe -pp off -m -addgroup 1 –url file://COMPUTER/SHARE/* FullTrust -name sbw2
- command = fso.GetSpecialFolder(0) & "microsoft.netframeworkv2.0.50727caspol.exe -pp off -m -ag 1 –url file://"
- for each s in Split(location, "")
- if Len(s) > 0 then
- command = command & s & "/"
- end if
- next
- command = command & "* FullTrust -name sbw2"
- 'DEBUG
- 'command = fso.GetSpecialFolder(0) & "microsoft.netframeworkv2.0.50727caspol.exe -m -ag 1 –url file://mjlaptop/sbw2/* FullTrust"
- Wscript.StdOut.WriteLine VbClrf
- Wscript.StdOut.WriteLine command
- Wscript.StdOut.WriteLine VbClrf
- Set output = sh.Exec(command)
- dim text
- while Not output.StdOut.AtEndOfStream
- text = text & output.StdOut.Read(1)
- Wend
- Wscript.StdOut.WriteLine text
- "C:WINDOWSmicrosoft.netframeworkv2.0.50727caspol.exe -pp off -m -ag 1 -url "file://mjlaptop/sbw2/*" FullTrust -name sbw2
- \mjlaptopsbw2setpolicy.vbs(32, 1) WshShell.Exec: Das System kann die angegebene Datei nicht finden.
- "C:WINDOWSmicrosoft.netframeworkv2.0.50727caspol.exe" -pp off -m -ag 1 -url "file://mjlaptop/sbw2/*" FullTrust -name sbw2
- Microsoft (R) .NET Framework CasPol 2.0.50727.42
- Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.
- Fehler: Unbekannte Mitgliedschaftsbedingung - -url..
Add Comment
Please, Sign In to add comment