There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
Token Privelages in VB


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
harryman's Avatar
Member with 30 posts.
 
Join Date: Aug 2003
Location: Ca.
16-May-2004, 09:53 PM #1
Token Privelages in VB
I want to delete a temporary folder that my program makes in C:\temp, but when i try to delete it it says "Path/File Acess Error". So I wondering if I can either Set A Token Privelage to allow me to delete this folder, or, create this folder with a privelage that allows me to delete it. Honestly, I don't really know what token privelages are, but it sounds like maybe it would help.
Aftab's Avatar
Member with 58 posts.
 
Join Date: Oct 2003
17-May-2004, 06:58 AM #2
Post Deleting folder inVB
The error may be occurring because the folder you are trying to delete is not empty. First delete all the files in your temp folder, using the KILL statement and then try removing the folder.

eg:
Kill "C:\temp\anyfolder\*.*"
rmdir "C:\temp\anyfolder"
harryman's Avatar
Member with 30 posts.
 
Join Date: Aug 2003
Location: Ca.
17-May-2004, 07:02 AM #3
that worked. But I still would like to know about token privelages...
Aftab's Avatar
Member with 58 posts.
 
Join Date: Oct 2003
17-May-2004, 08:08 AM #4
Token privelages
Token privelages are basically the security attributes associated with the current session (currently logged in user). These attributes determine what the current user can and cant do with system. Each new process has a copy of these privelages. For example changing the system time requires a privelage, rebooting the PC under Windows NT requires a token privelage etc... In fact under NT alot of API calls require the process to have a certain level of privelage. There are VB API functions that allow you to determine/modify the token privelagesLookokupPrivilegeValue,AdjustTokenPrivileges).

N.B. If you are going to modify privelages through VB (or any other language), be sure to change them back to the way you found them, unless you are going to reboot the PC.
Aftab's Avatar
Member with 58 posts.
 
Join Date: Oct 2003
17-May-2004, 08:11 AM #5
Sad face
By the way I dont know how that sad purple face got into my post, i didn't put it there.
Snake~eyes's Avatar
Senior Member with 639 posts.
 
Join Date: Apr 2002
17-May-2004, 12:22 PM #6
You probaly had characters in there that display the smilie, if you wanted you could have clicked disable smilies at the bottom of the post reply area.

You probaly put a : and a ( together making a
harryman's Avatar
Member with 30 posts.
 
Join Date: Aug 2003
Location: Ca.
18-May-2004, 11:25 PM #7
ohhh. It all makes sense now. So in VB is there like a... you know. A thingy I can look through to see what API calls require which token privelage?
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 03:50 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.