Batch File that denies access to a folder - Page 2 - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Software > Programming
Click Here to Login
Reply
 
Thread Tools Display Modes
 
Old 06-26-2012, 09:10 PM   #11 (permalink)
The Ghost
 
luke127's Avatar
 
Join Date: Mar 2012
Location: Australia
Posts: 838
Default Re: Batch File that denies access to a folder

Thanks Carnage. Then flaw with the changing permissions is one I actually want because if I break something at least I know there is a backdoor. Also any luck with the guides?
__________________

__________________
Yeah, I'm the boss 😂😂 FIGJAM 😂😂
luke127 is offline   Reply With Quote
Old 06-26-2012, 11:19 PM   #12 (permalink)
Private Joker
 
carnageX's Avatar
 
Join Date: Feb 2007
Location: South Dakota
Posts: 24,506
Default Re: Batch File that denies access to a folder

I just Google for everything.. I don't know much of batch scripting except what I need to pick up from Google. I've already learned a few other languages, so it helps me pick up other languages more easily.
__________________

__________________
Laptop: MSI GT70 2OC-059us | i7-4700MQ | 16GB | GTX 770m | 500GB SSD / 750GB HDD | 17.3" | Win10 Pro
Desktop: 4690k | 12GB g.Skill RipJaws | GTX 970 | 520hx | Z87X-UD4H | Corsair Vengeance C70 | Corsair H110 | Acer 25" | Acer 22" | Win10
Mobile: Samsung Galaxy Note 5


If I help you, or you just like what I said, rep me by clicking the under my post
carnageX is offline   Reply With Quote
Old 06-27-2012, 02:18 AM   #13 (permalink)
The Ghost
 
luke127's Avatar
 
Join Date: Mar 2012
Location: Australia
Posts: 838
Default Re: Batch File that denies access to a folder

Aahhh okay. btw have you heard of a programming language named logo? I found it in an old computer and internet term dictionary. It was designed for Windows 95 and NT but it still has some relevant stuff.

Also the script with icacls caused mayhem. I think I won't play with that just yet lol. I have another folder using a similar script with the hidden name as control panel and it caused absolute trouble. Good thing I have administrative rights and I reversed the damage through the GUI version as I am more experienced doing it that way.

EDIT: Did some play around and found a few problems here are the screen shots: (NOTE: This is meant to be used for both XP and Windows 7 it worked in XP but not in 7 and for some reason in windows XP it locked ALL files on the external 75GB drive)
__________________
Yeah, I'm the boss 😂😂 FIGJAM 😂😂
luke127 is offline   Reply With Quote
Old 06-27-2012, 02:40 AM   #14 (permalink)
The Ghost
 
luke127's Avatar
 
Join Date: Mar 2012
Location: Australia
Posts: 838
Default Re: Batch File that denies access to a folder

Here's the shots:




So as you can see this won't work on windows 7 and I can't get any shots of XP at the moment as I am about to send in my XP PC to the repair shop. It's RAM crashed badly and caused major issues in the systems files possibly I may have to reinstall D: but that's okay I still got the disks and I know where they are
__________________
Yeah, I'm the boss 😂😂 FIGJAM 😂😂
luke127 is offline   Reply With Quote
Old 06-27-2012, 02:41 AM   #15 (permalink)
The Ghost
 
luke127's Avatar
 
Join Date: Mar 2012
Location: Australia
Posts: 838
Default Re: Batch File that denies access to a folder

The funny thing is even though it says access denied it still unlocks the folder???? What the!
Also the Are you Sure thing is annoying and I can't seem to find the cause of it.
__________________
Yeah, I'm the boss 😂😂 FIGJAM 😂😂
luke127 is offline   Reply With Quote
Old 06-27-2012, 11:50 AM   #16 (permalink)
Private Joker
 
carnageX's Avatar
 
Join Date: Feb 2007
Location: South Dakota
Posts: 24,506
Default Re: Batch File that denies access to a folder

The script I posted works on Win7 for me... It's what I tested it on..

