473,378 Members | 1,555 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Dening Copy Process

Ali Rizwan
925 512MB
Hello all,

I need to make a programe which deny the copy process from a specific path.
The path can be of CD/DVD Rom and from HardDrive.

Thanx
>> ALI <<
Feb 11 '08 #1
2 1494
A.O.A

i am also searching for such code .

if any one got than please post its method here .
Mar 7 '08 #2
A really nasty CPU intensive way to disable copy and paste would be this (but you could always start the script as low priority)

Code :
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Navigate("about:blank")
l=0
DO
objIE.document.parentwindow.clipboardData.SetData "text", ""
Loop until (l>1)

end task on the script to stop it and allow copy/paste

win32 api would be much better though.

ok, please bear in mind this is not THE BEST WAY to achieve disabling copy and paste and that an EXE process that behaved in a proper none CPU hogging way would be the better way to do it. . Rather than attach a written EXE that might scare people into thinking it was a virus. I suppose u could attach an EXE that would achieve the same thing hehe easy eh

anyway to use the script do the following

open notepad

paste this code into notepad (not including the word "code"

Code :

Set objIE = CreateObject("InternetExplorer.Application")
objIE.Navigate("about:blank")
l=0
DO
objIE.document.parentwindow.clipboardData.SetData "text", ""
Loop until (l>1)

then save to desktop as disablecopypaste.VBS

note it MUST be saved as .VBS file, not a .TXT file.

then run the script (double click it) and in task manager lower the priority of the script process to LOW. To prevent the computer respose being to slow. Then open a notepad or whatever and try to copy and paste text . To bring back the ability to copy/paste, end the script process in task manager.

Note the process the script runs under is wscript.exe


to use it automatic do this

you COULD place a copy of the script in here

C:\Documents and Settings\All Users\Start Menu\Programs\Startup


--------------------------------------------

Alternatively, i would actually save the script from before here (or copy it to here)

c:\windows\disablecopypaste.VBS

Then i would open notepad again and paste this into it

CODE
cmd /c start /LOW wscript.exe C:\WINDOWS\disablecopypaste.VBS


the save this here

C:\Documents and Settings\All Users\Start Menu\Programs\Startup

as startcopypaste.BAT

This will then make the feature automatic from logging into any account and also will run the script in the low priority automatically, so not to hog the CPU quite as much etc


if it doesnt work and a pop up shows this error

[
Windows script host
Script : C:\windows\disablecopypaste.vbs
Line : 5
Char : 1
Error : openclipboard failed
Code : 800401D0
Source : (null)
]
then change the MAIN script by adding a line to the top of it so it read this


On Error Resume Next
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Navigate("about:blank")
l=0
DO
objIE.document.parentwindow.clipboardData.SetData "text", ""
Loop until (l>1)

That should sort it.

regards :

Ahsan Manan Khan Bhutta
Mar 20 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Tess | last post by:
Hi, Long time reader, first time poster... Any help is appreciated. I have a few questions regarding Winform controls embedded within an html page. For more info please see the appendix. Now,...
0
by: Tess | last post by:
Hi, Long time reader, first time poster... Any help is appreciated. I have a few questions regarding Winform controls embedded within an html page. For more info please see the appendix. Now,...
0
by: Tess | last post by:
Hi, Long time reader, first time poster... Any help is appreciated. I have a few questions regarding Winform controls embedded within an html page. For more info please see the appendix. Now,...
0
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hello, mister I have an application web asp.net 2.0 + vs 2005 and VS 2005 Web Application Project. Its appears this error in execution: "Cannot Create/Shadow Copy '<projectname>' when that...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.