Cd Label

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • piskie
    Forum Member
    • Jul 2003
    • 2

    Cd Label

    I am very much a newbie and would like to read the CD Label and apply it to password protected exe file.
    Any replies try to keep it in simple steps please.
  • Derek
    Indigo Rose Customer
    • May 2001
    • 1254

    #2
    Re: Cd Label

    Don't understand what yu mean. Can yu explain what yur trying to achieve?
    -
    = Derek
    ["All glory comes from daring to begin" - fortune cookie]

    Comment

    • piskie
      Forum Member
      • Jul 2003
      • 2

      #3
      Re: Cd Label

      What I actualy have in mind is to protect a CD from casual copying by using the CD Label as an entry password for the exe file that contains the sensitive information.

      My thoughts are that the casual copier will not notice the difference in a zero 0 and a leter O.

      For instance SLIDESHOW and SLIDESH0W.

      Thus when they make a copy, the password will be rejected.

      Obviously Clone CD etc will overcome the protection but the casual copier will have a problem with a simple copy and will also not be able to run the exe file without the password.

      Comment

      • Brett
        Indigo Rose Staff Member
        • Jan 2000
        • 2000

        #4
        Re: Cd Label

        The only way to do that that I know of is to use the Windows API function:

        GetVolumeInformation

        To use this in AMS40 you would either have to write a DLL or program that calls this function and then call it from AMS.

        Comment

        • cdemallie
          Forum Member
          • Jul 2002
          • 16

          #5
          Re: Cd Label

          Try this. Basically, it dumps the DIR command to a text file then AMS seaches the text file for your label. If it finds your label in the text file, it runs your program with the password. Otherwise, the user gets an error and the program exits. Note, if your end users will run this on a Win9x machine, you will need to create a PIF file called DirDump.pif that is configured to auto-exit. Include the file your package and copy it to %TempDir% before running DirDump.bat.

          Since you are a self-proclaimed newbie, what you need to do is copy the text below and paste it into your actions list.

          <IR_ACTIONS_LIST>
          <Action name="Set Value">
          <Type>6</Type>
          <Function>0</Function>
          <DTIndentLevel>0</DTIndentLevel>
          <Enabled>1</Enabled>
          <ErrorHandling>
          <UserNotificationMode>0</UserNotificationMode>
          <CustomErrorMessage/>
          <OnErrorAction>0</OnErrorAction>
          <JumpToLabel/>
          </ErrorHandling>
          <Variable>%SrcLabel%</Variable>
          <Value>SLIDESH0W</Value>
          <Evaluate>0</Evaluate>
          </Action>
          <Action name="Set Value">
          <Type>6</Type>
          <Function>0</Function>
          <DTIndentLevel>0</DTIndentLevel>
          <Enabled>1</Enabled>
          <ErrorHandling>
          <UserNotificationMode>0</UserNotificationMode>
          <CustomErrorMessage/>
          <OnErrorAction>0</OnErrorAction>
          <JumpToLabel/>
          </ErrorHandling>
          <Variable>%DumpFile%</Variable>
          <Value>%TempDir%\DirDump.txt</Value>
          <Evaluate>0</Evaluate>
          </Action>
          <Action name="Write">
          <Type>32</Type>
          <Function>0</Function>
          <DTIndentLevel>0</DTIndentLevel>
          <Enabled>1</Enabled>
          <ErrorHandling>
          <UserNotificationMode>0</UserNotificationMode>
          <CustomErrorMessage/>
          <OnErrorAction>0</OnErrorAction>
          <JumpToLabel/>
          </ErrorHandling>
          <FileName>%TempDir%\DirDump.bat</FileName>
          <DataToWrite>@echo off
          Dir %SrcDrv%\&amp;gt;"%DumpFile%"
          exit</DataToWrite>
          <IfFileExists>0</IfFileExists>
          </Action>
          <Action name="Execute">
          <Type>8</Type>
          <Function>0</Function>
          <DTIndentLevel>0</DTIndentLevel>
          <Enabled>1</Enabled>
          <ErrorHandling>
          <UserNotificationMode>0</UserNotificationMode>
          <CustomErrorMessage/>
          <OnErrorAction>0</OnErrorAction>
          <JumpToLabel/>
          </ErrorHandling>
          <FileName>%TempDir%\DirDump.bat</FileName>
          <CommandLine/>
          <WorkingDir/>
          <RunMode>1</RunMode>
          <WaitForReturn>1</WaitForReturn>
          </Action>
          <Action name="Find Line">
          <Type>57</Type>
          <Function>0</Function>
          <DTIndentLevel>0</DTIndentLevel>
          <Enabled>1</Enabled>
          <ErrorHandling>
          <UserNotificationMode>0</UserNotificationMode>
          <CustomErrorMessage/>
          <OnErrorAction>0</OnErrorAction>
          <JumpToLabel/>
          </ErrorHandling>
          <FileName>%DumpFile%</FileName>
          <SearchText>%SrcLabel%</SearchText>
          <StartAtLineNumber>0</StartAtLineNumber>
          <Variable>%LineNumber%</Variable>
          </Action>
          <Action name="IF">
          <Type>200</Type>
          <Function>1</Function>
          <DTIndentLevel>0</DTIndentLevel>
          <Enabled>1</Enabled>
          <ErrorHandling>
          <UserNotificationMode>0</UserNotificationMode>
          <CustomErrorMessage/>
          <OnErrorAction>0</OnErrorAction>
          <JumpToLabel/>
          </ErrorHandling>
          <Condition>%LineNumber% != -1</Condition>
          </Action>
          <Action name="Execute">
          <Type>8</Type>
          <Function>0</Function>
          <DTIndentLevel>1</DTIndentLevel>
          <Enabled>1</Enabled>
          <ErrorHandling>
          <UserNotificationMode>0</UserNotificationMode>
          <CustomErrorMessage/>
          <OnErrorAction>0</OnErrorAction>
          <JumpToLabel/>
          </ErrorHandling>
          <FileName>%SrcDir%\SlideShow.exe</FileName>
          <CommandLine>-p %SrcLabel%</CommandLine>
          <WorkingDir/>
          <RunMode>0</RunMode>
          <WaitForReturn>0</WaitForReturn>
          </Action>
          <Action name="ELSE">
          <Type>206</Type>
          <Function>1</Function>
          <DTIndentLevel>0</DTIndentLevel>
          <Enabled>1</Enabled>
          <ErrorHandling>
          <UserNotificationMode>2</UserNotificationMode>
          <CustomErrorMessage/>
          <OnErrorAction>0</OnErrorAction>
          <JumpToLabel/>
          </ErrorHandling>
          </Action>
          <Action name="Message Box">
          <Type>5</Type>
          <Function>0</Function>
          <DTIndentLevel>1</DTIndentLevel>
          <Enabled>1</Enabled>
          <ErrorHandling>
          <UserNotificationMode>0</UserNotificationMode>
          <CustomErrorMessage/>
          <OnErrorAction>0</OnErrorAction>
          <JumpToLabel/>
          </ErrorHandling>
          <DialogTitle>Unauthorized</DialogTitle>
          <DialogMessage>This is an unauthorized copy of the slide show.</DialogMessage>
          <Icon>4</Icon>
          <Variable>%Result%</Variable>
          <DialogType>0</DialogType>
          <DefaultButton>0</DefaultButton>
          </Action>
          <Action name="END IF">
          <Type>201</Type>
          <Function>1</Function>
          <DTIndentLevel>0</DTIndentLevel>
          <Enabled>1</Enabled>
          <ErrorHandling>
          <UserNotificationMode>2</UserNotificationMode>
          <CustomErrorMessage/>
          <OnErrorAction>0</OnErrorAction>
          <JumpToLabel/>
          </ErrorHandling>
          </Action>
          <Action name="Delete">
          <Type>26</Type>
          <Function>0</Function>
          <DTIndentLevel>0</DTIndentLevel>
          <Enabled>1</Enabled>
          <ErrorHandling>
          <UserNotificationMode>0</UserNotificationMode>
          <CustomErrorMessage/>
          <OnErrorAction>0</OnErrorAction>
          <JumpToLabel/>
          </ErrorHandling>
          <Source>%TempDir%\DirDump.*</Source>
          <RecurseSubdirectories>0</RecurseSubdirectories>
          <ContinueAfterFail>1</ContinueAfterFail>
          <DeleteHiddenSystem>1</DeleteHiddenSystem>
          <DialogTitle>File Cleanup</DialogTitle>
          <DialogText>Deleting Temporary Files.</DialogText>
          </Action>
          <Action name="Exit">
          <Type>2</Type>
          <Function>0</Function>
          <DTIndentLevel>0</DTIndentLevel>
          <Enabled>1</Enabled>
          <ErrorHandling>
          <UserNotificationMode>2</UserNotificationMode>
          <CustomErrorMessage/>
          <OnErrorAction>0</OnErrorAction>
          <JumpToLabel/>
          </ErrorHandling>
          </Action>
          </IR_ACTIONS_LIST>

          Comment

          • TJ_Tigger
            Indigo Rose Customer
            • Sep 2002
            • 3159

            #6
            Re: Cd Label

            Very nice. the same thing could be done using the vol command from dos. It will return the cd volume and serial number without all the directory information. Like this:

            <font color=purple>Volume in drive E is TheFrozenThrone
            Volume Serial Number is D7I7-DEED</font color=purple>

            You could then do the same search in line one to see if the name of the file matches.
            TJ-Tigger
            "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
            "Draco dormiens nunquam titillandus."
            Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

            Comment

            Working...
            X