Powershell problems?

  • Thread starter Nate Duong
  • Start date
  • #1
126
3
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.
 

Answers and Replies

  • #2
Borg
Science Advisor
Gold Member
1,888
2,424
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?
 
  • #3
126
3
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?
Borg,
If I do not have it, how can I download powershell version with 64 bit?
 
  • #4
126
3
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?
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
 
  • #5
Borg
Science Advisor
Gold Member
1,888
2,424
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
Have you tried running the .bat file as an administrator?
 
  • #6
126
3
Have you tried running the .bat file as an administrator?
yes, I have tried with administrator, it showed the same message.
 
  • #7
Borg
Science Advisor
Gold Member
1,888
2,424
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.
 
  • #8
447
94
  • Like
Likes Imager
Top