Can I use process.start("myfile.pdf", "password") in .net?

i develop a .net app that show a video , pdf , other ( exams ,questions…)
i need either a pdf activex that accept a file name and pass parameters ( free activex , i just want to to show , no need for any advanced options or edit )
or a software like adobe reader that can recive the password as a paramter
and found that project and ask if any one can help

If SumatraPDF is the system default handler for pdf’s I simply need to “call” myfile.pdf and it will open, what may be more of an issue is why you need a password. SumatraPDF can “remember” passwords used to open in the past but it cannot be a parameter what has been suggested in the past is if you know the hash of the password you could inject that to the settings file on the fly HOWEVER you might as well just have it permanently there since there is no guardian to avoid the hash being intercepted

the password is stored in my .net app which each user has a pc related code ,so the pdf can not open on anu other device
currently i use sendkey from my app to the pdf reader , but it is no secure eniugh

I think but may be wrong that SumatraPDF only needs to store the code once per user so how might that impact usage if using a per user password.
If actually tied to hardware the following may not be such an issue, but be aware password per machine whilst possibly one of the strongest methods is still often defeated, I used to supply commercial machine security (dongles) and could often uncover / supply the code using just my hand calculator.

No need to store “plain” password in send keys that can be easily intercepted
The hash is easy to store in the settings so NOT needed at each file opening

All hashes can be broken that’s WHY they are a hash.
Once the password hash is stored (if not deleted) any user on that machine could open a file for that machine, thus user B uses machine A (because they are on holiday or its more convenient) User A returns from Holiday to be told by user B they get more Pay

thank you , i will contunue with sendkey m as i did not undrstand your reply (i am not expert)

ALL pdfs with or without password can be opened by any one, passwords and signatures are not impossible to forge.

but to medical students it is completly imposible :grinning::grinning:
i just need to give just some protection and easy way to open
thank you

1 Like

The password to open a group of pdfs is for that group no mater what machine it is opened on If your password for your machine is shown to be mohammadPC then mine is likely to be GitHubRulesPC but I simply need to use mohammadPC to open your group of files. Or like many students do post it online as a “please do / unlock this for me”
But then Im not a medical student :slight_smile:

sorry i mean my medical students that i give them the pdf
finally i found a free solution other than this

Always interested to know what worked for your query, I can always modify a competitive link :slight_smile: