+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: VBScript in Vista

  1. #1

    Smile VBScript in Vista

    Hi To All,

    I am trying to run a script that will add users/permissions to Windows\ServiceProfile\NetworkService\AppData\Loca l\Temp. This is because I am using Access with Classic Asp pages in my installation.

    Here is the script in it's entirety:

    Set WshShell = wscript.CreateObject("Wscript.Shell")
    wshShell.Run "icacls %windir%\serviceprofiles\networkservice\AppData\Lo cal\Temp /grant UsersCI)(S,WD,AD,X)"
    wshShell.Run "icacls %windir%\serviceprofiles\networkservice\AppData\Lo cal\Temp /grant ""CREATOR OWNER""OI)(CI)(IO)(F)"

    This part of the install doesn't seem to be working. The errorcode I get is 1. Can anyone lend some insight into how to get this working.

    Thanks,

    Sharon

  2. #2
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: VBScript in Vista

    Sharon,

    How to you run the above code? Do you "ShellExecute" it as .vbs or something like that?

    BTW, why don't you use the "Set Access Control"?

    Friedrich

  3. #3

    Default Re: VBScript in Vista

    Hi Fredrich,

    I just use the Run VBScript command.

    Also I'm not familiar with "Set Access Control". Where would I find that.

    Sorry for what might seem like simple questions but, I'm a newbie.

    Sharon

  4. #4

    Default Re: VBScript in Vista

    Hi Freidrich,

    Just to let you know, I'm running version 6.0.175 of SetupBuilder.

    Thanks,

    Sharon

  5. #5
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: VBScript in Vista

    Hi Sharon,

    There is an example script in the Example package on how to use VBScripts.

    BTW, I would suggest to try the "Set Access Control..." script item.

    Friedrich

  6. #6
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: VBScript in Vista

    Sharon,

    The Set Access Control function provides support for ACL. An access control list (ACL) specifies the rules for access to a particular resource. Set access control lists on a variety of system objects. Add, edit and remove permissions of files, registry keys, and created folders.

    Does this help?

    Friedrich

  7. #7

    Default Re: VBScript in Vista

    Hi Freidrich,

    I did model my install after the example vbscript.sb6. I don't see the Set Access Control function in the Script Functions window. Is it specific to version 6.5? I am running 6.0.175.

    Thanks,

    Sharon

  8. #8
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: VBScript in Vista

    Sharon,

    Sorry, did not notice your version number. We introduced that feature in SetupBuilder 6.5. Click "Check for Updates" to update to the latest version.

    Friedrich

  9. #9
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: VBScript in Vista

    Sharon,

    What you are trying to do (WScript.Shell) is only available in wshom.ocx (WSHLIB). But "Run VBScript" makes use of msscript.ocx, so your code does not work!

    Friedrich

  10. #10

    Default Re: VBScript in Vista

    Hi Freidrich,

    The script now executes (thank you) but, the permissions were not set. Any thoughts?

    Thanks,

    Sharon

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •