Solve PowerShell Issues Quickly with Expert Help

  • Thread starter Thread starter Nate Duong
  • Start date Start date
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
7 replies · 2K views
Nate Duong
Messages
125
Reaction score
4
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,

Nate Duong.
 
Physics news on Phys.org
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 said:
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?
 
Borg said:
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
 
Nate Duong said:
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?
 
Borg said:
Have you tried running the .bat file as an administrator?
yes, I have tried with administrator, it showed the same message.
 
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.
 
  • Like
Likes   Reactions: Imager