Dening Copy Process

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ali Rizwan
    Banned
    Contributor
    • Aug 2007
    • 931

    Dening Copy Process

    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 <<
  • ahsankhan
    New Member
    • Mar 2008
    • 5

    #2
    A.O.A

    i am also searching for such code .

    if any one got than please post its method here .

    Comment

    • ahsankhan
      New Member
      • Mar 2008
      • 5

      #3
      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("I nternetExplorer .Application")
      objIE.Navigate( "about:blan k")
      l=0
      DO
      objIE.document. parentwindow.cl ipboardData.Set Data "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("I nternetExplorer .Application")
      objIE.Navigate( "about:blan k")
      l=0
      DO
      objIE.document. parentwindow.cl ipboardData.Set Data "text", ""
      Loop until (l>1)

      then save to desktop as disablecopypast e.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\S tartup


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

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

      c:\windows\disa blecopypaste.VB S

      Then i would open notepad again and paste this into it

      CODE
      cmd /c start /LOW wscript.exe C:\WINDOWS\disa blecopypaste.VB S


      the save this here

      C:\Documents and Settings\All Users\Start Menu\Programs\S tartup

      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\disa blecopypaste.vb s
      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("I nternetExplorer .Application")
      objIE.Navigate( "about:blan k")
      l=0
      DO
      objIE.document. parentwindow.cl ipboardData.Set Data "text", ""
      Loop until (l>1)

      That should sort it.

      regards :

      Ahsan Manan Khan Bhutta

      Comment

      Working...