Reputation: 29
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.
Upvotes: 0
Views: 38651
Reputation: 1
Let the file be in .txt format, Follow below instructions once you have saved the file in .vbs but still the file appears to be in .txt format:
Hope this answers the question. NOTE: If you cannot find "Microsoft Windows Based Script Host" item, click "Browse" and go to the "System32" folder inside your "Windows" folder in your c: drive.
Upvotes: 0
Reputation: 387
If you have already saved the document and you are showing something like the following with a VBS extension but the Type is still Text Document.
Then you may need to confirm that the actual extension is not hidden on the folder level.
Once you can see the actual extension you can remove the .txt to make it .vbs
Upvotes: 0
Reputation: 1497
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.
If all else fails, you can also enable file extensions in windows explorer and manually edit the filename within the folder.
Upvotes: 6
Reputation: 9
You use quotes not brackets. You have file extensions hidden hence this behaviour.
Upvotes: 0