Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Powershell problems?

  1. Dec 28, 2015 #1
    Dear Group,
    I am trying to use powershell to automatically change desktop back ground,

    I had code and it worked (windows7 with 32 bit), but when I tried to put into different computer (windows7 with 64 bit) the code did not work and it showed the message. (images 1a and 1b below),

    Do you have any ideal to help me out? I also have an image which code is included?
    1a.JPG 1b.JPG 1c.JPG
    Thank you,
    Best regards,
    Nate Duong.
     
  2. jcsd
  3. Dec 28, 2015 #2

    Borg

    User Avatar
    Science Advisor
    Gold Member

    Your code shows that you're attempting to use a 32 bit dll on your 64 bit system. Do you have a 64 bit version that you can use instead?
     
  4. Dec 28, 2015 #3
    Borg,
    If I do not have it, how can I download powershell version with 64 bit?
     
  5. Dec 28, 2015 #4
    Actually, when I right click and choose option "run with powershell". the software is run fine.

    But when I created .bat file such as:

    @Echo off
    powershell.exe C:\Users\ngoc\Desktop\FINDER_PGM\ChangeDesktopOffice.ps1
    cd c:\finder_pgm\radarcmd_finder
    copy office.rdf default.rdf

    the CMD window showed up and showed that message.

    Do you have any ideal?

    Thank you, Borg
     
  6. Dec 28, 2015 #5

    Borg

    User Avatar
    Science Advisor
    Gold Member

    Have you tried running the .bat file as an administrator?
     
  7. Dec 28, 2015 #6
    yes, I have tried with administrator, it showed the same message.
     
  8. Dec 28, 2015 #7

    Borg

    User Avatar
    Science Advisor
    Gold Member

    Then I'm not sure what the answer is. I haven't worked much with the power shell tools. I tried a simple Google search and ran across this article on Power Shell Versions. You do need to take care with respect to the 32 and 64 bit operating systems.
     
  9. Dec 29, 2015 #8
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Powershell problems?
  1. Download problem (Replies: 4)

  2. Problems with Chrome (Replies: 19)

  3. Java problem. (Replies: 4)

  4. Keyboard Problems (Replies: 6)

Loading...