Page 1 of 1

Write into windows clipboard

Posted: Mon May 13, 2013 10:46 am
by mikKummerfeld
How Can I put a text from a variable into the windows clipboard...I need that, but I cant find something here
and I tried using windows function open, clear and setclipboarddata but it fails...

Thanks you so much

Re: Write into windows clipboard

Posted: Tue May 14, 2013 3:07 am
by FrancescoT
Dear Heiko,

you should write a custom dll for that ... honestly, it is not clear to me if you want to set the clipboard during your setup package execution.

Anyway, a sample code can be found from MSDN ... as for example;
http://msdn.microsoft.com/en-us/library ... _Clipboard

Regards

Re: Write into windows clipboard

Posted: Tue May 14, 2013 3:09 am
by mikKummerfeld
i found a workaround..

clear clipboard with cmd /c "echo off | clip"

- then copy my string into textfile
- then use clip.exe to put text from textfile into clipbord
- remove textfile

works

Re: Write into windows clipboard

Posted: Tue May 14, 2013 3:27 am
by FrancescoT
Happy you solved :D !