PDA

View Full Version : Vista Script Issue



smh_2007
08-02-2007, 02:15 PM
Hi,

I am trying to get the following vbscript to work in the latest version of sb.
The file is called Vista.vbs. I have tried to call this vbs file from a .bat file (using Run Program script function), I have tried to just run the Vista.vbs file with the Set Access Control script function. Nothing has worked so far. Can anyone give me a concrete example of how this works. I need to change the permission on the temp folders so that my classic asp pages work with an access database.

Set objShell = CreateObject("Shell.Application")
objshell.ShellExecute "ICACLS.EXE", "C:\Windows\system32\inetsrv\appcmd set config /section:applicationPools /[name='DefaultAppPool'].processModel.loadUserProfile:false", , ,"runas"
objShell.ShellExecute "ICACLS.EXE", "C:\Windows\ServiceProfiles\NetworkService\AppData\ Local\Temp /grant USERS:(CI)(S,WD,AD,X)", , ,"runas"
objShell.ShellExecute "ICACLS.EXE", "C:\Windows\ServiceProfiles\NetworkService\AppData\ Local\Temp /grant ""CREATOR OWNER"":(OI)(CI)(IO)(F)", , ,"runas"

Thanks,

Sharon

Unregistered
08-03-2007, 01:46 AM
Does Vista.vbs work when you double-click it in Windows Explorer?

If yes, just ShellExecute it via the Run Program action.

Thomas

smh_2007
08-03-2007, 01:54 PM
Hi Thomas,

Thanks for the response. I ended up using the Set Access Control script function. My setting were as follows:

Operation: Gran User Access
Root: HKEY_CLASSES_ROOT (this was the default and is not enabled).
Object: C:\Windows\ServiceProfiles\NetworkService\AppData\ Local\Temp
Domains/Users: CREATOR OWNER (I did not enter a domain, just left it blank)
USER
Permissions: Generic All (this is the only thing I checked)

Hope this may help some others who need to get classic asp pages using and access database working on a Vista machine.

Sharon