none
Importing image to powershell RRS feed

  • Question

  • Hi all,

    I am writing a power-shell GUI script. I am uploading an image(my company logo) into my form(script) and everything is fine.

    The image is in a shared drive.

    But when I am running the script on other systems in the same network, The image is not showing up. Only on the systems having access to that shared drive, the image is showing up. Again  I have to go to that system and provide access. Its hectic when there are 6000 systems.   Is there any way I can import the image to the script permanently instead of taking it from a shared drive?? (or) any way to modify my script so no need to give access by going to each and every system(Max no of systems are in domain)

    $img = [System.Drawing.Image]::Fromfile('\\XX.XX.XX.XXX\d$\xyz2.jpg')
    $pictureBox = new-object Windows.Forms.PictureBox
    $pictureBox.Width =  1000
    $pictureBox.Height =  110
    $pictureBox.Location = New-Object Drawing.Point 0,0
    $pictureBox.Image = $img
    
    Please help me out guys. Please dont mind if the question sounds silly.


    Naveen Basati

    Friday, January 9, 2015 1:50 PM

Answers

All replies