Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 80005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:14:05+00:00 2026-05-10T21:14:05+00:00

I’d like to call caspol from within a script inside a custom action in

  • 0

I’d like to call caspol from within a script inside a custom action in an msi (setup project). I’d prefer a standard msi to ClickOnce, because with a standard msi I can install drivers & associate filetypes with our application whereas with ClickOnce I can’t.

When I execute the caspol command from the command line it succeeds, but from within vbscript it always fails with the error ‘Fehler: Unbekannte Mitgliedschaftsbedingung – -url..’ – which translates as ‘Error: Unknown membership condition: -url’. To further clarify: A copy & paste of the generated command works fine on the command line directly on the local drive of a virgin virtual machine, as local administrator, as part of a workgroup.

I have two ideas: 1. I’m no vbscript king, so maybe I’ve missed quotes or made some other sort of syntax error. 2. Caspol recognises that I’m running it from within a script and halts with an intentionally nonsensical error.

Personally, I believe it’s just a dumb syntax error.

Here’s my script:

set sh = CreateObject('Wscript.Shell') Set fso = CreateObject('Scripting.FileSystemObject')  dim command dim location dim retVal  location = fso.GetFile(Wscript.ScriptFullName).ParentFolder  '%windir%\microsoft.net\framework\v2.0.50727\caspol.exe -pp off -m -addgroup 1 –url file://COMPUTER/SHARE/* FullTrust -name sbw2 command = fso.GetSpecialFolder(0) & '\microsoft.net\framework\v2.0.50727\caspol.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.net\framework\v2.0.50727\caspol.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 

Thanks in advance,

Matt

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T21:14:05+00:00Added an answer on May 10, 2026 at 9:14 pm

    Change url formatting of url in command to \\mjlaptop\sbw2* for some reason, formatted as ‘file://…’ won’t work. With or without quotes.

    This uid (yossarian) belongs to me (Matt Jacobsen) too. I’d had to use the above as claimid was down for maintennance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
I have text I am displaying in SIlverlight that is coming from a CMS
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
I have some data like this: 1 2 3 4 5 9 2 6
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a bunch of posts stored in text files formatted in yaml/textile (from
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have a text area in my form which accepts all possible characters from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.