-
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 Users:(CI)(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
-
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
-
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
-
Re: VBScript in Vista
Hi Freidrich,
Just to let you know, I'm running version 6.0.175 of SetupBuilder.
Thanks,
Sharon
-
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
-
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
-
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
-
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
-
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
-
Re: VBScript in Vista
Hi Freidrich,
The script now executes (thank you) but, the permissions were not set. Any thoughts?
Thanks,
Sharon