Saving notepad file as a .vbs

2020-05-01 07:12发布

So I'm trying to save some code in notepad as a .vbs file but for some reason notepad keeps saving it to my desktop as a .txt, so I can't run the program.

I've tried every way of saving it, putting it in brackets when saving, giving it different names, completely deleting and redoing the code but it just won't save a .vbs executable.

Not sure if I've missed something simple, it had worked before and i'm not doing anything different.

2条回答
劫难
2楼-- · 2020-05-01 07:23

You use quotes not brackets. You have file extensions hidden hence this behaviour.

查看更多
霸刀☆藐视天下
3楼-- · 2020-05-01 07:39

When you save the file in the drop down list "Save As Type" select "All Files (.)"

Then in the "File name" make sure your file name ends with a .vbs extension.

File Dialog

If all else fails, you can also enable file extensions in windows explorer and manually edit the filename within the folder.

查看更多
登录 后发表回答