Post your script that you're using, because I tested the one I modified fully and it wouldn't unlock when I entered an incorrect password, and it only locked the files/folders that were under the specified LOCKFOLDER variable. The one I modified also doesn't have the additional "are you sure you want to unlock" line... So not sure which one you're using.
__________________
Laptop: MSI GT70 2OC-059us | i7-4700MQ | 16GB | GTX 770m | 500GB SSD / 750GB HDD | 17.3" | Win10 Pro
Desktop: 4690k | 12GB g.Skill RipJaws | GTX 970 | 520hx | Z87X-UD4H | Corsair Vengeance C70 | Corsair H110 | Acer 25" | Acer 22" | Win10
Mobile: Samsung Galaxy Note 5


If I help you, or you just like what I said, rep me by clicking the under my post
carnageX is offline   Reply With Quote
Old 06-27-2012, 10:15 PM   #17 (permalink)
The Ghost
 
luke127's Avatar
 
Join Date: Mar 2012
Location: Australia
Posts: 838
Default Re: Batch File that denies access to a folder

I tried to use Cacls.exeto see if it would fix the issue and it did not. So therefore something is wrong. I will go home and continue trying to find the issue. I will post a screen shot of the script when I get home.
__________________
Yeah, I'm the boss 😂😂 FIGJAM 😂😂
luke127 is offline   Reply With Quote
Old 06-27-2012, 11:31 PM   #18 (permalink)
Private Joker
 
carnageX's Avatar
 
Join Date: Feb 2007
Location: South Dakota
Posts: 24,506
Default Re: Batch File that denies access to a folder

You don't need to post a screenshot of the script.. just copy/paste it into a post..
__________________
Laptop: MSI GT70 2OC-059us | i7-4700MQ | 16GB | GTX 770m | 500GB SSD / 750GB HDD | 17.3" | Win10 Pro
Desktop: 4690k | 12GB g.Skill RipJaws | GTX 970 | 520hx | Z87X-UD4H | Corsair Vengeance C70 | Corsair H110 | Acer 25" | Acer 22" | Win10
Mobile: Samsung Galaxy Note 5


If I help you, or you just like what I said, rep me by clicking the under my post
carnageX is offline   Reply With Quote
Old 06-28-2012, 02:40 AM   #19 (permalink)
The Ghost
 
luke127's Avatar
 
Join Date: Mar 2012
Location: Australia
Posts: 838
Default Re: Batch File that denies access to a folder

Well in all seriousness the script I used was the one you constructed. But I will make a re test to find the answer. Now are you sure that this works in windows 7 home premium?

EDIT: Okay I did a retest and I found that the are you sure thing disappeared so maybe I was responsible for that although I am not sure how it happened.
__________________
Yeah, I'm the boss 😂😂 FIGJAM 😂😂
luke127 is offline   Reply With Quote
Old 06-28-2012, 01:36 PM   #20 (permalink)
Private Joker
 
carnageX's Avatar
 
Join Date: Feb 2007
Location: South Dakota
Posts: 24,506
Default Re: Batch File that denies access to a folder

No idea about home premium; I'm running Pro. If you can run the icacls.exe from command line in Home Premium manually, then it should work through batch file.
__________________

__________________
Laptop: MSI GT70 2OC-059us | i7-4700MQ | 16GB | GTX 770m | 500GB SSD / 750GB HDD | 17.3" | Win10 Pro
Desktop: 4690k | 12GB g.Skill RipJaws | GTX 970 | 520hx | Z87X-UD4H | Corsair Vengeance C70 | Corsair H110 | Acer 25" | Acer 22" | Win10
Mobile: Samsung Galaxy Note 5


If I help you, or you just like what I said, rep me by clicking the under my post
carnageX is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to: output to a txt file the results of a copy command from a batch file QuaziBee Programming 4 01-12-2011 03:24 PM
Creating a password protected batch file with a batch file MattPwns Programming 2 07-03-2010 05:04 PM
Access Folder History With Folder Cache Osiris Tips, Tricks & Tutorials 0 04-24-2009 08:19 AM
File/folder access within 'Documents & Settings' folder bleacheddesign Microsoft Windows and Software 4 07-02-2008 02:08 PM
Batch scripting: Startup applications and close batch file LincolnX Microsoft Windows and Software 7 01-17-2008 08:50 PM



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 02:07 PM.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.