Hello Everyone!
I am back with a followup question.... the portion below in red is the section of the code that is calling the dll file - it indicates that it calls on the dll file in the autoplay directory locally on my machine... is it possible to have the code call on the dll file from a specified directory ... lets say a CD Rom drive or another directory of any choice? Reason... I believe the below code does not work at my office because it is a secure facility and the dll file is not located in an autoplay directory - it is in the McKTools directory along with all files associated with this project...
Thanks in advance...:yes:lol
DLL.CallFunction("AutoPlay\\Docs\\DisableKeys.dll" , "DisablePrtScr","", DLL_RETURN_TYPE_LONG, DLL_CALL_CDECL);
--create a table of all the current attached drives
tDrives = Drive.Enumerate();
--set variable for file found
value = 0;
--step through the table of drives checking if the file exists at the specified location on that drive
for i, v in tDrives do
bExists = File.DoesExist(tDrives[i] .. "\\McKTools\\Launch.exe");
--if file does exist then run it
if bExists == true then
File.Run(tDrives[i] .. "\\McKTools\\Launch.exe", "", tDrives[i] .. "\\McKTools", SW_SHOWNORMAL, false);
--increase value by 1 so we know that the file was found and break out of the loop
value = value + 1;
break
end
end
--if file was found then value will = 1 so exit program without delay otherwise loop completed without finding file and value will = 0 still so alert the user to get support
if value ~= 1 then Dialog.TimedMessage("Error", "Unable to locate file, please contact a system administrator", 5000, MB_ICONINFORMATION);
end
Application.SetRedraw(false);
Application.Exit(0);
I am back with a followup question.... the portion below in red is the section of the code that is calling the dll file - it indicates that it calls on the dll file in the autoplay directory locally on my machine... is it possible to have the code call on the dll file from a specified directory ... lets say a CD Rom drive or another directory of any choice? Reason... I believe the below code does not work at my office because it is a secure facility and the dll file is not located in an autoplay directory - it is in the McKTools directory along with all files associated with this project...
Thanks in advance...:yes:lol
DLL.CallFunction("AutoPlay\\Docs\\DisableKeys.dll" , "DisablePrtScr","", DLL_RETURN_TYPE_LONG, DLL_CALL_CDECL);
--create a table of all the current attached drives
tDrives = Drive.Enumerate();
--set variable for file found
value = 0;
--step through the table of drives checking if the file exists at the specified location on that drive
for i, v in tDrives do
bExists = File.DoesExist(tDrives[i] .. "\\McKTools\\Launch.exe");
--if file does exist then run it
if bExists == true then
File.Run(tDrives[i] .. "\\McKTools\\Launch.exe", "", tDrives[i] .. "\\McKTools", SW_SHOWNORMAL, false);
--increase value by 1 so we know that the file was found and break out of the loop
value = value + 1;
break
end
end
--if file was found then value will = 1 so exit program without delay otherwise loop completed without finding file and value will = 0 still so alert the user to get support
if value ~= 1 then Dialog.TimedMessage("Error", "Unable to locate file, please contact a system administrator", 5000, MB_ICONINFORMATION);
end
Application.SetRedraw(false);
Application.Exit(0);